private void writeProgramSystemMetadata(ApplicationId appId, ProgramType programType,
Iterable<? extends ProgramSpecification> specs) {
for (ProgramSpecification spec : specs) {
ProgramId programId = appId.program(programType, spec.getName());
Map<String, String> properties = metadataStore.getProperties(MetadataScope.SYSTEM, programId.toMetadataEntity());
ProgramSystemMetadataWriter writer = new ProgramSystemMetadataWriter(metadataStore, programId, spec,
!properties.isEmpty());
writer.write();
}
}
}