+ private Collection<String> getModuleNames(final ModuleNamesAsJsonArray moduleNamesAsJsonArray) {
+ final Collection<String> moduleNames = new ArrayList<>(moduleNamesAsJsonArray.size());
+ for (final ModuleNameAsJsonObject moduleNameAsJsonObject : moduleNamesAsJsonArray) {
+ moduleNames.add(moduleNameAsJsonObject.getModuleName());
+ }
+ return moduleNames;
+ }
+
+ private CmHandleProperties toCmHandleProperties(final Collection<String> cmHandleIdentifiers) {
+ final CmHandleProperties cmHandleProperties = new CmHandleProperties();
+ for (final String cmHandleIdentifier : cmHandleIdentifiers) {
+ final CmHandleProperty cmHandleProperty = new CmHandleProperty();
+ cmHandleProperty.setCmHandleId(cmHandleIdentifier);
+ cmHandleProperties.add(cmHandleProperty);
+ }
+ return cmHandleProperties;
+ }
+
+ private RestOutputCmHandle toRestOutputCmHandle(final NcmpServiceCmHandle ncmpServiceCmHandle) {
+ final RestOutputCmHandle restOutputCmHandle = new RestOutputCmHandle();
+ final CmHandlePublicProperties cmHandlePublicProperties = new CmHandlePublicProperties();
+ restOutputCmHandle.setCmHandle(ncmpServiceCmHandle.getCmHandleID());
+ cmHandlePublicProperties.add(ncmpServiceCmHandle.getPublicProperties());
+ restOutputCmHandle.setPublicCmHandleProperties(cmHandlePublicProperties);
+ return restOutputCmHandle;
+ }