summaryrefslogtreecommitdiffstats
path: root/context/context-management/src/main/java/org/onap/policy/apex/context/impl/ContextAlbumImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'context/context-management/src/main/java/org/onap/policy/apex/context/impl/ContextAlbumImpl.java')
-rw-r--r--context/context-management/src/main/java/org/onap/policy/apex/context/impl/ContextAlbumImpl.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/ContextAlbumImpl.java b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/ContextAlbumImpl.java
index a68271609..fbaeb2c91 100644
--- a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/ContextAlbumImpl.java
+++ b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/ContextAlbumImpl.java
@@ -79,6 +79,10 @@ public final class ContextAlbumImpl implements ContextAlbum {
*/
public ContextAlbumImpl(final AxContextAlbum albumDefinition, final Distributor distributor,
final Map<String, Object> albumMap) throws ContextException {
+ Assertions.argumentNotNull(albumDefinition, "Context album definition may not be null");
+ Assertions.argumentNotNull(distributor, "Distributor may not be null");
+ Assertions.argumentNotNull(albumMap, "Album map may not be null");
+
this.albumDefinition = albumDefinition;
// Use the context distributor passed to us
@@ -194,6 +198,17 @@ public final class ContextAlbumImpl implements ContextAlbum {
* (non-Javadoc)
*
* @see
+ * org.onap.policy.apex.context.ContextAlbum#getUserArtifactStack()
+ */
+ @Override
+ public AxConcept[] getUserArtifactStack() {
+ return userArtifactStack;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
* org.onap.policy.apex.context.ContextAlbum#setUserArtifactStack(org.onap.policy.apex.model.basicmodel.concepts.
* AxConcept [])
*/
@@ -440,7 +455,7 @@ public final class ContextAlbumImpl implements ContextAlbum {
public Object remove(final Object key) {
if (!albumDefinition.isWritable()) {
final String returnString = "album \"" + albumDefinition.getID()
- + "\" remove() not allowed on read only albums for key=\"" + key;
+ + "\" remove() not allowed on read only albums for key=\"" + key + "\"";
LOGGER.warn(returnString);
throw new ContextRuntimeException(returnString);
}