aboutsummaryrefslogtreecommitdiffstats
path: root/model/context-model/src/main
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/context-model/src/main
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/context-model/src/main')
-rw-r--r--model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbum.java13
-rw-r--r--model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbums.java5
-rw-r--r--model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextModel.java5
-rw-r--r--model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java7
-rw-r--r--model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchemas.java5
5 files changed, 20 insertions, 15 deletions
diff --git a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbum.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbum.java
index 3d008e992..e27bf78e8 100644
--- a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbum.java
+++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbum.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,25 +43,25 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxKeyUse;
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 used to define an album of context.
- *
+ *
* <p>A context album is a distributed map of context that will be distributed across all process instances that require
* access to it. This class defines the schema (structure) of the items in the context album, whether the items on the
* context album are writable or not, and what the scope of the context album is.
- *
+ *
* <p>The structure of items (objects) the context album is defined as a schema, which is understood by whatever schema
* implementation is being used for the context album.
- *
+ *
* <p>The scope of a context album is a string field, understood by whatever distribution mechanism is being used for
* the context album. The distribution mechanism uses the scope of the context album to decide to which executable
* entities a given context album is distributed.
- *
+ *
* <p>The writable flag on a context album defines whether users of a context album can write to the context album or
* just read objects from the context album.
- *
+ *
* <p>Validation checks that the album key and the context schema key are not null and that the scope field is not
* undefined and matches the regular expression SCOPE_REGEXP.
*/
diff --git a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbums.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbums.java
index cd452cae1..ddf363ed3 100644
--- a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbums.java
+++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbums.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 a context album container and holds a map of the context albums for an entire Apex model. All Apex
* models that use context albums must have an {@link AxContextAlbums} field. The {@link AxContextAlbums} class
* implements the helper methods of the {@link AxConceptGetter} interface to allow {@link AxContextAlbum} 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 observation is issued if no context albums are defined in
* the container. If context albums do exist, they are checked to ensure that keys and values are not null and that the
* map key matches the key in the map value for all album entries. Each context album entry is then validated
diff --git a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextModel.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextModel.java
index 56983f37b..b2139f893 100644
--- a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextModel.java
+++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextModel.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.
@@ -41,14 +42,14 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation;
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.utilities.Assertions;
+import org.onap.policy.common.utils.validation.Assertions;
/**
* A container class for an Apex context model. This class is a container class that allows an Apex model to be
* constructed that just contains context and the key information for that context. The model contains schema
* definitions and the definitions of context albums that use those schemas. In the case where Apex context is being
* used without policy or independent of policy, an Apex context model is sufficient to get Apex context working.
- *
+ *
* <p>Validation runs {@link AxModel} validation on the model. In addition, the {@link AxContextSchemas} and
* {@link AxContextAlbums} validation is run on the context schemas and albums in the model.
*/
diff --git a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java
index 767b1d02e..f2e3dc3cf 100644
--- a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java
+++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.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.
@@ -41,7 +42,7 @@ 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.dao.converters.CDataConditioner;
-import org.onap.policy.apex.model.utilities.Assertions;
+import org.onap.policy.common.utils.validation.Assertions;
/**
* This class holds a data schema definition in Apex. A data schema describes the structure of a single atom of data
@@ -50,13 +51,13 @@ import org.onap.policy.apex.model.utilities.Assertions;
* schema flavour defines the type of schema being defined and the schema itself defines the schema. The schema flavour
* is used by Apex to look up and load a plugin class that understands and interprets the schema definition and can
* create instances of classes for the schema.
- *
+ *
* <p>An {@link AxContextSchema} is used to define each parameter in Apex events, the messages that enter, exit, and are
* passed internally in Apex. In addition, an Apex {@link AxContextAlbum} instances hold a map of
* {@link AxContextSchema} instances to represent the context being managed as an {@link AxContextAlbum}. For example,
* the state of all cells in a mobile network might be represented as an {@link AxContextAlbum} with its
* {@link AxContextSchema} being defined as @code cell} objects.
- *
+ *
* <p>Validation checks that the schema key is not null. It also checks that the schema flavour is defined and matches
* the regular expression SCHEMA_FLAVOUR_REGEXP. Finally, validation checks that the defined schema is not a blank or
* empty string.
diff --git a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchemas.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchemas.java
index 2b31aa425..b2456bfbf 100644
--- a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchemas.java
+++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchemas.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 a context schema container and holds a map of the context schemas for an entire Apex model. All Apex
* models that use context schemas must have an {@link AxContextSchemas} field. The {@link AxContextSchemas} class
* implements the helper methods of the {@link AxConceptGetter} interface to allow {@link AxContextSchema} 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 context schemas are defined in the
* container. Each context schema 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 context schema entry is then validated individually.