TCA: Replace any openecomp reference by onap
[dcaegen2/analytics/tca.git] / dcae-analytics-cdap-plugins / src / main / java / org / onap / dcae / apod / analytics / cdap / plugins / domain / config / tca / SimpleTCAPluginConfig.java
-/*\r
- * ===============================LICENSE_START======================================\r
- *  dcae-analytics\r
- * ================================================================================\r
- *    Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *   You may obtain a copy of the License at\r
- *\r
- *          http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *  ============================LICENSE_END===========================================\r
- */\r
-\r
-package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.tca;\r
-\r
-import co.cask.cdap.api.annotation.Description;\r
-import co.cask.cdap.api.annotation.Macro;\r
-import com.google.common.base.Objects;\r
-import org.openecomp.dcae.apod.analytics.cdap.common.settings.CDAPBasePluginConfig;\r
-\r
-import javax.annotation.Nullable;\r
-\r
-/**\r
- * Simple TCA Plugin Configuration\r
- * <p>\r
- * @author Rajiv Singla . Creation Date: 2/13/2017.\r
- */\r
-public class SimpleTCAPluginConfig extends CDAPBasePluginConfig {\r
-\r
-    private static final long serialVersionUID = 1L;\r
-\r
-    @Description("Field name containing VES Message")\r
-    @Macro\r
-    protected String vesMessageFieldName;\r
-\r
-    @Description("Policy JSON that need to be applied to VES Message")\r
-    @Macro\r
-    protected String policyJson;\r
-\r
-    @Description("Name of the output field that will contain the alert")\r
-    @Macro\r
-    protected String alertFieldName;\r
-\r
-    @Description("Name of the output field that will contain message type: INAPPLICABLE, COMPLIANT, NON_COMPLIANT")\r
-    @Macro\r
-    protected String messageTypeFieldName;\r
-\r
-    @Description("Specifies the output schema")\r
-    protected String schema;\r
-\r
-    @Description("Enables")\r
-    @Nullable\r
-    @Macro\r
-    protected Boolean enableAlertCEFFormat;\r
-\r
-\r
-    /**\r
-     * Creates an instance of TCA Plugin Configs\r
-     *\r
-     * @param vesMessageFieldName Ves message field name from incoming plugin schema\r
-     * @param policyJson TCA Policy Json String\r
-     * @param alertFieldName Alert field name that will be added in TCA plugin output schema\r
-     * @param messageTypeFieldName Message type field name that will be added in TCA plugin output schema\r
-     * @param schema TCA Plugin output schema\r
-     * @param enableAlertCEFFormat enables alert message to be formatted in VES format\r
-     */\r
-    public SimpleTCAPluginConfig(final String vesMessageFieldName, final String policyJson,\r
-                                 final String alertFieldName, final String messageTypeFieldName,\r
-                                 final String schema, final Boolean enableAlertCEFFormat) {\r
-        this.vesMessageFieldName = vesMessageFieldName;\r
-        this.policyJson = policyJson;\r
-        this.alertFieldName = alertFieldName;\r
-        this.messageTypeFieldName = messageTypeFieldName;\r
-        this.schema = schema;\r
-        this.enableAlertCEFFormat = enableAlertCEFFormat;\r
-    }\r
-\r
-    /**\r
-     * Name of the field containing VES Message\r
-     *\r
-     * @return VES Message field name\r
-     */\r
-    public String getVesMessageFieldName() {\r
-        return vesMessageFieldName;\r
-    }\r
-\r
-    /**\r
-     * Policy Json String\r
-     *\r
-     * @return Policy Json String\r
-     */\r
-    public String getPolicyJson() {\r
-        return policyJson;\r
-    }\r
-\r
-\r
-    /**\r
-     * Alert Field name in outgoing schema\r
-     *\r
-     * @return alert field name in outgoing schema\r
-     */\r
-    public String getAlertFieldName() {\r
-        return alertFieldName;\r
-    }\r
-\r
-    /**\r
-     * Returns output schema string\r
-     *\r
-     * @return output schema string\r
-     */\r
-    public String getSchema() {\r
-        return schema;\r
-    }\r
-\r
-    /**\r
-     * Return TCA message type - INAPPLICABLE, COMPLIANT, NON_COMPLIANT\r
-     *\r
-     * @return tca message type\r
-     */\r
-    public String getMessageTypeFieldName() {\r
-        return messageTypeFieldName;\r
-    }\r
-\r
-\r
-    /**\r
-     * Returns if Alert output in Common Event format\r
-     *\r
-     * @return true if alert output is in common event format\r
-     */\r
-    @Nullable\r
-    public Boolean getEnableAlertCEFFormat() {\r
-        return enableAlertCEFFormat;\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-        return Objects.toStringHelper(this)\r
-                .add("referenceName", referenceName)\r
-                .add("vesMessageFieldName", vesMessageFieldName)\r
-                .add("policyJson", policyJson)\r
-                .add("alertFieldName", alertFieldName)\r
-                .add("messageTypeFieldName", messageTypeFieldName)\r
-                .add("schema", schema)\r
-                .add("enableAlertCEFFormat", true)\r
-                .toString();\r
-    }\r
-}\r
+/*
+ * ===============================LICENSE_START======================================
+ *  dcae-analytics
+ * ================================================================================
+ *    Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ *  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.
+ *  ============================LICENSE_END===========================================
+ */
+
+package org.onap.dcae.apod.analytics.cdap.plugins.domain.config.tca;
+
+import co.cask.cdap.api.annotation.Description;
+import co.cask.cdap.api.annotation.Macro;
+import com.google.common.base.Objects;
+import org.onap.dcae.apod.analytics.cdap.common.settings.CDAPBasePluginConfig;
+
+import javax.annotation.Nullable;
+
+/**
+ * Simple TCA Plugin Configuration
+ * <p>
+ * @author Rajiv Singla . Creation Date: 2/13/2017.
+ */
+public class SimpleTCAPluginConfig extends CDAPBasePluginConfig {
+
+    private static final long serialVersionUID = 1L;
+
+    @Description("Field name containing VES Message")
+    @Macro
+    protected String vesMessageFieldName;
+
+    @Description("Policy JSON that need to be applied to VES Message")
+    @Macro
+    protected String policyJson;
+
+    @Description("Name of the output field that will contain the alert")
+    @Macro
+    protected String alertFieldName;
+
+    @Description("Name of the output field that will contain message type: INAPPLICABLE, COMPLIANT, NON_COMPLIANT")
+    @Macro
+    protected String messageTypeFieldName;
+
+    @Description("Specifies the output schema")
+    protected String schema;
+
+    @Description("Enables")
+    @Nullable
+    @Macro
+    protected Boolean enableAlertCEFFormat;
+
+
+    /**
+     * Creates an instance of TCA Plugin Configs
+     *
+     * @param vesMessageFieldName Ves message field name from incoming plugin schema
+     * @param policyJson TCA Policy Json String
+     * @param alertFieldName Alert field name that will be added in TCA plugin output schema
+     * @param messageTypeFieldName Message type field name that will be added in TCA plugin output schema
+     * @param schema TCA Plugin output schema
+     * @param enableAlertCEFFormat enables alert message to be formatted in VES format
+     */
+    public SimpleTCAPluginConfig(final String vesMessageFieldName, final String policyJson,
+                                 final String alertFieldName, final String messageTypeFieldName,
+                                 final String schema, final Boolean enableAlertCEFFormat) {
+        this.vesMessageFieldName = vesMessageFieldName;
+        this.policyJson = policyJson;
+        this.alertFieldName = alertFieldName;
+        this.messageTypeFieldName = messageTypeFieldName;
+        this.schema = schema;
+        this.enableAlertCEFFormat = enableAlertCEFFormat;
+    }
+
+    /**
+     * Name of the field containing VES Message
+     *
+     * @return VES Message field name
+     */
+    public String getVesMessageFieldName() {
+        return vesMessageFieldName;
+    }
+
+    /**
+     * Policy Json String
+     *
+     * @return Policy Json String
+     */
+    public String getPolicyJson() {
+        return policyJson;
+    }
+
+
+    /**
+     * Alert Field name in outgoing schema
+     *
+     * @return alert field name in outgoing schema
+     */
+    public String getAlertFieldName() {
+        return alertFieldName;
+    }
+
+    /**
+     * Returns output schema string
+     *
+     * @return output schema string
+     */
+    public String getSchema() {
+        return schema;
+    }
+
+    /**
+     * Return TCA message type - INAPPLICABLE, COMPLIANT, NON_COMPLIANT
+     *
+     * @return tca message type
+     */
+    public String getMessageTypeFieldName() {
+        return messageTypeFieldName;
+    }
+
+
+    /**
+     * Returns if Alert output in Common Event format
+     *
+     * @return true if alert output is in common event format
+     */
+    @Nullable
+    public Boolean getEnableAlertCEFFormat() {
+        return enableAlertCEFFormat;
+    }
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper(this)
+                .add("referenceName", referenceName)
+                .add("vesMessageFieldName", vesMessageFieldName)
+                .add("policyJson", policyJson)
+                .add("alertFieldName", alertFieldName)
+                .add("messageTypeFieldName", messageTypeFieldName)
+                .add("schema", schema)
+                .add("enableAlertCEFFormat", true)
+                .toString();
+    }
+}