+ private String dmiDataPlugin;
+
+ private String dmiModelPlugin;
+
+ private List<NcmpServiceCmHandle> createdCmHandles = Collections.emptyList();
+
+ private List<NcmpServiceCmHandle> updatedCmHandles = Collections.emptyList();
+
+ private List<String> removedCmHandles = Collections.emptyList();
+
+ /**
+ * Validates plugin service names.
+ * @throws NcmpException if validation fails.
+ */
+ public void validateDmiPluginRegistration() throws NcmpException {
+ final String combinedServiceName = dmiPlugin;
+ final String dataServiceName = dmiDataPlugin;
+ final String modelsServiceName = dmiModelPlugin;
+
+ String errorMessage = null;
+
+ if (isNullEmptyOrBlank(combinedServiceName)) {
+ if ((isNullEmptyOrBlank(dataServiceName) && isNullEmptyOrBlank(modelsServiceName))) {
+ errorMessage = "No DMI plugin service names";
+ } else {
+ if (isNullEmptyOrBlank(dataServiceName) || isNullEmptyOrBlank(modelsServiceName)) {
+ errorMessage = "Cannot register just a Data or Model plugin service name";
+ }
+ }
+ } else {
+ if (!isNullEmptyOrBlank(dataServiceName) || !isNullEmptyOrBlank(modelsServiceName)) {
+ errorMessage = "Cannot register combined plugin service name and other service names";
+ }
+ }