public class ElasticsearchLifecycleImpl extends AbstractLifecycleImpl
Modifier | Constructor and Description |
---|---|
protected |
ElasticsearchLifecycleImpl() |
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.
|
LifecycleState[] |
getStates(java.lang.String ticket,
java.lang.String lifecycleName)
Returns the states for the given 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
public LifecycleResult resume(java.lang.String ticket, java.lang.String objectId, java.lang.String state, boolean resumeBaseState)
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 falsepublic LifecycleResult suspend(java.lang.String ticket, java.lang.String objectId, java.lang.String state)
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 falsepublic boolean demote(java.lang.String ticket, java.lang.String objectId, java.lang.String statename, boolean demoteToBase)
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 notcom.tsgrp.opencontent.core.lifecycle.ILifecycle#demote(java.lang.String,
java.lang.String, java.lang.String)
public java.lang.String getCurrentState(java.lang.String ticket, java.lang.String objectId)
ILifecycle
ticket
- a valid authentication ticketobjectId
- the object ID of the object to check stateILifecycle.getCurrentState(java.lang.String,
java.lang.String)
public boolean promote(java.lang.String ticket, java.lang.String objectId, java.lang.String statename)
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 LifecycleResult attachLifecycleById(java.lang.String ticket, java.lang.String objectId, java.lang.String lifecycleId, java.lang.String state)
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 trueILifecycle.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
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 trueILifecycle.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
ticket
- a valid authentication ticketobjectId
- object id to detach the a lifecycle fromLifecycleResult
error
returns false if life cycle is successfully detached, otherwise trueILifecycle.detachLifecycle(java.lang.String,
java.lang.String)
public LifecycleState[] getStates(java.lang.String ticket, java.lang.String lifecycleName)
ILifecycle
ticket
- a valid authentication ticketlifecycleName
- the name of the lifecycle policy