Package com.redwood.scheduler.api.model
Interface ObjectDefinition
-
- All Superinterfaces:
BusinessKeyObject,MetaData,ObjectDefinitionComp,SchedulerEntity,SchedulerEntityComp
public interface ObjectDefinition extends ObjectDefinitionComp, MetaData, BusinessKeyObject
Provides a reference for every object in the database.
-
-
Field Summary
Fields Modifier and Type Field Description static StringOBJECT_TYPEString that will be returned fromSchedulerEntity.getObjectType()for "ObjectDefinition" objects.static StringSEC_PRIV_CREATEThis privilege can be granted at a group level.static StringSEC_PRIV_DELETEThis privilege can be granted at a group level.static StringSEC_PRIV_EDITThis privilege can be granted at a group level.static StringSEC_PRIV_MODIFYINDEXThis privilege can be granted at a group level.static StringSEC_RANK_ALLThis rank is made of the following privileges: create , edit , modifyIndex , deletestatic StringSEC_RANK_CREATEThis rank is made of the following privileges: createstatic StringSEC_RANK_DELETEThis rank is made of the following privileges: create , deletestatic StringSEC_RANK_EDITThis rank is made of the following privileges: create , edit , modifyIndexstatic StringSEC_RANK_NONEThis rank has no privileges assigned to it.static QueryObjectType<ObjectDefinition>TYPEType 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 Modifier and Type Method Description RequiredPermissioncheckCreatePrivilege()Check whether or not the create action can be performed on this object.RequiredPermissioncheckDeletePrivilege()Check whether or not the delete action can be performed on this object.RequiredPermissioncheckEditPrivilege()Check whether or not the edit action can be performed on this object.RequiredPermissioncheckModifyIndexPrivilege()Check whether or not the modifyIndex action can be performed on this object.ObjectFieldDefinitioncreateObjectFieldDefinition()Create a newObjectFieldDefinitionlinked to this object.ObjectIndexcreateObjectIndex()Create a newObjectIndexlinked to this object.RWIterable<Alert>getAlerts()Get anRWIterableover an ordered collection ofAlerts.ObjectIndexgetBusinessKeyObjectIndex()Get the BusinessKeyObjectIndex.StringgetDescription()Get the value for Description.RWIterable<ImportRuleDefinition>getImportRuleDefinitions()Get anRWIterableover an ordered collection ofImportRuleDefinitions.ObjectFieldDefinitiongetObjectFieldDefinitionByFieldName(String fieldName)Get the ObjectFieldDefinition by FilterOrderName.RWIterable<ObjectFieldDefinition>getObjectFieldDefinitions()Get anRWIterableover an ordered collection ofObjectFieldDefinitions.RWIterable<ObjectIndex>getObjectIndexes()Get anRWIterableover an ordered collection ofObjectIndexes.StringgetObjectName()Get the value for ObjectName.QueryConditiongetQueryConditionByName(String name)Get the QueryCondition by QueryCondition.RWIterable<QueryCondition>getQueryConditions()Get anRWIterableover an ordered collection ofQueryConditions.QueryFiltergetQueryFilterByOwnerSubjectName(Subject ownerSubject, String name)Get the QueryFilter by ObjectDefinitionUserName.RWIterable<QueryFilter>getQueryFilters()Get anRWIterableover a collection ofQueryFilters, the collection will be ordered by DisplayOrder Name.RWIterable<ObjectFieldDefinition>getReferringObjectFieldDefinitions()Get anRWIterableover an ordered collection ofReferringObjectFieldDefinitions.StringgetSearchName()Get the value for SearchName.booleanisAllowedGrants()Get the value for AllowedGrants.booleanisBusinessKeyObject()Can SchedulerEntities for ObjectDefinition be addressed by BusinessKey.booleanisGrantableAtLevel(GrantLevel level)Whether grants can be made for this object-type at the specified level.voidsetBusinessKeyObjectIndex(ObjectIndex newBusinessKeyObjectIndex)Set the value for BusinessKeyObjectIndex.-
Methods inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
getBusinessKey
-
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 "ObjectDefinition" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<ObjectDefinition> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...).
-
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_MODIFYINDEX
static final String SEC_PRIV_MODIFYINDEX
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_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_EDIT
static final String SEC_RANK_EDIT
This rank is made of the following privileges: create , edit , modifyIndex- See Also:
- Constant Field Values
-
SEC_RANK_DELETE
static final String SEC_RANK_DELETE
This rank is made of the following privileges: create , delete- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges: create , edit , modifyIndex , delete- See Also:
- Constant Field Values
-
-
Method Detail
-
isAllowedGrants
boolean isAllowedGrants()
Get the value for AllowedGrants. (Whether or not security grants are possible for this type of object.)- 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.
-
getDescription
String getDescription()
Get the value for Description. (Returns the translation for the ObjectName.) This value is mandatory, and therefore will not benullif 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.
-
getObjectName
String getObjectName()
Get the value for ObjectName. (The internal name of this ObjectType. Used for debugging and to build the localised name.) This value is mandatory, and therefore will not benullif 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.
-
getSearchName
String getSearchName()
Get the value for SearchName. (The internal name of this ObjectType, normalized to allow for convenient database searching.)- 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.
-
isGrantableAtLevel
boolean isGrantableAtLevel(GrantLevel level)
Whether grants can be made for this object-type at the specified level.- Parameters:
level- Level to query.- Returns:
- True if grants can be made for this object-type at the given level, false otherwise.
-
isBusinessKeyObject
boolean isBusinessKeyObject()
Can SchedulerEntities for ObjectDefinition be addressed by BusinessKey.- Returns:
- True if the ObjectDefinition supports BusinessKeys.
-
getBusinessKeyObjectIndex
ObjectIndex getBusinessKeyObjectIndex()
Get the BusinessKeyObjectIndex.- Returns:
- BusinessKeyObjectIndex
- Throws:
com.redwood.scheduler.api.exception.ObjectDeletedException- If this method is called when the object has been marked for deletion.com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- If this method is called when the object has been removed from it's session.
-
setBusinessKeyObjectIndex
void setBusinessKeyObjectIndex(ObjectIndex newBusinessKeyObjectIndex)
Set the value for BusinessKeyObjectIndex. This value is optional.- Parameters:
newBusinessKeyObjectIndex- is the object to set BusinessKeyObjectIndex to. This index is the business key for this object
-
getAlerts
RWIterable<Alert> getAlerts()
Get anRWIterableover an ordered collection ofAlerts. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull. What type of object raised this alert?- Specified by:
getAlertsin interfaceObjectDefinitionComp- Returns:
- An
RWIterableover an ordered collection ofAlertobjects .
-
getImportRuleDefinitions
RWIterable<ImportRuleDefinition> getImportRuleDefinitions()
Get anRWIterableover an ordered collection ofImportRuleDefinitions. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull.- Specified by:
getImportRuleDefinitionsin interfaceObjectDefinitionComp- Returns:
- An
RWIterableover an ordered collection ofImportRuleDefinitionobjects .
-
getObjectIndexes
RWIterable<ObjectIndex> getObjectIndexes()
Get anRWIterableover an ordered collection ofObjectIndexes. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull. The object definition for this index- Specified by:
getObjectIndexesin interfaceObjectDefinitionComp- Returns:
- An
RWIterableover an ordered collection ofObjectIndexobjects .
-
createObjectIndex
ObjectIndex createObjectIndex()
Create a newObjectIndexlinked to this object.- Returns:
- a new
ObjectIndex.
-
getObjectFieldDefinitions
RWIterable<ObjectFieldDefinition> getObjectFieldDefinitions()
Get anRWIterableover an ordered collection ofObjectFieldDefinitions. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull. The ObjectDefinition that this Field belongs to.- Specified by:
getObjectFieldDefinitionsin interfaceObjectDefinitionComp- Returns:
- An
RWIterableover an ordered collection ofObjectFieldDefinitionobjects .
-
createObjectFieldDefinition
ObjectFieldDefinition createObjectFieldDefinition()
Create a newObjectFieldDefinitionlinked to this object.- Returns:
- a new
ObjectFieldDefinition.
-
getObjectFieldDefinitionByFieldName
ObjectFieldDefinition getObjectFieldDefinitionByFieldName(String fieldName)
Get the ObjectFieldDefinition by FilterOrderName.- Parameters:
fieldName-- Returns:
- the ObjectFieldDefinition, or
nullif it could not be found
-
getReferringObjectFieldDefinitions
RWIterable<ObjectFieldDefinition> getReferringObjectFieldDefinitions()
Get anRWIterableover an ordered collection ofReferringObjectFieldDefinitions. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull. The ObjectDefinition that this Field refers to if it is a relation.- Specified by:
getReferringObjectFieldDefinitionsin interfaceObjectDefinitionComp- Returns:
- An
RWIterableover an ordered collection ofObjectFieldDefinitionobjects .
-
getQueryConditions
RWIterable<QueryCondition> getQueryConditions()
Get anRWIterableover an ordered collection ofQueryConditions. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull.- Specified by:
getQueryConditionsin interfaceObjectDefinitionComp- Returns:
- An
RWIterableover an ordered collection ofQueryConditionobjects .
-
getQueryConditionByName
QueryCondition getQueryConditionByName(String name)
Get the QueryCondition by QueryCondition.- Parameters:
name-- Returns:
- the QueryCondition, or
nullif it could not be found
-
getQueryFilters
RWIterable<QueryFilter> getQueryFilters()
Get anRWIterableover a collection ofQueryFilters, the collection will be ordered by DisplayOrder Name. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull.- Specified by:
getQueryFiltersin interfaceObjectDefinitionComp- Returns:
- An
RWIterableover a collection ofQueryFilterobjects , the collection will be ordered by DisplayOrder Name.
-
getQueryFilterByOwnerSubjectName
QueryFilter getQueryFilterByOwnerSubjectName(Subject ownerSubject, String name)
Get the QueryFilter by ObjectDefinitionUserName.- Parameters:
ownerSubject-name-- Returns:
- the QueryFilter, or
nullif it could not be found
-
checkCreatePrivilege
RequiredPermission checkCreatePrivilege()
Check whether or not the create action can be performed on this object.- Returns:
- a
RequiredPermissioninstance 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
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkModifyIndexPrivilege
RequiredPermission checkModifyIndexPrivilege()
Check whether or not the modifyIndex action can be performed on this object.- Returns:
- a
RequiredPermissioninstance 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
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
-