public class ChangeTracker
extends java.lang.Object
Constructor and Description |
---|
ChangeTracker() |
ChangeTracker(CustomActionTriggerContext c,
CustomActionLogger logger) |
Modifier and Type | Method and Description |
---|---|
void |
addEntry(java.util.List<ServiceRequestAssetChangeEntry> eList) |
void |
addEntry(ServiceRequestAssetChangeEntry e)
this method should not be called unless, one of the pre-defined wrapper method is
insufficient
|
static java.util.List<ServiceRequestAssetChangeEntry> |
collectNestedAssetChangeEntries(int srId) |
static java.util.List<ServiceRequestAssetChangeEntry> |
collectNestedAssetChangeEntries(int srId,
boolean removeRollbackEntries) |
ServiceRequestAssetChangeEntry |
createChangeEntry() |
static long |
deleteServiceRequestAssetChangeEntries(int requestId)
To delete all the Asset change entries belong to a SR
|
static java.util.List<ServiceRequestAssetChangeEntry> |
getAllServiceRequestAssetChangeEntries() |
static java.util.List<ServiceRequestAssetChangeEntry> |
getApprovalEntries(int requestId) |
CustomActionTriggerContext |
getContext() |
static java.util.List<ServiceRequestAssetChangeEntry> |
getEntiresByAssetId(java.lang.String identity) |
static java.util.List<ServiceRequestAssetChangeEntry> |
getEntiresByAssetType(java.lang.String assetType) |
static java.util.List<ServiceRequestAssetChangeEntry> |
getEntiresByObjectIdentity(java.lang.String identity) |
static java.util.List<ServiceRequestAssetChangeEntry> |
getEntiresByObjectIdentity(java.lang.String identity,
java.lang.String assetType) |
static ServiceRequestAssetChangeEntry |
getEntiresByObjectIdentityAssetTypeAndSRID(java.lang.String identity,
java.lang.String assetType,
int requestId) |
static java.util.List<ServiceRequestAssetChangeEntry> |
getEntries(int requestId) |
static java.util.List<ServiceRequestAssetChangeEntry> |
getEntriesByChangeType(int requestId,
int changeType) |
static ServiceRequestAssetChangeEntry |
getEntry(long changeId) |
static java.util.List<ServiceRequestAssetChangeEntry> |
getModifiedEntries(int requestId) |
static java.util.List<ServiceRequestAssetChangeEntry> |
getServiceRequestAssetChangeEntries(java.lang.String assetType,
java.lang.String assetId) |
static java.util.List<ServiceRequestAssetChangeEntry> |
getServiceRequestAssetChangeEntriesForType(java.lang.String assetType) |
static java.util.List<ServiceRequestAssetChangeEntry> |
getUndoableEntries(int requestId) |
static ServiceRequestAssetChangeEntry |
getUndoChildSRTaskEntryObject(ServiceRequestAssetChangeEntry lastEntry,
int childSRid) |
static java.util.Map<java.lang.String,ServiceRequestAssetChangeEntry> |
getUndoChildSrTaskEntryObjectsMap(java.lang.String requestId) |
static void |
modifyEntry(ServiceRequestAssetChangeEntry e) |
void |
resourceAdded(java.lang.String assetType,
java.lang.String assetId,
java.lang.String assetLabel,
java.lang.String description) |
void |
resourceDeleted(java.lang.String assetType,
java.lang.String assetId,
java.lang.String assetLabel,
java.lang.String description) |
void |
resourceModified(java.lang.String assetType,
java.lang.String assetId,
java.lang.String assetLabel,
java.lang.String description) |
void |
undoableResourceAdded(java.lang.String assetType,
java.lang.String assetId,
java.lang.String assetLabel,
java.lang.String description,
java.lang.String undoTask,
java.lang.Object undoConfigData) |
void |
undoableResourceDeleted(java.lang.String assetType,
java.lang.String assetId,
java.lang.String assetLabel,
java.lang.String description,
java.lang.String undoTask,
java.lang.Object undoConfigData)
Use this API only if deletion can be reversed.
|
void |
undoableResourceModified(java.lang.String assetType,
java.lang.String assetId,
java.lang.String assetLabel,
java.lang.String description,
java.lang.String undoTask,
java.lang.Object undoConfigData)
Use this API only if modification can be reversed.
|
public ChangeTracker()
public ChangeTracker(CustomActionTriggerContext c, CustomActionLogger logger)
public CustomActionTriggerContext getContext()
public ServiceRequestAssetChangeEntry createChangeEntry()
public void addEntry(ServiceRequestAssetChangeEntry e)
public void addEntry(java.util.List<ServiceRequestAssetChangeEntry> eList)
public static java.util.List<ServiceRequestAssetChangeEntry> getEntries(int requestId) throws java.lang.Exception
java.lang.Exception
public static long deleteServiceRequestAssetChangeEntries(int requestId) throws java.lang.Exception
requestId
- java.lang.Exception
public static java.util.List<ServiceRequestAssetChangeEntry> getUndoableEntries(int requestId) throws java.lang.Exception
java.lang.Exception
public static java.util.List<ServiceRequestAssetChangeEntry> collectNestedAssetChangeEntries(int srId) throws java.lang.Exception
java.lang.Exception
public static java.util.List<ServiceRequestAssetChangeEntry> collectNestedAssetChangeEntries(int srId, boolean removeRollbackEntries) throws java.lang.Exception
srId
- - Service RequestIDremoveRollbackEntries
- set to True, to remove already rolledback entries from the list
set to False, to retrieve the entire list (same as using collectNestedAssetChangeEntries(srId))java.lang.Exception
public static ServiceRequestAssetChangeEntry getEntry(long changeId) throws java.lang.Exception
java.lang.Exception
public void resourceAdded(java.lang.String assetType, java.lang.String assetId, java.lang.String assetLabel, java.lang.String description)
public void resourceDeleted(java.lang.String assetType, java.lang.String assetId, java.lang.String assetLabel, java.lang.String description)
public void resourceModified(java.lang.String assetType, java.lang.String assetId, java.lang.String assetLabel, java.lang.String description)
public void undoableResourceAdded(java.lang.String assetType, java.lang.String assetId, java.lang.String assetLabel, java.lang.String description, java.lang.String undoTask, java.lang.Object undoConfigData)
public void undoableResourceDeleted(java.lang.String assetType, java.lang.String assetId, java.lang.String assetLabel, java.lang.String description, java.lang.String undoTask, java.lang.Object undoConfigData)
public void undoableResourceModified(java.lang.String assetType, java.lang.String assetId, java.lang.String assetLabel, java.lang.String description, java.lang.String undoTask, java.lang.Object undoConfigData)
public static java.util.List<ServiceRequestAssetChangeEntry> getModifiedEntries(int requestId) throws java.lang.Exception
java.lang.Exception
public static java.util.List<ServiceRequestAssetChangeEntry> getApprovalEntries(int requestId) throws java.lang.Exception
java.lang.Exception
public static java.util.List<ServiceRequestAssetChangeEntry> getEntiresByObjectIdentity(java.lang.String identity) throws java.lang.Exception
java.lang.Exception
public static java.util.List<ServiceRequestAssetChangeEntry> getEntiresByAssetId(java.lang.String identity) throws java.lang.Exception
java.lang.Exception
public static java.util.List<ServiceRequestAssetChangeEntry> getEntiresByAssetType(java.lang.String assetType) throws java.lang.Exception
java.lang.Exception
public static java.util.List<ServiceRequestAssetChangeEntry> getEntiresByObjectIdentity(java.lang.String identity, java.lang.String assetType) throws java.lang.Exception
java.lang.Exception
public static ServiceRequestAssetChangeEntry getEntiresByObjectIdentityAssetTypeAndSRID(java.lang.String identity, java.lang.String assetType, int requestId) throws java.lang.Exception
java.lang.Exception
public static java.util.Map<java.lang.String,ServiceRequestAssetChangeEntry> getUndoChildSrTaskEntryObjectsMap(java.lang.String requestId) throws java.lang.Exception
java.lang.Exception
public static java.util.List<ServiceRequestAssetChangeEntry> getEntriesByChangeType(int requestId, int changeType) throws java.lang.Exception
java.lang.Exception
public static ServiceRequestAssetChangeEntry getUndoChildSRTaskEntryObject(ServiceRequestAssetChangeEntry lastEntry, int childSRid)
public static java.util.List<ServiceRequestAssetChangeEntry> getServiceRequestAssetChangeEntries(java.lang.String assetType, java.lang.String assetId) throws java.lang.Exception
java.lang.Exception
public static java.util.List<ServiceRequestAssetChangeEntry> getAllServiceRequestAssetChangeEntries() throws java.lang.Exception
java.lang.Exception
public static java.util.List<ServiceRequestAssetChangeEntry> getServiceRequestAssetChangeEntriesForType(java.lang.String assetType) throws java.lang.Exception
java.lang.Exception
public static void modifyEntry(ServiceRequestAssetChangeEntry e)