public class DynamoLifecycleImpl extends AbstractLifecycleImpl implements ILifecycle
Modifier and Type | Field and Description |
---|---|
protected DynamoPolicyComponent |
policyComponent |
Constructor and Description |
---|
DynamoLifecycleImpl() |
Modifier and Type | Method and Description |
---|---|
LifecycleResult |
attachLifecycleById(java.lang.String ticket,
java.lang.String objectId,
java.lang.String lifecycleId,
java.lang.String state)
Attach the lifecycle identified by the given id to the object.
|
LifecycleResult |
attachLifecycleByName(java.lang.String ticket,
java.lang.String objectId,
java.lang.String lifecycleName,
java.lang.String state)
Attach the lifecycle identified by the given name to the object.
|
boolean |
demote(java.lang.String ticket,
java.lang.String objectId,
java.lang.String statename,
boolean demoteToBase)
Demote a single object to the specified state.
|
LifecycleResult |
detachLifecycle(java.lang.String ticket,
java.lang.String objectId)
Detach a lifecycle from the object.
|
java.lang.String |
getCurrentState(java.lang.String ticket,
java.lang.String objectId)
Check the current repository lifecycle state of a given object.
|
static java.lang.String |
getKeyByValue(java.util.Map<java.lang.String,java.lang.String> map,
java.lang.String value)
Get key by value
|
static java.lang.String |
getLifeCycleNameFromObjectType(java.lang.String objectType)
Get lifecycle name from object type
|
LifecycleState[] |
getStates(java.lang.String ticket,
java.lang.String lifecycleName)
Returns the states for the given lifecycle.
|
boolean |
objectHasLifecycle(EnhancedCompleteObject eco)
Checks if an object has a lifecycle
|
boolean |
promote(java.lang.String ticket,
java.lang.String objectId,
java.lang.String statename)
Promote a single object to the specified state.
|
LifecycleResult |
resume(java.lang.String ticket,
java.lang.String objectId,
java.lang.String state,
boolean resumeBaseState)
Resume a single object from the specified state.
|
LifecycleResult |
suspend(java.lang.String ticket,
java.lang.String objectId,
java.lang.String state)
Suspend a single object.
|
getAllLifecycleDefinitions, getConfiguredLifecycleStateRepoNameForObjectId, getLifecycleDefinition, getOcConfiguredLifecycleStateRepoNameForObjectType, getOcLifecycleDefinition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAllLifecycleDefinitions, getLifecycleDefinition, getOcLifecycleDefinition
@Autowired protected DynamoPolicyComponent policyComponent
public LifecycleState[] getStates(java.lang.String ticket, java.lang.String lifecycleName)
ILifecycle
getStates
in interface ILifecycle
ticket
- a valid authentication ticketlifecycleName
- the name of the lifecycle policyILifecycle.getStates(java.lang.String,
java.lang.String)
public LifecycleResult resume(java.lang.String ticket, java.lang.String objectId, java.lang.String state, boolean resumeBaseState)
ILifecycle
resume
in interface ILifecycle
ticket
- a valid authentication ticketobjectId
- the object ID of the object to resumestate
- the state to resume fromresumeBaseState
- True to resume base state, false otherwise.LifecycleResult
error
returns true if method failed, otherwise falseILifecycle.resume(java.lang.String,
java.lang.String, java.lang.String, boolean)
public LifecycleResult suspend(java.lang.String ticket, java.lang.String objectId, java.lang.String state)
ILifecycle
suspend
in interface ILifecycle
ticket
- a valid authentication ticketobjectId
- the object ID of the object to suspendstate
- the state to suspendLifecycleResult
error
returns true if method failed, otherwise falseILifecycle.suspend(java.lang.String,
java.lang.String, java.lang.String)
public boolean promote(java.lang.String ticket, java.lang.String objectId, java.lang.String statename)
ILifecycle
promote
in interface ILifecycle
ticket
- a valid authentication ticketobjectId
- the object ID of the object to promotestatename
- the state to promote the object toILifecycle.promote(java.lang.String,
java.lang.String, java.lang.String)
public boolean demote(java.lang.String ticket, java.lang.String objectId, java.lang.String statename, boolean demoteToBase)
ILifecycle
demote
in interface ILifecycle
ticket
- a valid authentication ticketobjectId
- the object ID of the object to demotestatename
- the state to demote the object todemoteToBase
- boolean to indicate whether to demote to base or notILifecycle.demote(java.lang.String,
java.lang.String, java.lang.String, boolean)
public static java.lang.String getLifeCycleNameFromObjectType(java.lang.String objectType)
{String}
- object typepublic java.lang.String getCurrentState(java.lang.String ticket, java.lang.String objectId)
ILifecycle
getCurrentState
in interface ILifecycle
ticket
- a valid authentication ticketobjectId
- the object ID of the object to check statecom.tsgrp.opencontent.core.lifecycle.ILifecycle#getCurrentState(java.lang.
String, java.lang.String)
public LifecycleResult attachLifecycleById(java.lang.String ticket, java.lang.String objectId, java.lang.String lifecycleId, java.lang.String state)
ILifecycle
attachLifecycleById
in interface ILifecycle
ticket
- a valid authentication ticketobjectId
- object id the lifecycle is to be attached tolifecycleId
- id of the lifecycle to attachstate
- initial state name/state position of the lifecycle (if null, default to position 0)LifecycleResult
error
returns false if life cycle is successfully attached, otherwise truecom.tsgrp.opencontent.core.lifecycle.ILifecycle#attachLifecycleById(java.lang
.String, java.lang.String, java.lang.String, java.lang.String)
public LifecycleResult attachLifecycleByName(java.lang.String ticket, java.lang.String objectId, java.lang.String lifecycleName, java.lang.String state)
ILifecycle
attachLifecycleByName
in interface ILifecycle
ticket
- a valid authentication ticketobjectId
- object id the lifecycle is to be attached tolifecycleName
- name of the lifecycle to attachstate
- initial state name/state position of the lifecycle (if null, default to position 0)LifecycleResult
error
returns false if life cycle is successfully attached, otherwise truecom.tsgrp.opencontent.core.lifecycle.ILifecycle#attachLifecycleByName(java.
lang.String, java.lang.String, java.lang.String, java.lang.String)
public LifecycleResult detachLifecycle(java.lang.String ticket, java.lang.String objectId)
ILifecycle
detachLifecycle
in interface ILifecycle
ticket
- a valid authentication ticketobjectId
- object id to detach the a lifecycle fromLifecycleResult
error
returns false if life cycle is successfully detached, otherwise truecom.tsgrp.opencontent.core.lifecycle.ILifecycle#detachLifecycle(java.lang.
String, java.lang.String)
public static java.lang.String getKeyByValue(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String value)
{Map - String>} map
{String}
- valuepublic boolean objectHasLifecycle(EnhancedCompleteObject eco)
{EnhancedCompleteObject}
- object