2 * ===============================LICENSE_START======================================
\r
4 * ================================================================================
\r
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============================LICENSE_END===========================================
\r
21 package org.openecomp.dcae.apod.analytics.model;
\r
25 import java.util.LinkedHashMap;
\r
26 import java.util.Map;
\r
30 * Base Dynamic Provider provide functionality so that all the
\r
31 * additional dynamic Properties can be accumalated in a map.
\r
34 * @author Rajiv Singla . Creation Date: 11/5/2016.
\r
37 public abstract class BaseDynamicPropertiesProvider implements DynamicPropertiesProvider {
\r
40 * All non-required properties should be captured in additional properties
\r
42 * @param dynamicProperties Dynamic properties
\r
43 * @return dynamic properties
\r
45 private Map<String, Object> dynamicProperties = new LinkedHashMap<>();
\r
49 * Add a dynamic property to Common Event Format Entity
\r
51 * @param propertyName property name
\r
52 * @param propertyValue property value
\r
55 public void addDynamicProperties(String propertyName, Object propertyValue) {
\r
56 dynamicProperties.put(propertyName, propertyValue);
\r
60 * Determines if dynamic properties are present for the CEF Entity
\r
62 * @return return true if Dynamic Properties are present
\r
64 public boolean isDynamicPropertiesPresent() {
\r
65 return dynamicProperties.size() == 0;
\r