APPS-269 Automate AC for Worm Lock Action

This commit is contained in:
Claudia Agache
2020-07-14 12:29:39 +03:00
parent f973afcc14
commit cbbb8c0389
3 changed files with 16 additions and 1 deletions

View File

@@ -59,4 +59,6 @@ public class FilePlanComponentAspects
//declare version as record aspect
public static final String VERSION_AS_RECORD="rmv:versionRecord";
public static final String ASPECT_STORE_SELECTOR="cm:storeSelector";
}

View File

@@ -49,7 +49,8 @@ public enum ActionsOnRule
SET_PROPERTY_VALUE_RM("setPropertyValue"),
HIDE_RECORD("hide-record"),
DECLARE_VERSION_AS_RECORD("declare-as-version-record"),
DECLARE_AS_RECORD("create-record");
DECLARE_AS_RECORD("create-record"),
WORM_LOCK("worm");
private String actionValue;

View File

@@ -102,4 +102,16 @@ public class ActionsExecutionAPI extends RMModelRequest
return getRmRestWrapper().withCoreAPI().usingActions()
.executeAction(ActionsOnRule.DECLARE_VERSION_AS_RECORD.getActionValue(), targetNode);
}
/**
* Add WORM lock to a node using v1 actions api
*
* @param targetNode the node on which the action is executed
* @throws Exception
*/
public JSONObject addWORMLock(RepoTestModel targetNode) throws Exception
{
return getRmRestWrapper().withCoreAPI().usingActions()
.executeAction(ActionsOnRule.WORM_LOCK.getActionValue(), targetNode);
}
}