Package com.redwood.scheduler.api.model
Interface AuditObject
-
- All Superinterfaces:
Root
,SchedulerEntity
,SchedulerEntityComp
public interface AuditObject extends Root
The audit record object for logging changes and performing restoration of changed objects.
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXCLUSION_FILTER_AUDIT
Defines the exclusion filter that is applied before the diff is shown to the user in the audit trail.static String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "AuditObject" objects.static String
SEC_PRIV_CREATE
This privilege can be granted at a group level.static String
SEC_PRIV_DELETE
This privilege can be granted at a group level.static String
SEC_PRIV_EDIT
This privilege can be granted at a group level.static String
SEC_PRIV_RESTORE
This privilege can be granted at a group level.static String
SEC_PRIV_VIEW
This privilege can be granted at a group level.static String
SEC_RANK_ALL
This rank is made of the following privileges: view , create , edit , delete , restorestatic String
SEC_RANK_CREATE
This rank is made of the following privileges: createstatic String
SEC_RANK_DELETE
This rank is made of the following privileges: create , view , restore , deletestatic String
SEC_RANK_EDIT
This rank is made of the following privileges: create , view , restore , editstatic String
SEC_RANK_NONE
This rank has no privileges assigned to it.static String
SEC_RANK_VIEW
This rank is made of the following privileges: viewstatic QueryObjectType<AuditObject>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description RequiredPermission
checkCreatePrivilege()
Check whether or not the create action can be performed on this object.RequiredPermission
checkDeletePrivilege()
Check whether or not the delete action can be performed on this object.RequiredPermission
checkEditPrivilege()
Check whether or not the edit action can be performed on this object.RequiredPermission
checkRestorePrivilege()
Check whether or not the restore action can be performed on this object.RequiredPermission
checkViewPrivilege()
Check whether or not the view action can be performed on this object.ModelChangeAction
getAction()
Get the value for Action.String
getAdditionalInfo()
Get the value for AdditionalInfo.String
getAuditedObjectBusinessKey()
Get the value for AuditedObjectBusinessKey.Partition
getAuditedObjectPartition()
Get the value for AuditedObjectPartition.String
getAuditedObjectPartitionName()
Get the value for AuditedObjectPartitionName.Long
getAuditedObjectPartitionUniqueId()
Get the value for AuditedObjectPartitionUniqueId.String
getAuditedObjectType()
Get the value for AuditedObjectType.Long
getAuditedObjectUniqueId()
Get the value for AuditedObjectUniqueId.String
getDiff()
Get the value for Diff.String
getDiffText()
Get the Audit Diff value as a text version.AuditLevel
getLevel()
Get the value for Level.String
getNewObjectDef()
Get the value for NewObjectDef.String
getOldObjectDef()
Get the value for OldObjectDef.String
getReason()
Deprecated.String
getSearchAdditionalInfo()
Get the value for SearchAdditionalInfo.String
getSearchAuditedObjectBusinessKey()
Get the value for SearchAuditedObjectBusinessKey.String
getSearchReason()
Deprecated.String
getSearchUser()
Get the value for SearchUser.String
getUser()
Get the value for User.boolean
hasNewObjectDef()
An efficient way to determine whether NewObjectDef exists.boolean
hasOldObjectDef()
An efficient way to determine whether OldObjectDef exists.void
restoreAfter()
Restore an audited object from the archived value after the audited change was made.void
restoreBefore()
Restore an audited object from the archived value before the audited change was made.-
Methods inherited from interface com.redwood.scheduler.api.model.Root
getCreationTime, getLastModificationTime, getLastModifierSubject
-
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
canPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
-
-
-
-
Field Detail
-
OBJECT_TYPE
static final String OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "AuditObject" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<AuditObject> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.
-
EXCLUSION_FILTER_AUDIT
static final String EXCLUSION_FILTER_AUDIT
Defines the exclusion filter that is applied before the diff is shown to the user in the audit trail.- See Also:
- Constant Field Values
-
SEC_PRIV_VIEW
static final String SEC_PRIV_VIEW
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_CREATE
static final String SEC_PRIV_CREATE
This privilege can be granted at a group level.- See Also:
- Constant Field Values
-
SEC_PRIV_EDIT
static final String SEC_PRIV_EDIT
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_DELETE
static final String SEC_PRIV_DELETE
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_RESTORE
static final String SEC_PRIV_RESTORE
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_RANK_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- See Also:
- Constant Field Values
-
SEC_RANK_CREATE
static final String SEC_RANK_CREATE
This rank is made of the following privileges: create- See Also:
- Constant Field Values
-
SEC_RANK_VIEW
static final String SEC_RANK_VIEW
This rank is made of the following privileges: view- See Also:
- Constant Field Values
-
SEC_RANK_EDIT
static final String SEC_RANK_EDIT
This rank is made of the following privileges: create , view , restore , edit- See Also:
- Constant Field Values
-
SEC_RANK_DELETE
static final String SEC_RANK_DELETE
This rank is made of the following privileges: create , view , restore , delete- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges: view , create , edit , delete , restore- See Also:
- Constant Field Values
-
-
Method Detail
-
getAuditedObjectType
String getAuditedObjectType()
Get the value for AuditedObjectType. (The type of the object that's change is being recorded.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getAuditedObjectUniqueId
Long getAuditedObjectUniqueId()
Get the value for AuditedObjectUniqueId. (The unique id of the object that's change is being recorded.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getAuditedObjectBusinessKey
String getAuditedObjectBusinessKey()
Get the value for AuditedObjectBusinessKey. (The business key of the object that's change is being recorded.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getAuditedObjectPartitionUniqueId
Long getAuditedObjectPartitionUniqueId()
Get the value for AuditedObjectPartitionUniqueId. (Unique id of partition of audited object.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getAuditedObjectPartition
Partition getAuditedObjectPartition()
Get the value for AuditedObjectPartition. (Partition (based on AuditedObjectPartitionUniqueId) or null)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getAuditedObjectPartitionName
String getAuditedObjectPartitionName()
Get the value for AuditedObjectPartitionName. (Partition name of audited object or null.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getSearchAuditedObjectBusinessKey
String getSearchAuditedObjectBusinessKey()
Get the value for SearchAuditedObjectBusinessKey. (The search form of the business key of the object that's change is being recorded.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getUser
String getUser()
Get the value for User. (The user that made the change.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getSearchUser
String getSearchUser()
Get the value for SearchUser. (The search form of the user.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getAction
ModelChangeAction getAction()
Get the value for Action. (The action that was performed, be that create, modify or delete.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getLevel
AuditLevel getLevel()
Get the value for Level. (The level of auditing that is recorded for the object.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getAdditionalInfo
String getAdditionalInfo()
Get the value for AdditionalInfo. (Additional information about the change.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getSearchAdditionalInfo
String getSearchAdditionalInfo()
Get the value for SearchAdditionalInfo. (The search form of the additional information.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getDiff
String getDiff()
Get the value for Diff. (The full text of the AuditObject diff.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getOldObjectDef
String getOldObjectDef()
Get the value for OldObjectDef. (The full XML of the Audited Object definition before the audited change was made.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getNewObjectDef
String getNewObjectDef()
Get the value for NewObjectDef. (The full XML of the Audited Object definition after the audited change was made.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getDiffText
String getDiffText()
Get the Audit Diff value as a text version.- Returns:
- The audit diff in text format
-
hasOldObjectDef
boolean hasOldObjectDef()
An efficient way to determine whether OldObjectDef exists.- Returns:
- true when OldObjectDef exists
-
hasNewObjectDef
boolean hasNewObjectDef()
An efficient way to determine whether NewObjectDef exists.- Returns:
- true when NewObjectDef exists
-
getReason
@Deprecated String getReason()
Deprecated.This method is deprecated, it was never used.The optional reason for why the change was made. This method as been deprecated as it was never used.
- Returns:
- Return the reason why the change was made
-
getSearchReason
@Deprecated String getSearchReason()
Deprecated.This method is deprecated, it was never used.The search form of the reason. This method as been deprecated as it was never used.
- Returns:
- Return the reason why the change was made in search form
-
restoreBefore
void restoreBefore()
Restore an audited object from the archived value before the audited change was made.
-
restoreAfter
void restoreAfter()
Restore an audited object from the archived value after the audited change was made.
-
checkViewPrivilege
RequiredPermission checkViewPrivilege()
Check whether or not the view action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkCreatePrivilege
RequiredPermission checkCreatePrivilege()
Check whether or not the create action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkEditPrivilege
RequiredPermission checkEditPrivilege()
Check whether or not the edit action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkDeletePrivilege
RequiredPermission checkDeletePrivilege()
Check whether or not the delete action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkRestorePrivilege
RequiredPermission checkRestorePrivilege()
Check whether or not the restore action can be performed on this object.- Returns:
- a
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
-