/*-
* ============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.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
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 policy container and holds a map of the policies for an entire Apex model. All Apex models that use
* policies must have an {@link AxPolicies} field. The {@link AxPolicies} class implements the helper methods of the
* {@link AxConceptGetter} interface to allow {@link AxPolicy} 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 policies are defined in the
* container. Each policy 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 policy entry is then validated individually.
/**
* Copy constructor.
- *
+ *
* @param copyConcept the concept to copy from
*/
public AxPolicies(final AxPolicies copyConcept) {
policyMap = navigablePolicyMap;
}
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKey()
+ /**
+ * {@inheritDoc}.
*/
@Override
public AxArtifactKey getKey() {
return key;
}
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKeys()
+ /**
+ * {@inheritDoc}.
*/
@Override
public List<AxKey> getKeys() {
this.policyMap.putAll(policyMap);
}
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.
- * basicmodel.concepts.AxValidationResult)
+ /**
+ * {@inheritDoc}.
*/
@Override
public AxValidationResult validate(final AxValidationResult resultIn) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#clean()
+ /**
+ * {@inheritDoc}.
*/
@Override
public void clean() {
}
}
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#toString()
+ /**
+ * {@inheritDoc}.
*/
@Override
public String toString() {
return builder.toString();
}
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.
- * basicmodel.concepts.AxConcept)
+ /**
+ * {@inheritDoc}.
*/
@Override
public AxConcept copyTo(final AxConcept targetObject) {
return copy;
}
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#hashCode()
+ /**
+ * {@inheritDoc}.
*/
@Override
public int hashCode() {
return result;
}
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#equals(java.lang.Object)
+ /**
+ * {@inheritDoc}.
*/
@Override
public boolean equals(final Object obj) {
return policyMap.equals(other.policyMap);
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Comparable#compareTo(java.lang.Object)
+ /**
+ * {@inheritDoc}.
*/
@Override
public int compareTo(final AxConcept otherObj) {
return 0;
}
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#get(org.onap.policy.apex.model
- * .basicmodel.concepts.AxArtifactKey)
+ /**
+ * {@inheritDoc}.
*/
@Override
public AxPolicy get(final AxArtifactKey conceptKey) {
return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxPolicy>) policyMap).get(conceptKey);
}
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#get(java.lang.String)
+ /**
+ * {@inheritDoc}.
*/
@Override
public AxPolicy get(final String conceptKeyName) {
return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxPolicy>) policyMap).get(conceptKeyName);
}
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#get(java.lang.String, java.lang.String)
+ /**
+ * {@inheritDoc}.
*/
@Override
public AxPolicy get(final String conceptKeyName, final String conceptKeyVersion) {
conceptKeyVersion);
}
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#getAll(java.lang.String)
+ /**
+ * {@inheritDoc}.
*/
@Override
public Set<AxPolicy> getAll(final String conceptKeyName) {
return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxPolicy>) policyMap).getAll(conceptKeyName);
}
- /*
- * (non-Javadoc)
- *
- * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#getAll(java.lang.String, java.lang.String)
+ /**
+ * {@inheritDoc}.
*/
@Override
public Set<AxPolicy> getAll(final String conceptKeyName, final String conceptKeyVersion) {