public class ActionChainFactory extends HibernateFactory
Modifier and Type | Method and Description |
---|---|
static ActionChain |
createActionChain(java.lang.String label,
User user)
Creates a new ActionChain object.
|
static void |
delete(ActionChain actionChain)
Deletes an Action Chain and all associated objects.
|
static ActionChain |
getActionChain(User requestor,
java.lang.Long id)
Gets an Action Chain by id.
|
static ActionChain |
getActionChain(User requestor,
java.lang.String label)
Gets an action chain by label.
|
static java.util.List<ActionChainEntry> |
getActionChainEntries(ActionChain actionChain,
java.lang.Integer sortOrder)
Returns entries from a chain having a certain sort order number
|
static ActionChainEntry |
getActionChainEntry(User requestor,
java.lang.Long id)
Gets an Action Chain Entry by id.
|
static java.util.List<ActionChainEntryGroup> |
getActionChainEntryGroups(ActionChain actionChain)
Returns ActionChainEntryGroupDto objects corresponding to groups of
Action Chain entries with the same sort order and action type.
|
static java.util.List<ActionChain> |
getActionChains(User requestor)
Gets all action chains for a user.
|
static java.util.List<ActionChain> |
getActionChainsByModificationDate(User requestor)
Gets all action chains, by modification date.
|
protected org.apache.log4j.Logger |
getLogger()
Get the Logger for the derived class so log messages show up on the
correct class
|
static int |
getNextSortOrderValue(ActionChain actionChain)
Gets the next sort order value.
|
static ActionChain |
getOrCreateActionChain(java.lang.String label,
User user)
Looks for an action chain by label, and creates one if not found.
|
static ActionChainEntry |
queueActionChainEntry(Action action,
ActionChain actionChain,
java.lang.Long serverId)
Creates a new entry in an Action Chain object.
|
static ActionChainEntry |
queueActionChainEntry(Action action,
ActionChain actionChain,
java.lang.Long serverId,
int sortOrder)
Creates a new entry in an Action Chain object.
|
static ActionChainEntry |
queueActionChainEntry(Action action,
ActionChain actionChain,
Server server)
Creates a new entry in an Action Chain object, sort order will be
incremented.
|
static ActionChainEntry |
queueActionChainEntry(Action action,
ActionChain actionChain,
Server server,
int sortOrder)
Creates a new entry in an Action Chain object.
|
static ActionChainEntry |
queueActionChainEntry(Action action,
ActionChain actionChain,
SystemOverview systemOverview)
Creates a new entry in an Action Chain object.
|
static void |
removeActionChainEntry(ActionChain actionChain,
ActionChainEntry entry)
Remove an entry from the action chain
|
static void |
removeActionChainEntrySortGaps(ActionChain actionChain,
int removedOrder)
Remove gaps from entries in an action chain
|
static void |
schedule(ActionChain actionChain,
java.util.Date date)
Schedules an Action Chain for execution.
|
addConfigurator, blobToByteArray, byteArrayToBlob, closeSession, closeSessionFactory, commitTransaction, createSessionFactory, createSessionFactory, executeCallableMode, executeSelectMode, getBlobContents, getByteArrayContents, getObject, getSession, initialize, inTransaction, isClosed, isInitialized, listObjectsByNamedQuery, listObjectsByNamedQuery, listObjectsByNamedQuery, lockObject, lookupObjectByNamedQuery, lookupObjectByNamedQuery, reload, removeObject, rollbackTransaction, saveObject, saveObject, stringToByteArray
public static ActionChain getActionChain(User requestor, java.lang.String label)
requestor
- the user whose chain we're looking forlabel
- the labelpublic static ActionChain getActionChain(User requestor, java.lang.Long id) throws org.hibernate.ObjectNotFoundException
requestor
- the user whose chain we're looking forid
- the idorg.hibernate.ObjectNotFoundException
- if there is no such id accessible to the requestorpublic static ActionChainEntry getActionChainEntry(User requestor, java.lang.Long id) throws org.hibernate.ObjectNotFoundException
requestor
- the user whose entry we're looking forid
- the action chain entry idorg.hibernate.ObjectNotFoundException
- if there is no such id accessible to the requestorpublic static ActionChain createActionChain(java.lang.String label, User user)
label
- the labeluser
- the userpublic static ActionChain getOrCreateActionChain(java.lang.String label, User user)
label
- the labeluser
- the currently logged in userpublic static ActionChainEntry queueActionChainEntry(Action action, ActionChain actionChain, Server server)
action
- the actionactionChain
- the action chainserver
- the serverpublic static ActionChainEntry queueActionChainEntry(Action action, ActionChain actionChain, Server server, int sortOrder)
action
- the actionactionChain
- the action chainserver
- the serversortOrder
- the required sort orderpublic static ActionChainEntry queueActionChainEntry(Action action, ActionChain actionChain, java.lang.Long serverId)
action
- the actionactionChain
- the action chainserverId
- the server idpublic static ActionChainEntry queueActionChainEntry(Action action, ActionChain actionChain, java.lang.Long serverId, int sortOrder)
action
- the actionactionChain
- the action chainserverId
- the server idsortOrder
- the required sort orderpublic static ActionChainEntry queueActionChainEntry(Action action, ActionChain actionChain, SystemOverview systemOverview)
action
- the actionactionChain
- the action chainsystemOverview
- the server overview objectpublic static java.util.List<ActionChain> getActionChains(User requestor)
requestor
- the user whose chains we're looking forpublic static java.util.List<ActionChain> getActionChainsByModificationDate(User requestor)
requestor
- the user whose chain we're looking forpublic static java.util.List<ActionChainEntryGroup> getActionChainEntryGroups(ActionChain actionChain)
actionChain
- an Action Chainpublic static java.util.List<ActionChainEntry> getActionChainEntries(ActionChain actionChain, java.lang.Integer sortOrder)
actionChain
- the chainsortOrder
- the sort orderpublic static int getNextSortOrderValue(ActionChain actionChain)
actionChain
- the action chainpublic static void delete(ActionChain actionChain)
actionChain
- the action chain to deletepublic static void schedule(ActionChain actionChain, java.util.Date date)
actionChain
- the action chain to executedate
- first action's minimum timestampprotected org.apache.log4j.Logger getLogger()
getLogger
in class HibernateFactory
public static void removeActionChainEntrySortGaps(ActionChain actionChain, int removedOrder)
actionChain
- An ActionChain from which to be removed.removedOrder
- sort order of the (already) removed entrypublic static void removeActionChainEntry(ActionChain actionChain, ActionChainEntry entry)
actionChain
- An ActionChain from which to be removed.entry
- entry to remove