public class LifecycleMgtDAO extends Object
| Modifier and Type | Method and Description |
|---|---|
String |
addLifecycleState(String initialState,
String lcName,
String user)
Set initial lifecycle state.
|
void |
addLifecycleState(String initialState,
String uuid,
String lcName,
String user)
Set initial lifecycle state with lifecycle id as input.
|
void |
changeCheckListItemData(String uuid,
String lcState,
String checkListName,
boolean value)
Method used to update data related to check list item operation.
|
void |
changeLifecycleState(LifecycleStateBean lifecycleStateBean,
String user)
Change lifecycle state.
|
static LifecycleMgtDAO |
getInstance()
Method to get the instance of the LCMgtDAO.
|
LifecycleStateBean |
getLifecycleCheckListDataFromState(String uuid,
String lcState)
Get lifecycle check list data for a particular uuid and state.
|
List<LifecycleHistoryBean> |
getLifecycleHistoryFromId(String uuid)
Method used to get lifecycle history related to particular uuid.
|
List<String> |
getLifecycleIdsFromState(String state,
String lcName)
This method provides set of lifecycle ids in a particular state.
|
LifecycleStateBean |
getLifecycleStateDataFromId(String uuid)
Get lifecycle state data for a particular uuid.
|
void |
removeLifecycleState(String uuid)
Method used to remove lifecycle state data for a given id.
|
public static LifecycleMgtDAO getInstance()
LifecycleMgtDAO instancepublic String addLifecycleState(String initialState, String lcName, String user) throws LifecycleManagerDatabaseException
initialState - Initial state provided in lifecycle config.lcName - Name of the lifecycleuser - The user who invoked the action. This will be used for
auditing purposes.LifecycleManagerDatabaseException - If failed to add initial lifecycle state.public void addLifecycleState(String initialState, String uuid, String lcName, String user) throws LifecycleManagerDatabaseException
initialState - Initial state provided in lifecycle config.uuid - Lifecycle Id;lcName - Name of the lifecycleuser - The user who invoked the action. This will be used for
auditing purposes.
external systems.LifecycleManagerDatabaseException - If failed to add initial lifecycle state.public void changeLifecycleState(LifecycleStateBean lifecycleStateBean, String user) throws LifecycleManagerDatabaseException
lifecycleStateBean - Bean containing lifecycle id and required state.user - The user who invoked the action. This will be used for
auditing purposes.LifecycleManagerDatabaseException - If failed to change lifecycle state.public LifecycleStateBean getLifecycleStateDataFromId(String uuid) throws LifecycleManagerDatabaseException
uuid - Reference variable that maps lc data with external system.LifecycleManagerDatabaseException - If failed to get lifecycle state data.public LifecycleStateBean getLifecycleCheckListDataFromState(String uuid, String lcState) throws LifecycleManagerDatabaseException
uuid - Reference variable that maps lc data with external system.lcState - State in which checklist date required.LifecycleManagerDatabaseException - If failed to get lifecycle state data.public List<LifecycleHistoryBean> getLifecycleHistoryFromId(String uuid) throws LifecycleManagerDatabaseException
uuid - UUID of the lifecycle state. (Associates with asset)LifecycleManagerDatabaseException - If failed to get lifecycle history from db.public void removeLifecycleState(String uuid) throws LifecycleManagerDatabaseException
uuid - UUID of the lifecycle state. (Associates with asset)LifecycleManagerDatabaseException - If failed to delete lifecycle state.public void changeCheckListItemData(String uuid, String lcState, String checkListName, boolean value) throws LifecycleManagerDatabaseException
uuid - UUID of the lifecycle state. (Associates with asset)lcState - State in which the checklist is associated with.checkListName - Name of the check list in which operation was performedvalue - Value of the check list item. (Selected or not selected)LifecycleManagerDatabaseException - If failed to change check list item data.public List<String> getLifecycleIdsFromState(String state, String lcName) throws LifecycleManagerDatabaseException
state` - lcName - LifecycleManagerDatabaseException - If failed to get lifecycle ids from database.Copyright © 2017 WSO2. All rights reserved.