summaryrefslogtreecommitdiffstats
path: root/model/event-model
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-03-19 01:16:38 +0000
committerliamfallon <liam.fallon@est.tech>2019-03-19 01:16:38 +0000
commit923a9943a1d59a9d1e87d24490eea78fa9869de7 (patch)
tree23558e0aa07330a29b2d102740ec87785625d273 /model/event-model
parentb804d0b81b2f6be2561b7606cf67fbad37928307 (diff)
Use Assertions class from policy-common
Change import line in all classes that use the Assertions class, there are a lot of them. Issue-ID: POLICY-1264 Change-Id: I8480264be4e36348b3fc63acf1bc36e9c9dd250b Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'model/event-model')
-rw-r--r--model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvent.java11
-rw-r--r--model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEventModel.java5
-rw-r--r--model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvents.java5
-rw-r--r--model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxField.java7
4 files changed, 16 insertions, 12 deletions
diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvent.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvent.java
index 099ee2260..c83b7b86a 100644
--- a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvent.java
+++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvent.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -47,24 +48,24 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationMessage;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
-import org.onap.policy.apex.model.utilities.Assertions;
+import org.onap.policy.common.utils.validation.Assertions;
/**
* This class defines an Apex event. An {@link AxEvent} is used to kick off execution of policies in Apex and is emitted
* by policies when they completer execution. In addition, Apex uses {@link AxEvent} instances internally to pass
* control from one Apex state to the next during execution.
- *
+ *
* <p>The {@link AxArtifactKey} of an event uniquely identifies it in an Apex system and the name field in the key is
* the name of the event.
- *
+ *
* <p>Each {@link AxEvent} has a name space, which is usually set to identify the domain of application of an event. For
* example a 4G cell power event might have the name space {@code org.onap.radio.4g} and the name {@code PowerEvent}.
* The source and target of the event are reserved to hold an identifier that defines the sender and receiver of an
* event respectively. The definition and structure of these fields is reserved for future use and their use by
* applications is currently not recommended.
- *
+ *
* <p>The parameters that an event has are defined as a map of {@link AxField} instances.
- *
+ *
* <p>Validation checks that the event key is valid. If name space is a blank string, a warning is issued. Blank source
* or target fields result in observations being issued. An event may not have any parameters. If it has parameters, the
* name and value of each parameter entry is checked to ensure they are not null. Then the local name of each parameter
diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEventModel.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEventModel.java
index cab46cd39..69ae01acf 100644
--- a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEventModel.java
+++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEventModel.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,13 +43,13 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.basicmodel.service.ModelService;
import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas;
-import org.onap.policy.apex.model.utilities.Assertions;
+import org.onap.policy.common.utils.validation.Assertions;
/**
* A container class for an Apex event model. This class is a container class that allows an Apex model to be
* constructed that contains events and context and the key information for those events and context. The model contains
* schema definitions and the definitions of events that use those schemas.
- *
+ *
* <p>Validation runs {@link AxModel} validation on the model. In addition, the {@link AxContextSchemas} and
* {@link AxEvents} validation is run on the context schemas and events in the model.
*/
diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvents.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvents.java
index e973f2ead..4ec3af3b3 100644
--- a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvents.java
+++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvents.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,14 +49,14 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationMessage;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
-import org.onap.policy.apex.model.utilities.Assertions;
+import org.onap.policy.common.utils.validation.Assertions;
/**
* This class is an event container and holds a map of the events for an entire Apex model. All Apex models that use
* events must have an {@link AxEvents} field. The {@link AxEvents} class implements the helper methods of the
* {@link AxConceptGetter} interface to allow {@link AxEvents} instances to be retrieved by calling methods directly on
* this class without referencing the contained map.
- *
+ *
* <p>Validation checks that the container key is not null. An error is issued if no events are defined in the
* container. Each event entry is checked to ensure that its key and value are not null and that the key matches the key
* in the map value. Each event entry is then validated individually.
diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxField.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxField.java
index 6b38ca7a8..300f6beb5 100644
--- a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxField.java
+++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxField.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -47,16 +48,16 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxValidationMessage;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
import org.onap.policy.apex.model.basicmodel.xml.AxReferenceKeyAdapter;
-import org.onap.policy.apex.model.utilities.Assertions;
+import org.onap.policy.common.utils.validation.Assertions;
/**
* In Apex, a field is an input or output parameter to or from a concept. For example, the parameters of an event are
* fields and the input and output of a task is defined as a collection of fields.
- *
+ *
* <p>A field has an {@link AxReferenceKey} key that defines its name and parent, and a {@link AxArtifactKey} key to a
* context schema that defines the structure of the data atom that holds the value of the field. Fields can be specified
* as being optional but are mandatory by default.
- *
+ *
* <p>Validation checks that the field key and the field schema reference key are not null.
*/
@Entity