summaryrefslogtreecommitdiffstats
path: root/model/model-api
diff options
context:
space:
mode:
Diffstat (limited to 'model/model-api')
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/ApexModel.java10
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java14
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java4
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextSchemaFacade.java4
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/EventFacade.java10
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/KeyInformationFacade.java8
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelFacade.java6
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelHandlerFacade.java36
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/PolicyFacade.java92
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/TaskFacade.java30
-rw-r--r--model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/TestApexModelAPI.java16
-rw-r--r--model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/TestModelHandlerFacade.java10
-rw-r--r--model/model-api/src/test/resources/META-INF/persistence.xml4
13 files changed, 122 insertions, 122 deletions
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/ApexModel.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/ApexModel.java
index c9190b8db..8b4d4a91b 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/ApexModel.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/ApexModel.java
@@ -20,7 +20,7 @@
package org.onap.policy.apex.model.modelapi;
-import org.onap.policy.apex.model.basicmodel.dao.DAOParameters;
+import org.onap.policy.apex.model.basicmodel.dao.DaoParameters;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
/**
@@ -67,18 +67,18 @@ public interface ApexModel extends ApexEditorAPI {
* @param modelName the name of the model to load
* @param modelVersion the version of the model to load, loads the policy model from the database with this name, if more than one exist, an exception is
* thrown
- * @param daoParameters the parameters to use to access the database over JDBC
+ * @param DaoParameters the parameters to use to access the database over JDBC
* @return the result of the operation
*/
- ApexAPIResult loadFromDatabase(String modelName, String modelVersion, DAOParameters daoParameters);
+ ApexAPIResult loadFromDatabase(String modelName, String modelVersion, DaoParameters DaoParameters);
/**
* Save an Apex model to a database.
*
- * @param daoParameters the parameters to use to access the database over JDBC
+ * @param DaoParameters the parameters to use to access the database over JDBC
* @return the result of the operation
*/
- ApexAPIResult saveToDatabase(DAOParameters daoParameters);
+ ApexAPIResult saveToDatabase(DaoParameters DaoParameters);
/**
* Read an APEX model from a location identified by a URL.
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java
index 738178d17..429d3c66f 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java
@@ -22,7 +22,7 @@ package org.onap.policy.apex.model.modelapi.impl;
import java.util.Properties;
-import org.onap.policy.apex.model.basicmodel.dao.DAOParameters;
+import org.onap.policy.apex.model.basicmodel.dao.DaoParameters;
import org.onap.policy.apex.model.modelapi.ApexAPIResult;
import org.onap.policy.apex.model.modelapi.ApexModel;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
@@ -1054,23 +1054,23 @@ public final class ApexModelImpl implements ApexModel {
* (non-Javadoc)
*
* @see org.onap.policy.apex.model.modelapi.ApexModel#loadFromDatabase(java.lang.String,
- * java.lang.String, org.onap.policy.apex.model.basicmodel.dao.DAOParameters)
+ * java.lang.String, org.onap.policy.apex.model.basicmodel.dao.DaoParameters)
*/
@Override
public ApexAPIResult loadFromDatabase(final String modelName, final String modelVersion,
- final DAOParameters daoParameters) {
- return modelHandlerFacade.loadFromDatabase(modelName, modelVersion, daoParameters);
+ final DaoParameters DaoParameters) {
+ return modelHandlerFacade.loadFromDatabase(modelName, modelVersion, DaoParameters);
}
/*
* (non-Javadoc)
*
* @see org.onap.policy.apex.model.modelapi.ApexModel#saveToDatabase(org.onap.policy.apex.model.
- * basicmodel. dao.DAOParameters)
+ * basicmodel. dao.DaoParameters)
*/
@Override
- public ApexAPIResult saveToDatabase(final DAOParameters daoParameters) {
- return modelHandlerFacade.saveToDatabase(daoParameters);
+ public ApexAPIResult saveToDatabase(final DaoParameters DaoParameters) {
+ return modelHandlerFacade.saveToDatabase(DaoParameters);
}
/*
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java
index afd518d7a..840242569 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java
@@ -100,7 +100,7 @@ public class ContextAlbumFacade {
if (apexModel.getPolicyModel().getAlbums().getAlbumsMap().containsKey(key)) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- CONCEPT + key.getID() + " already exists");
+ CONCEPT + key.getId() + " already exists");
}
final AxContextSchema schema =
@@ -229,7 +229,7 @@ public class ContextAlbumFacade {
return new ApexAPIResult();
} else {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + key.getID() + DOES_NOT_EXIST);
+ CONCEPT + key.getId() + DOES_NOT_EXIST);
}
}
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextSchemaFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextSchemaFacade.java
index 3f7f75652..620f229f1 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextSchemaFacade.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextSchemaFacade.java
@@ -96,7 +96,7 @@ public class ContextSchemaFacade {
}
if (apexModel.getPolicyModel().getSchemas().getSchemasMap().containsKey(key)) {
- return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS, CONCEPT + key.getID() + ALREADY_EXISTS);
+ return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS, CONCEPT + key.getId() + ALREADY_EXISTS);
}
apexModel.getPolicyModel().getSchemas().getSchemasMap().put(key, new AxContextSchema(key, schemaFlavour, schemaDefinition));
@@ -189,7 +189,7 @@ public class ContextSchemaFacade {
new ApexModelStringWriter<AxContextSchema>(false).writeString(removedSchema, AxContextSchema.class, jsonMode));
}
else {
- return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST, CONCEPT + key.getID() + DOES_NOT_EXIST);
+ return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST, CONCEPT + key.getId() + DOES_NOT_EXIST);
}
}
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/EventFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/EventFacade.java
index 095d4f9f4..4706ff70a 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/EventFacade.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/EventFacade.java
@@ -99,7 +99,7 @@ public class EventFacade {
}
if (apexModel.getPolicyModel().getEvents().getEventMap().containsKey(key)) {
- return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS, CONCEPT + key.getID() + ALREADY_EXISTS);
+ return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS, CONCEPT + key.getId() + ALREADY_EXISTS);
}
final AxEvent event = new AxEvent(key);
@@ -200,7 +200,7 @@ public class EventFacade {
.writeString(removedEvent, AxEvent.class, jsonMode));
} else {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + key.getID() + DOES_NOT_EXIST);
+ CONCEPT + key.getId() + DOES_NOT_EXIST);
}
}
@@ -278,7 +278,7 @@ public class EventFacade {
if (event.getParameterMap().containsKey(refKey.getLocalName())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- CONCEPT + refKey.getID() + ALREADY_EXISTS);
+ CONCEPT + refKey.getId() + ALREADY_EXISTS);
}
final AxContextSchema schema =
@@ -323,7 +323,7 @@ public class EventFacade {
} else {
if (event.getParameterMap().size() == 0) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no parameters defined on event " + event.getKey().getID());
+ "no parameters defined on event " + event.getKey().getId());
}
final ApexAPIResult result = new ApexAPIResult();
@@ -368,7 +368,7 @@ public class EventFacade {
} else {
if (event.getParameterMap().size() == 0) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no parameters defined on event " + event.getKey().getID());
+ "no parameters defined on event " + event.getKey().getId());
}
for (final AxField eventPar : event.getParameterMap().values()) {
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/KeyInformationFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/KeyInformationFacade.java
index d9b9cef1a..e3e3db0c9 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/KeyInformationFacade.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/KeyInformationFacade.java
@@ -88,7 +88,7 @@ public class KeyInformationFacade {
}
if (apexModel.getPolicyModel().getKeyInformation().getKeyInfoMap().containsKey(key)) {
- return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS, CONCEPT + key.getID() + ALREADY_EXISTS);
+ return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS, CONCEPT + key.getId() + ALREADY_EXISTS);
}
final AxKeyInfo keyInfo = new AxKeyInfo(key);
@@ -99,7 +99,7 @@ public class KeyInformationFacade {
keyInfo.setUuid(UUID.fromString(uuid));
} else {
// generate a reproducible UUID
- keyInfo.setUuid(AxKeyInfo.generateReproducibleUUID(keyInfo.getID() + keyInfo.getDescription()));
+ keyInfo.setUuid(AxKeyInfo.generateReproducibleUuid(keyInfo.getId() + keyInfo.getDescription()));
}
apexModel.getPolicyModel().getKeyInformation().getKeyInfoMap().put(key, keyInfo);
return new ApexAPIResult();
@@ -135,7 +135,7 @@ public class KeyInformationFacade {
keyInfo.setUuid(UUID.fromString(uuid));
} else {
// generate a reproducible UUID
- keyInfo.setUuid(AxKeyInfo.generateReproducibleUUID(keyInfo.getID() + keyInfo.getDescription()));
+ keyInfo.setUuid(AxKeyInfo.generateReproducibleUuid(keyInfo.getId() + keyInfo.getDescription()));
}
return new ApexAPIResult();
@@ -190,7 +190,7 @@ public class KeyInformationFacade {
.writeString(removedKeyInfo, AxKeyInfo.class, jsonMode));
} else {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + key.getID() + DOES_NOT_EXIST);
+ CONCEPT + key.getId() + DOES_NOT_EXIST);
}
}
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelFacade.java
index 2a6dd3ebf..65be2ae82 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelFacade.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelFacade.java
@@ -98,7 +98,7 @@ public class ModelFacade {
if (!apexModel.getPolicyModel().getKey().equals(AxArtifactKey.getNullKey())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- CONCEPT + apexModel.getPolicyModel().getKey().getID() + ALREADY_CREATED);
+ CONCEPT + apexModel.getPolicyModel().getKey().getId() + ALREADY_CREATED);
}
apexModel.setPolicyModel(new AxPolicyModel(key));
@@ -137,13 +137,13 @@ public class ModelFacade {
key.setVersion(defaultVersion);
} else {
return new ApexAPIResult(ApexAPIResult.RESULT.FAILED,
- CONCEPT + apexModel.getPolicyModel().getKey().getID() + NO_VERSION_SPECIFIED);
+ CONCEPT + apexModel.getPolicyModel().getKey().getId() + NO_VERSION_SPECIFIED);
}
}
if (apexModel.getPolicyModel().getKey().equals(AxArtifactKey.getNullKey())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + apexModel.getPolicyModel().getKey().getID() + DOES_NOT_EXIST);
+ CONCEPT + apexModel.getPolicyModel().getKey().getId() + DOES_NOT_EXIST);
}
return keyInformationFacade.updateKeyInformation(name, version, uuid, description);
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelHandlerFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelHandlerFacade.java
index b422d84d1..5e54744d5 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelHandlerFacade.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelHandlerFacade.java
@@ -39,7 +39,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.basicmodel.dao.ApexDao;
import org.onap.policy.apex.model.basicmodel.dao.ApexDaoFactory;
-import org.onap.policy.apex.model.basicmodel.dao.DAOParameters;
+import org.onap.policy.apex.model.basicmodel.dao.DaoParameters;
import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
import org.onap.policy.apex.model.basicmodel.handling.ApexModelFileWriter;
import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader;
@@ -106,7 +106,7 @@ public class ModelHandlerFacade {
if (!apexModel.getPolicyModel().getKey().equals(AxArtifactKey.getNullKey())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- MODEL + apexModel.getPolicyModel().getKey().getID() + ALREADY_LOADED);
+ MODEL + apexModel.getPolicyModel().getKey().getId() + ALREADY_LOADED);
}
ApexAPIResult result = new ApexAPIResult();
@@ -127,7 +127,7 @@ public class ModelHandlerFacade {
if (!apexModel.getPolicyModel().getKey().equals(AxArtifactKey.getNullKey())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- MODEL + apexModel.getPolicyModel().getKey().getID() + ALREADY_LOADED);
+ MODEL + apexModel.getPolicyModel().getKey().getId() + ALREADY_LOADED);
}
ApexAPIResult result = new ApexAPIResult();
@@ -152,9 +152,9 @@ public class ModelHandlerFacade {
try {
if (xmlFlag) {
- apexModelFileWriter.apexModelWriteXMLFile(apexModel.getPolicyModel(), AxPolicyModel.class, fileName);
+ apexModelFileWriter.apexModelWriteXmlFile(apexModel.getPolicyModel(), AxPolicyModel.class, fileName);
} else {
- apexModelFileWriter.apexModelWriteJSONFile(apexModel.getPolicyModel(), AxPolicyModel.class, fileName);
+ apexModelFileWriter.apexModelWriteJsonFile(apexModel.getPolicyModel(), AxPolicyModel.class, fileName);
}
return new ApexAPIResult();
} catch (ApexException e) {
@@ -168,23 +168,23 @@ public class ModelHandlerFacade {
* @param modelName the name of the model to load
* @param modelVersion the version of the model to load, loads the policy model from the
* database with this name, if more than one exist, an exception is thrown
- * @param daoParameters the parameters to use to access the database over JDBC
+ * @param DaoParameters the parameters to use to access the database over JDBC
* @return the result of the operation
*/
public ApexAPIResult loadFromDatabase(final String modelName, final String modelVersion,
- final DAOParameters daoParameters) {
+ final DaoParameters DaoParameters) {
Assertions.argumentNotNull(modelName, "modelName may not be null");
- Assertions.argumentNotNull(daoParameters, "daoParameters may not be null");
+ Assertions.argumentNotNull(DaoParameters, "DaoParameters may not be null");
if (!apexModel.getPolicyModel().getKey().equals(AxArtifactKey.getNullKey())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- MODEL + apexModel.getPolicyModel().getKey().getID() + ALREADY_LOADED);
+ MODEL + apexModel.getPolicyModel().getKey().getId() + ALREADY_LOADED);
}
ApexDao apexDao = null;
try {
- apexDao = new ApexDaoFactory().createApexDao(daoParameters);
- apexDao.init(daoParameters);
+ apexDao = new ApexDaoFactory().createApexDao(DaoParameters);
+ apexDao.init(DaoParameters);
// Single specific model requested
if (modelVersion != null) {
@@ -249,15 +249,15 @@ public class ModelHandlerFacade {
/**
* Save an Apex model to a database.
*
- * @param daoParameters the parameters to use to access the database over JDBC
+ * @param DaoParameters the parameters to use to access the database over JDBC
* @return the result of the operation
*/
- public ApexAPIResult saveToDatabase(final DAOParameters daoParameters) {
+ public ApexAPIResult saveToDatabase(final DaoParameters DaoParameters) {
ApexDao apexDao = null;
try {
- apexDao = new ApexDaoFactory().createApexDao(daoParameters);
- apexDao.init(daoParameters);
+ apexDao = new ApexDaoFactory().createApexDao(DaoParameters);
+ apexDao.init(DaoParameters);
apexDao.create(apexModel.getPolicyModel());
return new ApexAPIResult();
@@ -281,7 +281,7 @@ public class ModelHandlerFacade {
if (!apexModel.getPolicyModel().getKey().equals(AxArtifactKey.getNullKey())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- MODEL + apexModel.getPolicyModel().getKey().getID() + ALREADY_LOADED);
+ MODEL + apexModel.getPolicyModel().getKey().getId() + ALREADY_LOADED);
}
URL apexModelURL;
@@ -468,7 +468,7 @@ public class ModelHandlerFacade {
PolicyModelSplitter.getSubPolicyModel(apexModel.getPolicyModel(), requiredPolicySet, false);
ApexModelFileWriter<AxPolicyModel> apexModelFileWriter = new ApexModelFileWriter<>(false);
- apexModelFileWriter.apexModelWriteJSONFile(splitPolicyModel, AxPolicyModel.class, targetModelName);
+ apexModelFileWriter.apexModelWriteJsonFile(splitPolicyModel, AxPolicyModel.class, targetModelName);
return new ApexAPIResult();
} catch (ApexException e) {
return new ApexAPIResult(ApexAPIResult.RESULT.FAILED, e);
@@ -503,7 +503,7 @@ public class ModelHandlerFacade {
return splitResult;
} catch (Exception e) {
return new ApexAPIResult(ApexAPIResult.RESULT.FAILED,
- "split of policy model " + apexModel.getPolicyModel().getID() + " failed", e);
+ "split of policy model " + apexModel.getPolicyModel().getId() + " failed", e);
} finally {
if (tempSplitPolicyFile != null) {
try {
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/PolicyFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/PolicyFacade.java
index 97bf3da0d..1fe6d3599 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/PolicyFacade.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/PolicyFacade.java
@@ -116,7 +116,7 @@ public class PolicyFacade {
}
if (apexModel.getPolicyModel().getPolicies().getPolicyMap().containsKey(key)) {
- return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS, CONCEPT + key.getID() + ALREADY_EXISTS);
+ return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS, CONCEPT + key.getId() + ALREADY_EXISTS);
}
final AxPolicy policy = new AxPolicy(key);
@@ -211,7 +211,7 @@ public class PolicyFacade {
.writeString(removedPolicy, AxPolicy.class, jsonMode));
} else {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + key.getID() + DOES_NOT_EXIST);
+ CONCEPT + key.getId() + DOES_NOT_EXIST);
}
}
@@ -291,7 +291,7 @@ public class PolicyFacade {
if (policy.getStateMap().containsKey(refKey.getLocalName())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- CONCEPT + refKey.getID() + ALREADY_EXISTS);
+ CONCEPT + refKey.getId() + ALREADY_EXISTS);
}
final AxEvent triggerEvent = apexModel.getPolicyModel().getEvents().get(triggerName, triggerVersion);
@@ -345,7 +345,7 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
if (triggerName != null) {
@@ -401,7 +401,7 @@ public class PolicyFacade {
} else {
if (policy.getStateMap().size() == 0) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no states defined on policy " + policy.getKey().getID());
+ "no states defined on policy " + policy.getKey().getId());
}
final ApexAPIResult result = new ApexAPIResult();
for (final AxState state : policy.getStateMap().values()) {
@@ -445,7 +445,7 @@ public class PolicyFacade {
} else {
if (policy.getStateMap().size() == 0) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no states defined on policy " + policy.getKey().getID());
+ "no states defined on policy " + policy.getKey().getId());
}
for (final AxState state : policy.getStateMap().values()) {
result.addMessage(
@@ -484,7 +484,7 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
// There is only one logic item associated with a state so we use a hard coded logic
@@ -493,7 +493,7 @@ public class PolicyFacade {
if (!state.getTaskSelectionLogic().getKey().getLocalName().equals(AxKey.NULL_KEY_NAME)) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- CONCEPT + refKey.getID() + ALREADY_EXISTS);
+ CONCEPT + refKey.getId() + ALREADY_EXISTS);
}
state.setTaskSelectionLogic(new AxTaskSelectionLogic(refKey, logicFlavour, logic));
@@ -527,12 +527,12 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
if (state.getTaskSelectionLogic().getKey().getLocalName().equals(AxKey.NULL_KEY_NAME)) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + state.getTaskSelectionLogic().getKey().getID() + DOES_NOT_EXIST);
+ CONCEPT + state.getTaskSelectionLogic().getKey().getId() + DOES_NOT_EXIST);
}
final AxTaskSelectionLogic taskSelectionLogic = state.getTaskSelectionLogic();
@@ -571,7 +571,7 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
return new ApexAPIResult(ApexAPIResult.RESULT.SUCCESS,
@@ -604,12 +604,12 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
if (state.getTaskSelectionLogic().getKey().getLocalName().equals(AxKey.NULL_KEY_NAME)) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + state.getTaskSelectionLogic().getKey().getID() + DOES_NOT_EXIST);
+ CONCEPT + state.getTaskSelectionLogic().getKey().getId() + DOES_NOT_EXIST);
}
final ApexAPIResult result = new ApexAPIResult();
@@ -651,13 +651,13 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "State concept " + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ "State concept " + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
final AxReferenceKey refKey = new AxReferenceKey(state.getKey(), outputName);
if (state.getStateOutputs().containsKey(refKey.getLocalName())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- "Output concept " + refKey.getID() + ALREADY_EXISTS);
+ "Output concept " + refKey.getId() + ALREADY_EXISTS);
}
final AxEvent event = apexModel.getPolicyModel().getEvents().get(eventName, eventVersion);
@@ -676,7 +676,7 @@ public class PolicyFacade {
if (!policy.getStateMap().containsKey(nextState)) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "Next state concept " + nextStateKey.getID() + DOES_NOT_EXIST);
+ "Next state concept " + nextStateKey.getId() + DOES_NOT_EXIST);
}
}
@@ -710,7 +710,7 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
if (outputName != null) {
@@ -721,12 +721,12 @@ public class PolicyFacade {
AxStateOutput.class, jsonMode));
} else {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + state.getKey().getID() + ':' + outputName + DOES_NOT_EXIST);
+ CONCEPT + state.getKey().getId() + ':' + outputName + DOES_NOT_EXIST);
}
} else {
if (state.getStateOutputs().size() == 0) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no state output concepts exist for state " + state.getKey().getID());
+ "no state output concepts exist for state " + state.getKey().getId());
}
final ApexAPIResult result = new ApexAPIResult();
@@ -765,7 +765,7 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
if (outputName != null) {
@@ -778,12 +778,12 @@ public class PolicyFacade {
return result;
} else {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + state.getKey().getID() + ':' + outputName + DOES_NOT_EXIST);
+ CONCEPT + state.getKey().getId() + ':' + outputName + DOES_NOT_EXIST);
}
} else {
if (state.getStateOutputs().size() == 0) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no state output concepts exist for state " + state.getKey().getID());
+ "no state output concepts exist for state " + state.getKey().getId());
}
final ApexAPIResult result = new ApexAPIResult();
@@ -827,14 +827,14 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
final AxReferenceKey refKey = new AxReferenceKey(state.getKey(), finalizerLogicName);
if (state.getStateFinalizerLogicMap().containsKey(refKey.getLocalName())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- CONCEPT + refKey.getID() + ALREADY_EXISTS);
+ CONCEPT + refKey.getId() + ALREADY_EXISTS);
}
state.getStateFinalizerLogicMap().put(finalizerLogicName,
@@ -872,7 +872,7 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
final AxReferenceKey refKey = new AxReferenceKey(state.getKey(), finalizerLogicName);
@@ -880,7 +880,7 @@ public class PolicyFacade {
state.getStateFinalizerLogicMap().get(refKey.getKey().getLocalName());
if (stateFinalizerLogic == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- STATE_FINALIZER_LOGIC + refKey.getID() + DOES_NOT_EXIST);
+ STATE_FINALIZER_LOGIC + refKey.getId() + DOES_NOT_EXIST);
}
if (logicFlavour != null) {
@@ -919,7 +919,7 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
if (finalizerLogicName != null) {
@@ -928,7 +928,7 @@ public class PolicyFacade {
state.getStateFinalizerLogicMap().get(refKey.getKey().getLocalName());
if (stateFinalizerLogic == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- STATE_FINALIZER_LOGIC + refKey.getID() + DOES_NOT_EXIST);
+ STATE_FINALIZER_LOGIC + refKey.getId() + DOES_NOT_EXIST);
}
return new ApexAPIResult(ApexAPIResult.RESULT.SUCCESS,
@@ -937,7 +937,7 @@ public class PolicyFacade {
} else {
if (state.getStateFinalizerLogicMap().size() == 0) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no state finalizer logic defined on state " + state.getKey().getID());
+ "no state finalizer logic defined on state " + state.getKey().getId());
}
final ApexAPIResult result = new ApexAPIResult();
for (final AxStateFinalizerLogic stateFinalizerLogic : state.getStateFinalizerLogicMap().values()) {
@@ -974,7 +974,7 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
if (finalizerLogicName != null) {
@@ -983,7 +983,7 @@ public class PolicyFacade {
state.getStateFinalizerLogicMap().get(refKey.getKey().getLocalName());
if (stateFinalizerLogic == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- STATE_FINALIZER_LOGIC + refKey.getID() + DOES_NOT_EXIST);
+ STATE_FINALIZER_LOGIC + refKey.getId() + DOES_NOT_EXIST);
}
final ApexAPIResult result = new ApexAPIResult();
@@ -994,7 +994,7 @@ public class PolicyFacade {
} else {
if (state.getStateFinalizerLogicMap().size() == 0) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no state finalizer logic defined on state " + state.getKey().getID());
+ "no state finalizer logic defined on state " + state.getKey().getId());
}
final ApexAPIResult result = new ApexAPIResult();
@@ -1042,7 +1042,7 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
final AxTask task = apexModel.getPolicyModel().getTasks().get(taskName, taskVersion);
@@ -1052,7 +1052,7 @@ public class PolicyFacade {
}
if (state.getTaskReferences().containsKey(task.getKey())) {
- return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS, "task " + task.getKey().getID()
+ return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS, "task " + task.getKey().getId()
+ " already has reference with output " + state.getTaskReferences().get(task.getKey()));
}
@@ -1070,12 +1070,12 @@ public class PolicyFacade {
if (stateTaskOutputType.equals(AxStateTaskOutputType.DIRECT)) {
if (!state.getStateOutputs().containsKey(outputRefKey.getLocalName())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "state output concept " + outputRefKey.getID() + DOES_NOT_EXIST);
+ "state output concept " + outputRefKey.getId() + DOES_NOT_EXIST);
}
} else if (stateTaskOutputType.equals(AxStateTaskOutputType.LOGIC)) {
if (!state.getStateFinalizerLogicMap().containsKey(outputRefKey.getLocalName())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "state finalizer logic concept " + outputRefKey.getID() + DOES_NOT_EXIST);
+ "state finalizer logic concept " + outputRefKey.getId() + DOES_NOT_EXIST);
}
} else {
return new ApexAPIResult(ApexAPIResult.RESULT.FAILED, "output type " + outputType + " invalid");
@@ -1114,7 +1114,7 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
final ApexAPIResult result = new ApexAPIResult();
@@ -1138,7 +1138,7 @@ public class PolicyFacade {
return result;
} else {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no task references found for state " + state.getKey().getID());
+ "no task references found for state " + state.getKey().getId());
}
} catch (final Exception e) {
return new ApexAPIResult(ApexAPIResult.RESULT.FAILED, e);
@@ -1169,7 +1169,7 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
final Set<AxArtifactKey> deleteSet = new TreeSet<>();
@@ -1183,7 +1183,7 @@ public class PolicyFacade {
}
if (deleteSet.isEmpty()) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + taskName + ':' + taskVersion + DOES_NOT_EXIST_ON_STATE + state.getKey().getID());
+ CONCEPT + taskName + ':' + taskVersion + DOES_NOT_EXIST_ON_STATE + state.getKey().getId());
}
final ApexAPIResult result = new ApexAPIResult();
@@ -1223,7 +1223,7 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
final AxContextAlbum contextAlbum =
@@ -1235,7 +1235,7 @@ public class PolicyFacade {
if (state.getContextAlbumReferences().contains(contextAlbum.getKey())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS, "concept album reference for concept "
- + contextAlbum.getKey().getID() + " already exists in state");
+ + contextAlbum.getKey().getId() + " already exists in state");
}
state.getContextAlbumReferences().add(contextAlbum.getKey());
@@ -1271,7 +1271,7 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
final ApexAPIResult result = new ApexAPIResult();
@@ -1287,7 +1287,7 @@ public class PolicyFacade {
}
if (!found) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST, CONCEPT + contextAlbumName + ':'
- + contextAlbumVersion + DOES_NOT_EXIST_ON_STATE + state.getKey().getID());
+ + contextAlbumVersion + DOES_NOT_EXIST_ON_STATE + state.getKey().getId());
}
return result;
} catch (final Exception e) {
@@ -1321,7 +1321,7 @@ public class PolicyFacade {
final AxState state = policy.getStateMap().get(stateName);
if (state == null) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + policy.getKey().getID() + ':' + stateName + DOES_NOT_EXIST);
+ CONCEPT + policy.getKey().getId() + ':' + stateName + DOES_NOT_EXIST);
}
final Set<AxArtifactKey> deleteSet = new TreeSet<>();
@@ -1337,7 +1337,7 @@ public class PolicyFacade {
}
if (deleteSet.isEmpty()) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST, CONCEPT + contextAlbumName + ':'
- + contextAlbumVersion + DOES_NOT_EXIST_ON_STATE + state.getKey().getID());
+ + contextAlbumVersion + DOES_NOT_EXIST_ON_STATE + state.getKey().getId());
}
final ApexAPIResult result = new ApexAPIResult();
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/TaskFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/TaskFacade.java
index dd00da7d4..5cb2e7475 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/TaskFacade.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/TaskFacade.java
@@ -101,7 +101,7 @@ public class TaskFacade {
}
if (apexModel.getPolicyModel().getTasks().getTaskMap().containsKey(key)) {
- return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS, CONCEPT + key.getID() + ALREADY_EXISTS);
+ return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS, CONCEPT + key.getId() + ALREADY_EXISTS);
}
apexModel.getPolicyModel().getTasks().getTaskMap().put(key, new AxTask(key));
@@ -182,7 +182,7 @@ public class TaskFacade {
new ApexModelStringWriter<AxTask>(false).writeString(removedTask, AxTask.class, jsonMode));
} else {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + key.getID() + DOES_NOT_EXIST);
+ CONCEPT + key.getId() + DOES_NOT_EXIST);
}
}
@@ -256,7 +256,7 @@ public class TaskFacade {
if (!task.getTaskLogic().getKey().getLocalName().equals(AxKey.NULL_KEY_NAME)) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- CONCEPT + refKey.getID() + ALREADY_EXISTS);
+ CONCEPT + refKey.getId() + ALREADY_EXISTS);
}
task.setTaskLogic(new AxTaskLogic(refKey, logicFlavour, logic));
@@ -286,7 +286,7 @@ public class TaskFacade {
if (task.getTaskLogic().getKey().getLocalName().equals(AxKey.NULL_KEY_NAME)) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + task.getTaskLogic().getKey().getID() + DOES_NOT_EXIST);
+ CONCEPT + task.getTaskLogic().getKey().getId() + DOES_NOT_EXIST);
}
final AxTaskLogic taskLogic = task.getTaskLogic();
@@ -342,7 +342,7 @@ public class TaskFacade {
if (task.getTaskLogic().getKey().getLocalName().equals(AxKey.NULL_KEY_NAME)) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- CONCEPT + task.getTaskLogic().getKey().getID() + DOES_NOT_EXIST);
+ CONCEPT + task.getTaskLogic().getKey().getId() + DOES_NOT_EXIST);
}
final ApexAPIResult result = new ApexAPIResult();
@@ -383,7 +383,7 @@ public class TaskFacade {
if (task.getInputFields().containsKey(refKey.getLocalName())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- CONCEPT + refKey.getID() + ALREADY_EXISTS);
+ CONCEPT + refKey.getId() + ALREADY_EXISTS);
}
final AxContextSchema schema =
@@ -430,7 +430,7 @@ public class TaskFacade {
} else {
if (task.getInputFields().size() == 0) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no input fields defined on task " + task.getKey().getID());
+ "no input fields defined on task " + task.getKey().getId());
}
final ApexAPIResult result = new ApexAPIResult();
@@ -476,7 +476,7 @@ public class TaskFacade {
} else {
if (task.getInputFields().size() == 0) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no input fields defined on task " + task.getKey().getID());
+ "no input fields defined on task " + task.getKey().getId());
}
for (final AxInputField field : task.getInputFields().values()) {
@@ -520,7 +520,7 @@ public class TaskFacade {
if (task.getOutputFields().containsKey(refKey.getLocalName())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- CONCEPT + refKey.getID() + ALREADY_EXISTS);
+ CONCEPT + refKey.getId() + ALREADY_EXISTS);
}
final AxContextSchema schema =
@@ -567,7 +567,7 @@ public class TaskFacade {
} else {
if (task.getOutputFields().size() == 0) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no output fields defined on task " + task.getKey().getID());
+ "no output fields defined on task " + task.getKey().getId());
}
final ApexAPIResult result = new ApexAPIResult();
@@ -612,7 +612,7 @@ public class TaskFacade {
} else {
if (task.getOutputFields().size() == 0) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no output fields defined on task " + task.getKey().getID());
+ "no output fields defined on task " + task.getKey().getId());
}
for (final AxOutputField field : task.getOutputFields().values()) {
@@ -651,7 +651,7 @@ public class TaskFacade {
if (task.getTaskParameters().containsKey(refKey.getLocalName())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS,
- CONCEPT + refKey.getID() + ALREADY_EXISTS);
+ CONCEPT + refKey.getId() + ALREADY_EXISTS);
}
task.getTaskParameters().put(refKey.getLocalName(), new AxTaskParameter(refKey, defaultValue));
@@ -690,7 +690,7 @@ public class TaskFacade {
} else {
if (task.getTaskParameters().size() == 0) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no task parameters defined on task " + task.getKey().getID());
+ "no task parameters defined on task " + task.getKey().getId());
}
final ApexAPIResult result = new ApexAPIResult();
@@ -735,7 +735,7 @@ public class TaskFacade {
} else {
if (task.getTaskParameters().size() == 0) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_DOES_NOT_EXIST,
- "no task parameters defined on task " + task.getKey().getID());
+ "no task parameters defined on task " + task.getKey().getId());
}
for (final AxTaskParameter parameter : task.getTaskParameters().values()) {
@@ -778,7 +778,7 @@ public class TaskFacade {
if (task.getContextAlbumReferences().contains(contextAlbum.getKey())) {
return new ApexAPIResult(ApexAPIResult.RESULT.CONCEPT_EXISTS, "context album reference for concept "
- + contextAlbum.getKey().getID() + " already exists in task");
+ + contextAlbum.getKey().getId() + " already exists in task");
}
task.getContextAlbumReferences().add(contextAlbum.getKey());
diff --git a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/TestApexModelAPI.java b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/TestApexModelAPI.java
index 68341249c..c3521d307 100644
--- a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/TestApexModelAPI.java
+++ b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/TestApexModelAPI.java
@@ -35,7 +35,7 @@ import java.util.UUID;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.apex.model.basicmodel.dao.DAOParameters;
+import org.onap.policy.apex.model.basicmodel.dao.DaoParameters;
import org.onap.policy.apex.model.modelapi.impl.ApexModelImpl;
import org.onap.policy.apex.model.utilities.TextFileUtils;
@@ -114,29 +114,29 @@ public class TestApexModelAPI {
ApexAPIResult result = apexModel.loadFromFile("src/test/resources/models/PolicyModel.json");
assertTrue(result.getResult().equals(ApexAPIResult.RESULT.SUCCESS));
- final DAOParameters daoParameters = new DAOParameters();
- daoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
- daoParameters.setPersistenceUnit("DAOTest");
+ final DaoParameters DaoParameters = new DaoParameters();
+ DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
+ DaoParameters.setPersistenceUnit("DAOTest");
- result = apexModel.saveToDatabase(daoParameters);
+ result = apexModel.saveToDatabase(DaoParameters);
assertTrue(result.getResult().equals(ApexAPIResult.RESULT.SUCCESS));
result = apexModel.deleteModel();
assertTrue(result.getResult().equals(ApexAPIResult.RESULT.SUCCESS));
- result = apexModel.loadFromDatabase("PolicyModel", "0.0.1", daoParameters);
+ result = apexModel.loadFromDatabase("PolicyModel", "0.0.1", DaoParameters);
assertTrue(result.getResult().equals(ApexAPIResult.RESULT.SUCCESS));
result = apexModel.deleteModel();
assertTrue(result.getResult().equals(ApexAPIResult.RESULT.SUCCESS));
- result = apexModel.loadFromDatabase("PolicyModel", null, daoParameters);
+ result = apexModel.loadFromDatabase("PolicyModel", null, DaoParameters);
assertTrue(result.getResult().equals(ApexAPIResult.RESULT.SUCCESS));
result = apexModel.deleteModel();
assertTrue(result.getResult().equals(ApexAPIResult.RESULT.SUCCESS));
- result = apexModel.loadFromDatabase("VPNPolicyModel", "0.0.1", daoParameters);
+ result = apexModel.loadFromDatabase("VPNPolicyModel", "0.0.1", DaoParameters);
assertTrue(result.getResult().equals(ApexAPIResult.RESULT.FAILED));
}
diff --git a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/TestModelHandlerFacade.java b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/TestModelHandlerFacade.java
index f13b8dfd5..7439cd328 100644
--- a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/TestModelHandlerFacade.java
+++ b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/TestModelHandlerFacade.java
@@ -29,7 +29,7 @@ import java.io.IOException;
import java.util.Properties;
import org.junit.Test;
-import org.onap.policy.apex.model.basicmodel.dao.DAOParameters;
+import org.onap.policy.apex.model.basicmodel.dao.DaoParameters;
import org.onap.policy.apex.model.modelapi.impl.ModelHandlerFacade;
import org.onap.policy.apex.model.utilities.TextFileUtils;
@@ -77,17 +77,17 @@ public class TestModelHandlerFacade {
result = mhf.loadFromString(modelString);
assertEquals(ApexAPIResult.RESULT.CONCEPT_EXISTS, result.getResult());
- final DAOParameters daoParameters = new DAOParameters();
- result = mhf.loadFromDatabase("SomeModel", null, daoParameters);
+ final DaoParameters DaoParameters = new DaoParameters();
+ result = mhf.loadFromDatabase("SomeModel", null, DaoParameters);
assertEquals(ApexAPIResult.RESULT.CONCEPT_EXISTS, result.getResult());
result = apexModel.deleteModel();
assertEquals(ApexAPIResult.RESULT.SUCCESS, result.getResult());
- result = mhf.loadFromDatabase("SomeModel", null, daoParameters);
+ result = mhf.loadFromDatabase("SomeModel", null, DaoParameters);
assertEquals(ApexAPIResult.RESULT.FAILED, result.getResult());
- result = mhf.saveToDatabase(daoParameters);
+ result = mhf.saveToDatabase(DaoParameters);
assertEquals(ApexAPIResult.RESULT.FAILED, result.getResult());
result = mhf.readFromURL("blah://somewhere/over/the/rainbow");
diff --git a/model/model-api/src/test/resources/META-INF/persistence.xml b/model/model-api/src/test/resources/META-INF/persistence.xml
index 3db74174c..f834e0f49 100644
--- a/model/model-api/src/test/resources/META-INF/persistence.xml
+++ b/model/model-api/src/test/resources/META-INF/persistence.xml
@@ -23,8 +23,8 @@
<persistence-unit name="DAOTest" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
- <class>org.onap.policy.apex.model.basicmodel.dao.converters.CDATAConditioner</class>
- <class>org.onap.policy.apex.model.basicmodel.dao.converters.UUID2String</class>
+ <class>org.onap.policy.apex.model.basicmodel.dao.converters.CDataConditioner</class>
+ <class>org.onap.policy.apex.model.basicmodel.dao.converters.Uuid2String</class>
<class>org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey</class>
<class>org.onap.policy.apex.model.basicmodel.concepts.AxConcept</class>
<class>org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo</class>