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 String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "ObjectDefinition" 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_MODIFYINDEX
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: create , view , edit , modifyIndex , deletestatic 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 , deletestatic String
SEC_RANK_EDIT
This rank is made of the following privileges: create , view , edit , modifyIndexstatic 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<ObjectDefinition>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
Fields inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
COPYRIGHT_MESSAGE_BKO, ID_BKO
-
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 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
checkModifyIndexPrivilege()
Check whether or not the modifyIndex action can be performed on this object.RequiredPermission
checkViewPrivilege()
Check whether or not the view action can be performed on this object.ObjectFieldDefinition
createObjectFieldDefinition()
Create a newObjectFieldDefinition
linked to this object.ObjectIndex
createObjectIndex()
Create a newObjectIndex
linked to this object.RWIterable<Alert>
getAlerts()
Get anRWIterable
over an ordered collection ofAlerts
.ObjectIndex
getBusinessKeyObjectIndex()
Get the BusinessKeyObjectIndex.String
getDescription()
Get the value for Description.RWIterable<ImportRuleDefinition>
getImportRuleDefinitions()
Get anRWIterable
over an ordered collection ofImportRuleDefinitions
.ObjectFieldDefinition
getObjectFieldDefinitionByFieldName(String fieldName)
Get the ObjectFieldDefinition by FilterOrderName.RWIterable<ObjectFieldDefinition>
getObjectFieldDefinitions()
Get anRWIterable
over an ordered collection ofObjectFieldDefinitions
.RWIterable<ObjectIndex>
getObjectIndexes()
Get anRWIterable
over an ordered collection ofObjectIndexes
.String
getObjectName()
Get the value for ObjectName.QueryCondition
getQueryConditionByName(String name)
Get the QueryCondition by QueryCondition.RWIterable<QueryCondition>
getQueryConditions()
Get anRWIterable
over an ordered collection ofQueryConditions
.QueryFilter
getQueryFilterByOwnerSubjectName(Subject ownerSubject, String name)
Get the QueryFilter by ObjectDefinitionUserName.RWIterable<QueryFilter>
getQueryFilters()
Get anRWIterable
over a collection ofQueryFilters
, the collection will be ordered by DisplayOrder Name.RWIterable<ObjectFieldDefinition>
getReferringObjectFieldDefinitions()
Get anRWIterable
over an ordered collection ofReferringObjectFieldDefinitions
.String
getSearchName()
Get the value for SearchName.boolean
isAllowedGrants()
Get the value for AllowedGrants.boolean
isBusinessKeyObject()
Can SchedulerEntities for ObjectDefinition be addressed by BusinessKey.boolean
isGrantableAtLevel(GrantLevel level)
Whether grants can be made for this object-type at the specified level.void
setBusinessKeyObjectIndex(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_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_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_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 , 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 , view , delete- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges: create , view , 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:
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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
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:
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:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.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 anRWIterable
over 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:
getAlerts
in interfaceObjectDefinitionComp
- Returns:
- An
RWIterable
over an ordered collection ofAlert
objects .
-
getImportRuleDefinitions
RWIterable<ImportRuleDefinition> getImportRuleDefinitions()
Get anRWIterable
over an ordered collection ofImportRuleDefinitions
. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull
.- Specified by:
getImportRuleDefinitions
in interfaceObjectDefinitionComp
- Returns:
- An
RWIterable
over an ordered collection ofImportRuleDefinition
objects .
-
getObjectIndexes
RWIterable<ObjectIndex> getObjectIndexes()
Get anRWIterable
over 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:
getObjectIndexes
in interfaceObjectDefinitionComp
- Returns:
- An
RWIterable
over an ordered collection ofObjectIndex
objects .
-
createObjectIndex
ObjectIndex createObjectIndex()
Create a newObjectIndex
linked to this object.- Returns:
- a new
ObjectIndex
.
-
getObjectFieldDefinitions
RWIterable<ObjectFieldDefinition> getObjectFieldDefinitions()
Get anRWIterable
over 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:
getObjectFieldDefinitions
in interfaceObjectDefinitionComp
- Returns:
- An
RWIterable
over an ordered collection ofObjectFieldDefinition
objects .
-
createObjectFieldDefinition
ObjectFieldDefinition createObjectFieldDefinition()
Create a newObjectFieldDefinition
linked to this object.- Returns:
- a new
ObjectFieldDefinition
.
-
getObjectFieldDefinitionByFieldName
ObjectFieldDefinition getObjectFieldDefinitionByFieldName(String fieldName)
Get the ObjectFieldDefinition by FilterOrderName.- Parameters:
fieldName
-- Returns:
- the ObjectFieldDefinition, or
null
if it could not be found
-
getReferringObjectFieldDefinitions
RWIterable<ObjectFieldDefinition> getReferringObjectFieldDefinitions()
Get anRWIterable
over 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:
getReferringObjectFieldDefinitions
in interfaceObjectDefinitionComp
- Returns:
- An
RWIterable
over an ordered collection ofObjectFieldDefinition
objects .
-
getQueryConditions
RWIterable<QueryCondition> getQueryConditions()
Get anRWIterable
over an ordered collection ofQueryConditions
. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull
.- Specified by:
getQueryConditions
in interfaceObjectDefinitionComp
- Returns:
- An
RWIterable
over an ordered collection ofQueryCondition
objects .
-
getQueryConditionByName
QueryCondition getQueryConditionByName(String name)
Get the QueryCondition by QueryCondition.- Parameters:
name
-- Returns:
- the QueryCondition, or
null
if it could not be found
-
getQueryFilters
RWIterable<QueryFilter> getQueryFilters()
Get anRWIterable
over 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:
getQueryFilters
in interfaceObjectDefinitionComp
- Returns:
- An
RWIterable
over a collection ofQueryFilter
objects , 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
null
if it could not be found
-
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.
-
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.
-
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.
-
checkModifyIndexPrivilege
RequiredPermission checkModifyIndexPrivilege()
Check whether or not the modifyIndex 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.
-
-