com.flexive.shared.structure
Interface FxEnvironment

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
FxFilteredEnvironment

public interface FxEnvironment
extends java.io.Serializable

Runtime object for structure metadata held in the cache

Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Method Summary
 boolean assignmentExists(java.lang.String xPath)
          Check if an assignment with the requested XPath exists
 ACL getACL(long id)
          Get an ACL by its id
 ACL getACL(java.lang.String name)
          Get an ACL by its name
 java.util.List<ACL> getACLs()
          Get all ACL's
 java.util.List<ACL> getACLs(ACL.Category category)
          Return all ACLs of the given category.
 java.util.List<ACL> getACLs(long mandatorId)
          Return all ACLs of a given mandatorId.
 java.util.List<ACL> getACLs(long mandatorId, ACL.Category category, boolean includeForeignAccessible)
          Return all ACLs of a given mandatorId and category.
 java.util.List<ACL> getACLs(long mandatorId, boolean includeForeignAccessible)
          Return all ACLs of a given mandatorId and category.
 FxAssignment getAssignment(long assignmentId)
          Get an assignment by its id
 FxAssignment getAssignment(java.lang.String xPath)
          Get a FxGroupAssignment or FxPropertyAssignment that matches for XPath (has to include the type/relation name as root)
 FxDataType getDataType(long id)
          Get a data type by its id
 java.util.List<FxDataType> getDataTypes()
          Get data types
 java.lang.String getDeactivatedTypesList()
          Get a comma separated list of deactivated FxTypes
 ACL getDefaultACL(ACL.Category category)
          Get the default ACL for given categors
 java.util.List<FxAssignment> getDerivedAssignments(long assignmentId)
          Get all assignments that are derived from the requested
 FxGroup getGroup(long id)
          Get a group identified by its id
 FxGroup getGroup(java.lang.String name)
          Get a group identified by its name
 java.util.List<FxGroupAssignment> getGroupAssignments()
          Get all group assignments that are enabled
 java.util.List<FxGroupAssignment> getGroupAssignments(boolean includeDisabled)
          Get all group assignments, optionally including disabled
 java.util.List<FxGroup> getGroups(boolean returnReferenced, boolean returnUnreferenced, boolean returnRootGroups, boolean returnSubGroups)
          Get groups depending on selection criteria
 java.lang.String getInactiveMandatorList()
          Get a comma separated list of inactive mandators
 Mandator getMandator(long id)
          Get a mandator by its id
 Mandator getMandator(java.lang.String name)
          Get a mandator by its name
 java.util.List<Mandator> getMandators(boolean active, boolean inactive)
          Get a list of all mandators depending on selection criteria
 java.util.List<FxProperty> getProperties(boolean returnReferenced, boolean returnUnreferenced)
          Get properties depending on selection criteria
 FxProperty getProperty(long id)
          Get a property identified by its id
 FxProperty getProperty(java.lang.String name)
          Get a property identified by its name
 java.util.List<FxPropertyAssignment> getPropertyAssignments()
          Get all property assignments that are enabled
 java.util.List<FxPropertyAssignment> getPropertyAssignments(boolean includeDisabled)
          Get all property assignments, optionally including disabled
 java.util.List<FxPropertyAssignment> getPropertyAssignments(long propertyId, boolean includeDisabled)
          Get the property assignments for a given property.
 java.util.List<FxType> getReferencingRelationTypes(long typeId)
          Gets relation types that contain the type with the specified id as source or destination of their relations.
 Route getRoute(long routeId)
          Load a given route.
 FxScriptInfo getScript(long scriptId)
          Get a script by its id
 FxScriptInfo getScript(java.lang.String name)
          Get a script by its name (which is unique)
 FxScriptMapping getScriptMapping(long scriptId)
          Get the script mapping for the requested script
 java.util.List<FxScriptMapping> getScriptMappings()
          Get all script mappings
 java.util.List<FxScriptInfo> getScripts()
          Get all scripts
 FxSelectList getSelectList(long id)
          Get the selectlist with the given id
 FxSelectList getSelectList(java.lang.String name)
          Get the selectlist with the given name
 FxSelectListItem getSelectListItem(FxSelectList list, java.lang.String name)
          Get the selectlist item with the given name in the given list
 FxSelectListItem getSelectListItem(long id)
          Get the selectlist item with the given id
 java.util.List<FxSelectList> getSelectLists()
          Get all available select lists
 Step getStep(long stepId)
          Get a Step by its id
 Step getStep(long workflowId, java.lang.String stepName)
          Get a Step by its name
 Step getStepByDefinition(long workflowId, long stepDefinitionId)
          Return the step defined by its unique step definition id and workflow.
 StepDefinition getStepDefinition(long id)
          Returns a step defined by its unique id.
 java.util.List<StepDefinition> getStepDefinitions()
          Get all defined step definitions
 java.util.List<Step> getSteps()
          Get all defined steps
 java.util.List<Step> getStepsByDefinition(long stepDefinitionId)
          Return all steps using a given stepDefinition..
 java.util.List<Step> getStepsByWorkflow(long workflowId)
          Return the steps assigned to a given workflow.
 java.util.List<FxPropertyAssignment> getSystemInternalRootPropertyAssignments()
          Get all system internal property assignments that are connected to the virtual root type
 long getTimeStamp()
          Get the timestamp when this environment was loaded
 FxType getType(long id)
          Get a type or relation identified by its id
 FxType getType(java.lang.String name)
          Get a type or relation identified by its name
 java.util.List<FxType> getTypes()
          Returns all defined types.
 java.util.List<FxType> getTypes(boolean returnBaseTypes, boolean returnDerivedTypes, boolean returnTypes, boolean returnRelations)
          Get types depending on selection criteria
 java.util.List<FxType> getTypesForProperty(long propertyId)
          Get a list of all types that have assignments of the requested property
 Workflow getWorkflow(long id)
          Get a Workflow by its id
 Workflow getWorkflow(java.lang.String name)
          Get a Workflow by its name
 java.util.List<Workflow> getWorkflows()
          Get all workflows
 boolean groupExists(java.lang.String name)
          Check if a group with the requested name exists
 boolean propertyExists(java.lang.String name)
          Check if a property with the requested name exists
 boolean typeExists(java.lang.String name)
          Check if a type with the given name exists
 

Method Detail

getDataTypes

java.util.List<FxDataType> getDataTypes()
Get data types

Returns:
a list of all data types

getDataType

FxDataType getDataType(long id)
Get a data type by its id

Parameters:
id - data type id
Returns:
FxDataType

getACL

ACL getACL(long id)
Get an ACL by its id

Parameters:
id - ACL id
Returns:
ACL

getACL

ACL getACL(java.lang.String name)
Get an ACL by its name

Parameters:
name - name of the ACL (case sensitive!)
Returns:
ACL the found ACL

getACLs

java.util.List<ACL> getACLs()
Get all ACL's

Returns:
ACL's

getACLs

java.util.List<ACL> getACLs(ACL.Category category)
Return all ACLs of the given category.

Parameters:
category - ACL category to be filtered
Returns:
all ACLs of the given category.

getACLs

java.util.List<ACL> getACLs(long mandatorId)
Return all ACLs of a given mandatorId.

Parameters:
mandatorId - the function returns all ACLs from this mandatorId
Returns:
all ACLs of the given mandator

getACLs

java.util.List<ACL> getACLs(long mandatorId,
                            boolean includeForeignAccessible)
Return all ACLs of a given mandatorId and category.

Parameters:
mandatorId - the function loads all ACLs from this mandatorId.
includeForeignAccessible - when true, also loads ACLs that the calling user has at least one permission on, even if they belong to another mandator.
Returns:
the ACLs

getACLs

java.util.List<ACL> getACLs(long mandatorId,
                            ACL.Category category,
                            boolean includeForeignAccessible)
Return all ACLs of a given mandatorId and category.

Parameters:
mandatorId - the function loads all ACLs from this mandatorId.
category - a ACL.CATEGORY_... constant or -1 if the category should be ignored
includeForeignAccessible - when true, also loads ACLs that the calling user has at least one permission on, even if they belong to another mandator.
Returns:
the ACLs

getDefaultACL

ACL getDefaultACL(ACL.Category category)
Get the default ACL for given categors

Parameters:
category - the category to get a default ACL for
Returns:
the default ACL for given categors

getWorkflow

Workflow getWorkflow(long id)
Get a Workflow by its id

Parameters:
id - workflow id
Returns:
Workflow

getWorkflow

Workflow getWorkflow(java.lang.String name)
Get a Workflow by its name

Parameters:
name - workflow name
Returns:
Workflow

getWorkflows

java.util.List<Workflow> getWorkflows()
Get all workflows

Returns:
all workflows

getMandator

Mandator getMandator(long id)
Get a mandator by its id

Parameters:
id - the mandator id
Returns:
the mandator with the given id

getMandator

Mandator getMandator(java.lang.String name)
Get a mandator by its name

Parameters:
name - the mandator name
Returns:
the mandator of the given name

getMandators

java.util.List<Mandator> getMandators(boolean active,
                                      boolean inactive)
Get a list of all mandators depending on selection criteria

Parameters:
active - return active mandators?
inactive - return inactive mandators?
Returns:
list of all mandators depending on selection criteria

getGroups

java.util.List<FxGroup> getGroups(boolean returnReferenced,
                                  boolean returnUnreferenced,
                                  boolean returnRootGroups,
                                  boolean returnSubGroups)
Get groups depending on selection criteria

Parameters:
returnReferenced - return groups that are referenced from a type
returnUnreferenced - return groups that are not referenced from a type
returnRootGroups - return groups from the 'root' level (only checked if returning referenced)
returnSubGroups - return groups that are subgroups of other groups (only checked if returning referenced)
Returns:
FxGroup ArrayList

getGroup

FxGroup getGroup(long id)
Get a group identified by its id

Parameters:
id - group id
Returns:
FxGroup

getGroup

FxGroup getGroup(java.lang.String name)
Get a group identified by its name

Parameters:
name - group name
Returns:
FxGroup

getProperties

java.util.List<FxProperty> getProperties(boolean returnReferenced,
                                         boolean returnUnreferenced)
Get properties depending on selection criteria

Parameters:
returnReferenced - return properties that are referenced from a type
returnUnreferenced - return properties that are not referenced from a type
Returns:
FxProperty iterator

getProperty

FxProperty getProperty(long id)
Get a property identified by its id

Parameters:
id - property id
Returns:
FxProperty

getProperty

FxProperty getProperty(java.lang.String name)
Get a property identified by its name

Parameters:
name - property name
Returns:
FxProperty

propertyExists

boolean propertyExists(java.lang.String name)
Check if a property with the requested name exists

Parameters:
name - name of the property
Returns:
exists

assignmentExists

boolean assignmentExists(java.lang.String xPath)
Check if an assignment with the requested XPath exists

Parameters:
xPath - XPath of the assignment
Returns:
exists

groupExists

boolean groupExists(java.lang.String name)
Check if a group with the requested name exists

Parameters:
name - name of the group
Returns:
exists

getPropertyAssignments

java.util.List<FxPropertyAssignment> getPropertyAssignments()
Get all property assignments that are enabled

Returns:
enabled property assignments

getSystemInternalRootPropertyAssignments

java.util.List<FxPropertyAssignment> getSystemInternalRootPropertyAssignments()
Get all system internal property assignments that are connected to the virtual root type

Returns:
system internal property assignments

getPropertyAssignments

java.util.List<FxPropertyAssignment> getPropertyAssignments(boolean includeDisabled)
Get all property assignments, optionally including disabled

Parameters:
includeDisabled - include disabled assignments?
Returns:
property assignments, optionally including disabled

getPropertyAssignments

java.util.List<FxPropertyAssignment> getPropertyAssignments(long propertyId,
                                                            boolean includeDisabled)
Get the property assignments for a given property.

Parameters:
propertyId - the property ID
includeDisabled - include disabled assignments?
Returns:
property all assignments of the given property

getGroupAssignments

java.util.List<FxGroupAssignment> getGroupAssignments()
Get all group assignments that are enabled

Returns:
enabled group assignments

getGroupAssignments

java.util.List<FxGroupAssignment> getGroupAssignments(boolean includeDisabled)
Get all group assignments, optionally including disabled

Parameters:
includeDisabled - include disabled assignments?
Returns:
group assignments, optionally including disabled

getAssignment

FxAssignment getAssignment(java.lang.String xPath)
Get a FxGroupAssignment or FxPropertyAssignment that matches for XPath (has to include the type/relation name as root)

Parameters:
xPath - requested XPath
Returns:
FxGroupAssignment or FxPropertyAssignment that matches for XPath (has to include the type/relation name as root)

getAssignment

FxAssignment getAssignment(long assignmentId)
Get an assignment by its id

Parameters:
assignmentId - assignment id
Returns:
the assignment

getDerivedAssignments

java.util.List<FxAssignment> getDerivedAssignments(long assignmentId)
Get all assignments that are derived from the requested

Parameters:
assignmentId - the assignment whose derived children are sought after
Returns:
derived assignments

getType

FxType getType(java.lang.String name)
Get a type or relation identified by its name

Parameters:
name - type name
Returns:
type or relation identified by its name

typeExists

boolean typeExists(java.lang.String name)
Check if a type with the given name exists

Parameters:
name - type name to check for
Returns:
true if the type exists

getTypes

java.util.List<FxType> getTypes()
Returns all defined types.

Returns:
all defined types.

getTypes

java.util.List<FxType> getTypes(boolean returnBaseTypes,
                                boolean returnDerivedTypes,
                                boolean returnTypes,
                                boolean returnRelations)
Get types depending on selection criteria

Parameters:
returnBaseTypes - return types that are not derived from another type
returnDerivedTypes - return types that are derived from another type
returnTypes - return FxTypes
returnRelations - return FxTypes that are relations
Returns:
FxType iterator

getReferencingRelationTypes

java.util.List<FxType> getReferencingRelationTypes(long typeId)
Gets relation types that contain the type with the specified id as source or destination of their relations.

Parameters:
typeId - id which is referenced by relations
Returns:
list of relation types that contain relations to the type with the specified id

getType

FxType getType(long id)
Get a type or relation identified by its id

Parameters:
id - type id
Returns:
type or relation identified by its id

getStepDefinition

StepDefinition getStepDefinition(long id)
Returns a step defined by its unique id.

Parameters:
id - the unique step definition id
Returns:
the step definition object

getStepDefinitions

java.util.List<StepDefinition> getStepDefinitions()
Get all defined step definitions

Returns:
ArrayList

getSteps

java.util.List<Step> getSteps()
Get all defined steps

Returns:
sll defined steps

getStepByDefinition

Step getStepByDefinition(long workflowId,
                         long stepDefinitionId)
Return the step defined by its unique step definition id and workflow.

Parameters:
stepDefinitionId - the step definition id
workflowId - the workflow the step has to be in
Returns:
the matching step

getStepsByDefinition

java.util.List<Step> getStepsByDefinition(long stepDefinitionId)
Return all steps using a given stepDefinition..

Parameters:
stepDefinitionId - the step definition id
Returns:
the matching steps, is a empty result if the stepdefinitionId does not exist or if no steps were found

getStepsByWorkflow

java.util.List<Step> getStepsByWorkflow(long workflowId)
Return the steps assigned to a given workflow.

Parameters:
workflowId - workflow to return the step definitions for
Returns:
the steps assigned to a given workflow.

getStep

Step getStep(long stepId)
Get a Step by its id

Parameters:
stepId - step id
Returns:
Step

getStep

Step getStep(long workflowId,
             java.lang.String stepName)
Get a Step by its name

Parameters:
workflowId - id of the workflow
stepName - name of the step
Returns:
Step

getRoute

Route getRoute(long routeId)
Load a given route.

Parameters:
routeId - the route to be loaded
Returns:
the requested route

getSelectLists

java.util.List<FxSelectList> getSelectLists()
Get all available select lists

Returns:
all available select lists

getSelectList

FxSelectList getSelectList(long id)
Get the selectlist with the given id

Parameters:
id - requested select list id
Returns:
select list

getSelectList

FxSelectList getSelectList(java.lang.String name)
Get the selectlist with the given name

Parameters:
name - requested select list name
Returns:
select list

getSelectListItem

FxSelectListItem getSelectListItem(long id)
Get the selectlist item with the given id

Parameters:
id - requested select list item id
Returns:
select list item

getSelectListItem

FxSelectListItem getSelectListItem(FxSelectList list,
                                   java.lang.String name)
Get the selectlist item with the given name in the given list

Parameters:
list - the list containing the item
name - requested select list item name
Returns:
select list item

getScripts

java.util.List<FxScriptInfo> getScripts()
Get all scripts

Returns:
all scripts

getScriptMappings

java.util.List<FxScriptMapping> getScriptMappings()
Get all script mappings

Returns:
all script mappings

getScriptMapping

FxScriptMapping getScriptMapping(long scriptId)
Get the script mapping for the requested script

Parameters:
scriptId - requested script id
Returns:
script mapping

getScript

FxScriptInfo getScript(long scriptId)
Get a script by its id

Parameters:
scriptId - requested script id
Returns:
the script info object

getScript

FxScriptInfo getScript(java.lang.String name)
Get a script by its name (which is unique)

Parameters:
name - requested script name
Returns:
the script info object

getTimeStamp

long getTimeStamp()
Get the timestamp when this environment was loaded

Returns:
timestamp when this environment was loaded

getTypesForProperty

java.util.List<FxType> getTypesForProperty(long propertyId)
Get a list of all types that have assignments of the requested property

Parameters:
propertyId - requested propery
Returns:
list of all types that have assignments of the requested property

getInactiveMandatorList

java.lang.String getInactiveMandatorList()
Get a comma separated list of inactive mandators

Returns:
comma separated list of inactive mandators

getDeactivatedTypesList

java.lang.String getDeactivatedTypesList()
Get a comma separated list of deactivated FxTypes

Returns:
comma separated list of deactivated FxTypes