Introduce tosca saving
[clamp.git] / src / main / java / org / onap / clamp / clds / model / CldsEvent.java
index 3b9c1d2..8d3807b 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP CLAMP
  * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
  *                             reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,7 +18,7 @@
  * limitations under the License.
  * ============LICENSE_END============================================
  * ===================================================================
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * 
  */
 
 package org.onap.clamp.clds.model;
@@ -29,34 +29,38 @@ import org.onap.clamp.clds.dao.CldsDao;
  * Represent a CLDS Event.
  */
 public class CldsEvent {
-    public static final String ACTION_TEST            = "TEST";
-    public static final String ACTION_CREATE          = "CREATE";
-    public static final String ACTION_SUBMIT          = "SUBMIT";
+    public static final String ACTION_TEST = "TEST";
+    public static final String ACTION_CREATE = "CREATE";
+    public static final String ACTION_MODIFY = "MODIFY";
+    public static final String ACTION_SUBMIT = "SUBMIT";
     // an update before model is active
-    public static final String ACTION_RESUBMIT        = "RESUBMIT";
+    public static final String ACTION_RESUBMIT = "RESUBMIT";
+    // For simplified models
+    public static final String ACTION_SUBMITDCAE = "SUBMITDCAE";
+    public static final String ACTION_SUBMITPOLICY = "SUBMITPOLICY";
     // only from dcae
-    public static final String ACTION_DISTRIBUTE      = "DISTRIBUTE";
+    public static final String ACTION_DISTRIBUTE = "DISTRIBUTE";
     // only from dcae
-    public static final String ACTION_DEPLOY          = "DEPLOY";
+    public static final String ACTION_DEPLOY = "DEPLOY";
     // only from dcae
-    public static final String ACTION_UNDEPLOY        = "UNDEPLOY";
-    public static final String ACTION_UPDATE          = "UPDATE";
-    public static final String ACTION_DELETE          = "DELETE";
-    public static final String ACTION_STOP            = "STOP";
-    public static final String ACTION_RESTART         = "RESTART";
+    public static final String ACTION_UNDEPLOY = "UNDEPLOY";
+    public static final String ACTION_UPDATE = "UPDATE";
+    public static final String ACTION_DELETE = "DELETE";
+    public static final String ACTION_STOP = "STOP";
+    public static final String ACTION_RESTART = "RESTART";
 
     public static final String ACTION_STATE_INITIATED = "INITIATED";
-    public static final String ACTION_STATE_SENT      = "SENT";
+    public static final String ACTION_STATE_SENT = "SENT";
     public static final String ACTION_STATE_COMPLETED = "COMPLETED";
-    public static final String ACTION_STATE_RECEIVED  = "RECEIVED";
-    public static final String ACTION_STATE_ERROR     = "ERROR";
-    public static final String ACTION_STATE_ANY       = null;
+    public static final String ACTION_STATE_RECEIVED = "RECEIVED";
+    public static final String ACTION_STATE_ERROR = "ERROR";
+    public static final String ACTION_STATE_ANY = null;
 
-    private String             id;
-    private String             actionCd;
-    private String             actionStateCd;
-    private String             processInstanceId;
-    private String             userid;
+    private String id;
+    private String actionCd;
+    private String actionStateCd;
+    private String processInstanceId;
+    private String userid;
 
     public String getId() {
         return id;
@@ -87,13 +91,14 @@ public class CldsEvent {
      * 
      * @param cldsDao
      * @param model
+     * @param userId
      * @param actionCd
      * @param actionStateCd
      * @param processInstanceId
      * @return
      */
-    public static CldsEvent insEvent(CldsDao cldsDao, CldsModel model, String userId, String actionCd, String actionStateCd,
-            String processInstanceId) {
+    public static CldsEvent insEvent(CldsDao cldsDao, CldsModel model, String userId, String actionCd,
+            String actionStateCd, String processInstanceId) {
         CldsEvent event = new CldsEvent();
         event.setUserid(userId);
         event.setActionCd(actionCd);