com.flexive.shared.structure
Class FxFilteredEnvironment

java.lang.Object
  extended by com.flexive.shared.structure.FxFilteredEnvironment
All Implemented Interfaces:
FxEnvironment, java.io.Serializable

public final class FxFilteredEnvironment
extends java.lang.Object
implements FxEnvironment

An environment wrapper that returns only data visible for the calling user.

The default FxEnvironment implementation represents the global flexive environment and does not filter contents based on the current user. This class performs additional checks and should be used for retrieving environment data that is displayed to the user.

Version:
$Rev: 2919 $
Author:
Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Constructor Summary
FxFilteredEnvironment(FxEnvironment environment)
           
 
Method Summary
 boolean aclExists(java.lang.String name)
          Check if an ACL of the given name exists
 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(ACLCategory 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, ACLCategory 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(ACLCategory category)
          Get the default ACL for given categors
 java.util.List<FxAssignment> getDerivedAssignments(long assignmentId)
          Get all assignments that are derived from the requested
 java.util.List<FxFlatStorageMapping> getFlatStorageMappings(java.lang.String storage, long typeId, int level)
          Get FxFlatStorage Mappings for the requested storage, type and level
 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<FxGroupAssignment> getGroupAssignments(long groupId, boolean includeDisabled)
          Get all group assignments for a given id, optionally including disabled assignments
 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
 FxLanguage getLanguage(long id)
          Return the language for the given ID.
 FxLanguage getLanguage(java.lang.String isoCode)
          Return the language for the given ISO code.
 java.util.List<FxLanguage> getLanguages()
          Return all activated languages.
 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
 FxType getMimeTypeMatch(java.lang.String mimeType)
          Return the closest matching FxType (any derived type of DocumentFile) for a given mime type
 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
 FxPropertyAssignment getPropertyAssignment(long id)
          Return the property assignment for the given ID.
 FxPropertyAssignment getPropertyAssignment(java.lang.String xpath)
          Return the property assignment that matches the given XPath (has to include the type/relation name as root)
 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<FxPropertyAssignment> getReferencingPropertyAssignments(long propertyId)
          Returns all property assignments that are referencing this property which the current user may see, excluding the system internal assignments.
 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
 FxScriptSchedule getScriptSchedule(long scriptScheduleId)
          Get a script schedule by its id
 java.util.List<FxScriptSchedule> getScriptSchedules()
          Get all script schedules
 java.util.List<FxScriptSchedule> getScriptSchedulesForScript(long scriptId)
          Get all script schedules for a script
 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.
 StepDefinition getStepDefinition(java.lang.String name)
          Returns a step defined by its unique name.
 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
 UserGroup getUserGroup(long id)
          Get a user group by id
 UserGroup getUserGroup(java.lang.String name)
          Get a user group by id
 java.util.List<UserGroup> getUserGroups()
          Return all defined user groups
 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 groupExistsInType(java.lang.String typeName, java.lang.String groupName)
          Check if a group exists within the given type
 boolean isLanguageActive(long id)
          Return if the requested language id is active
 boolean isLanguageActive(java.lang.String isoCode)
          Return if the requested language iso 2-digit code is active
 boolean propertyExists(java.lang.String name)
          Check if a property with the requested name exists
 boolean propertyExistsInType(java.lang.String typeName, java.lang.String propertyName)
          Check if a property exists within the given type
 boolean scriptExists(java.lang.String name)
          Check if a script with the given name exists
 boolean selectListExists(java.lang.String name)
          Check if a FxSelectList with the given name exists
 boolean typeExists(java.lang.String name)
          Check if a type with the given name exists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FxFilteredEnvironment

public FxFilteredEnvironment(FxEnvironment environment)
Method Detail

getStepDefinitions

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

Specified by:
getStepDefinitions in interface FxEnvironment
Returns:
ArrayList

getStepDefinition

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

Specified by:
getStepDefinition in interface FxEnvironment
Parameters:
id - the unique step definition id
Returns:
the step definition object

getStepDefinition

public StepDefinition getStepDefinition(java.lang.String name)
Returns a step defined by its unique name.

Specified by:
getStepDefinition in interface FxEnvironment
Parameters:
name - the unique step definition id
Returns:
the step definition object

getStepByDefinition

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

Specified by:
getStepByDefinition in interface FxEnvironment
Parameters:
workflowId - the workflow the step has to be in
stepDefinitionId - the step definition id
Returns:
the matching step

getStepsByDefinition

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

Specified by:
getStepsByDefinition in interface FxEnvironment
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

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

Specified by:
getStepsByWorkflow in interface FxEnvironment
Parameters:
workflowId - workflow to return the step definitions for
Returns:
the steps assigned to a given workflow.

getStep

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

Specified by:
getStep in interface FxEnvironment
Parameters:
stepId - step id
Returns:
Step

getStep

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

Specified by:
getStep in interface FxEnvironment
Parameters:
workflowId - id of the workflow
stepName - name of the step
Returns:
Step

getSteps

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

Specified by:
getSteps in interface FxEnvironment
Returns:
sll defined steps

getDataTypes

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

Specified by:
getDataTypes in interface FxEnvironment
Returns:
a list of all data types

getDataType

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

Specified by:
getDataType in interface FxEnvironment
Parameters:
id - data type id
Returns:
FxDataType

getACL

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

Specified by:
getACL in interface FxEnvironment
Parameters:
id - ACL id
Returns:
ACL

getACL

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

Specified by:
getACL in interface FxEnvironment
Parameters:
name - name of the ACL (case sensitive!)
Returns:
ACL the found ACL

aclExists

public boolean aclExists(java.lang.String name)
Check if an ACL of the given name exists

Specified by:
aclExists in interface FxEnvironment
Parameters:
name - name of the ACL
Returns:
exists

getACLs

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

Specified by:
getACLs in interface FxEnvironment
Returns:
ACL's

getACLs

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

Specified by:
getACLs in interface FxEnvironment
Parameters:
category - ACL category to be filtered
Returns:
all ACLs of the given category.

getACLs

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

Specified by:
getACLs in interface FxEnvironment
Parameters:
mandatorId - the function returns all ACLs from this mandatorId
Returns:
all ACLs of the given mandator

getACLs

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

Specified by:
getACLs in interface FxEnvironment
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

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

Specified by:
getACLs in interface FxEnvironment
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

public ACL getDefaultACL(ACLCategory category)
Get the default ACL for given categors

Specified by:
getDefaultACL in interface FxEnvironment
Parameters:
category - the category to get a default ACL for
Returns:
the default ACL for given categors

getWorkflow

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

Specified by:
getWorkflow in interface FxEnvironment
Parameters:
id - workflow id
Returns:
Workflow

getWorkflow

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

Specified by:
getWorkflow in interface FxEnvironment
Parameters:
name - workflow name
Returns:
Workflow

getWorkflows

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

Specified by:
getWorkflows in interface FxEnvironment
Returns:
all workflows

getMandator

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

Specified by:
getMandator in interface FxEnvironment
Parameters:
id - the mandator id
Returns:
the mandator with the given id

getMandator

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

Specified by:
getMandator in interface FxEnvironment
Parameters:
name - the mandator name
Returns:
the mandator of the given name

getMandators

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

Specified by:
getMandators in interface FxEnvironment
Parameters:
active - return active mandators?
inactive - return inactive mandators?
Returns:
list of all mandators depending on selection criteria

getGroups

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

Specified by:
getGroups in interface FxEnvironment
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

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

Specified by:
getGroup in interface FxEnvironment
Parameters:
id - group id
Returns:
FxGroup

getGroup

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

Specified by:
getGroup in interface FxEnvironment
Parameters:
name - group name
Returns:
FxGroup

getProperties

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

Specified by:
getProperties in interface FxEnvironment
Parameters:
returnReferenced - return properties that are referenced from a type
returnUnreferenced - return properties that are not referenced from a type
Returns:
FxProperty iterator

getProperty

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

Specified by:
getProperty in interface FxEnvironment
Parameters:
id - property id
Returns:
FxProperty

getProperty

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

Specified by:
getProperty in interface FxEnvironment
Parameters:
name - property name
Returns:
FxProperty

propertyExists

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

Specified by:
propertyExists in interface FxEnvironment
Parameters:
name - name of the property
Returns:
exists

propertyExistsInType

public boolean propertyExistsInType(java.lang.String typeName,
                                    java.lang.String propertyName)
Check if a property exists within the given type

Specified by:
propertyExistsInType in interface FxEnvironment
Parameters:
typeName - the type's name
propertyName - the property's name
Returns:
exists

groupExistsInType

public boolean groupExistsInType(java.lang.String typeName,
                                 java.lang.String groupName)
Check if a group exists within the given type

Specified by:
groupExistsInType in interface FxEnvironment
Parameters:
typeName - the type's name
groupName - the group's name
Returns:
exists

assignmentExists

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

Specified by:
assignmentExists in interface FxEnvironment
Parameters:
xPath - XPath of the assignment
Returns:
exists

groupExists

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

Specified by:
groupExists in interface FxEnvironment
Parameters:
name - name of the group
Returns:
exists

getPropertyAssignments

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

Specified by:
getPropertyAssignments in interface FxEnvironment
Returns:
enabled property assignments

getSystemInternalRootPropertyAssignments

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

Specified by:
getSystemInternalRootPropertyAssignments in interface FxEnvironment
Returns:
system internal property assignments

getPropertyAssignments

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

Specified by:
getPropertyAssignments in interface FxEnvironment
Parameters:
includeDisabled - include disabled assignments?
Returns:
property assignments, optionally including disabled

getPropertyAssignments

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

Specified by:
getPropertyAssignments in interface FxEnvironment
Parameters:
propertyId - the property ID
includeDisabled - include disabled assignments?
Returns:
property all assignments of the given property

getGroupAssignments

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

Specified by:
getGroupAssignments in interface FxEnvironment
Returns:
enabled group assignments

getGroupAssignments

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

Specified by:
getGroupAssignments in interface FxEnvironment
Parameters:
includeDisabled - include disabled assignments?
Returns:
group assignments, optionally including disabled

getGroupAssignments

public java.util.List<FxGroupAssignment> getGroupAssignments(long groupId,
                                                             boolean includeDisabled)
Get all group assignments for a given id, optionally including disabled assignments

Specified by:
getGroupAssignments in interface FxEnvironment
Parameters:
groupId - the group's id for which to get the assignments
includeDisabled - include disabled assignments?
Returns:
group assignments, optionally including disabled

getTypes

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

Specified by:
getTypes in interface FxEnvironment
Returns:
all defined types.

getTypes

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

Specified by:
getTypes in interface FxEnvironment
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

public 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.

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

getAssignment

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

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

getAssignment

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

Specified by:
getAssignment in interface FxEnvironment
Parameters:
assignmentId - assignment id
Returns:
the assignment

getDerivedAssignments

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

Specified by:
getDerivedAssignments in interface FxEnvironment
Parameters:
assignmentId - the assignment whose derived children are sought after
Returns:
derived assignments

getReferencingPropertyAssignments

public java.util.List<FxPropertyAssignment> getReferencingPropertyAssignments(long propertyId)
Returns all property assignments that are referencing this property which the current user may see, excluding the system internal assignments.

Specified by:
getReferencingPropertyAssignments in interface FxEnvironment
Parameters:
propertyId - the property which is referenced
Returns:
a list of property assignments that are referencing this property.

getType

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

Specified by:
getType in interface FxEnvironment
Parameters:
name - type name
Returns:
type or relation identified by its name

typeExists

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

Specified by:
typeExists in interface FxEnvironment
Parameters:
name - type name to check for
Returns:
true if the type exists

getType

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

Specified by:
getType in interface FxEnvironment
Parameters:
id - type id
Returns:
type or relation identified by its id

getTypesForProperty

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

Specified by:
getTypesForProperty in interface FxEnvironment
Parameters:
propertyId - requested propery
Returns:
list of all types that have assignments of the requested property

getRoute

public Route getRoute(long routeId)
Load a given route.

Specified by:
getRoute in interface FxEnvironment
Parameters:
routeId - the route to be loaded
Returns:
the requested route

getScripts

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

Specified by:
getScripts in interface FxEnvironment
Returns:
all scripts

getScript

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

Specified by:
getScript in interface FxEnvironment
Parameters:
scriptId - requested script id
Returns:
the script info object

getScript

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

Specified by:
getScript in interface FxEnvironment
Parameters:
name - requested script name
Returns:
the script info object

scriptExists

public boolean scriptExists(java.lang.String name)
Check if a script with the given name exists

Specified by:
scriptExists in interface FxEnvironment
Parameters:
name - script name to check
Returns:
exists

getScriptMappings

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

Specified by:
getScriptMappings in interface FxEnvironment
Returns:
all script mappings

getScriptMapping

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

Specified by:
getScriptMapping in interface FxEnvironment
Parameters:
scriptId - requested script id
Returns:
script mapping

getScriptSchedules

public java.util.List<FxScriptSchedule> getScriptSchedules()
Get all script schedules

Specified by:
getScriptSchedules in interface FxEnvironment
Returns:
all script schedules
Since:
3.1.2

getScriptSchedule

public FxScriptSchedule getScriptSchedule(long scriptScheduleId)
Get a script schedule by its id

Specified by:
getScriptSchedule in interface FxEnvironment
Parameters:
scriptScheduleId - requested script schedule id
Returns:
the script schedule
Since:
3.1.2

getScriptSchedulesForScript

public java.util.List<FxScriptSchedule> getScriptSchedulesForScript(long scriptId)
Get all script schedules for a script

Specified by:
getScriptSchedulesForScript in interface FxEnvironment
Parameters:
scriptId - requested script id
Returns:
all script schedules for a script
Since:
3.1.2

getTimeStamp

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

Specified by:
getTimeStamp in interface FxEnvironment
Returns:
timestamp when this environment was loaded

getSelectLists

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

Specified by:
getSelectLists in interface FxEnvironment
Returns:
all available select lists

getSelectList

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

Specified by:
getSelectList in interface FxEnvironment
Parameters:
id - requested select list id
Returns:
select list

getSelectList

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

Specified by:
getSelectList in interface FxEnvironment
Parameters:
name - requested select list name
Returns:
select list

selectListExists

public boolean selectListExists(java.lang.String name)
Check if a FxSelectList with the given name exists

Specified by:
selectListExists in interface FxEnvironment
Parameters:
name - name of the select list
Returns:
exists

getSelectListItem

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

Specified by:
getSelectListItem in interface FxEnvironment
Parameters:
id - requested select list item id
Returns:
select list item

getSelectListItem

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

Specified by:
getSelectListItem in interface FxEnvironment
Parameters:
list - the list containing the item
name - requested select list item name
Returns:
select list item

getInactiveMandatorList

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

Specified by:
getInactiveMandatorList in interface FxEnvironment
Returns:
comma separated list of inactive mandators

getDeactivatedTypesList

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

Specified by:
getDeactivatedTypesList in interface FxEnvironment
Returns:
comma separated list of deactivated FxTypes

getPropertyAssignment

public FxPropertyAssignment getPropertyAssignment(java.lang.String xpath)
Return the property assignment that matches the given XPath (has to include the type/relation name as root)

Specified by:
getPropertyAssignment in interface FxEnvironment
Parameters:
xpath - requested xpath
Returns:
the property assignment that matches the given XPath

getPropertyAssignment

public FxPropertyAssignment getPropertyAssignment(long id)
Return the property assignment for the given ID.

Specified by:
getPropertyAssignment in interface FxEnvironment
Parameters:
id - the requested ID
Returns:
the property assignment that matches the given XPath

getFlatStorageMappings

public java.util.List<FxFlatStorageMapping> getFlatStorageMappings(java.lang.String storage,
                                                                   long typeId,
                                                                   int level)
Get FxFlatStorage Mappings for the requested storage, type and level

Specified by:
getFlatStorageMappings in interface FxEnvironment
Parameters:
storage - flat storage
typeId - type id
level - level
Returns:
Mappings for the requested storage, type and level

getLanguage

public FxLanguage getLanguage(long id)
Return the language for the given ID. If the language is not found or disabled, a FxRuntimeException is thrown.

Specified by:
getLanguage in interface FxEnvironment
Parameters:
id - the language ID
Returns:
the language

getLanguage

public FxLanguage getLanguage(java.lang.String isoCode)
Return the language for the given ISO code. If the language is not found or disabled, a FxRuntimeException is thrown.

Specified by:
getLanguage in interface FxEnvironment
Parameters:
isoCode - the language ISO code
Returns:
the language

getLanguages

public java.util.List<FxLanguage> getLanguages()
Return all activated languages.

Specified by:
getLanguages in interface FxEnvironment
Returns:
a list with all available language objects

isLanguageActive

public boolean isLanguageActive(long id)
Return if the requested language id is active

Specified by:
isLanguageActive in interface FxEnvironment
Parameters:
id - language id
Returns:
active

isLanguageActive

public boolean isLanguageActive(java.lang.String isoCode)
Return if the requested language iso 2-digit code is active

Specified by:
isLanguageActive in interface FxEnvironment
Parameters:
isoCode - the language ISO code
Returns:
active

getMimeTypeMatch

public FxType getMimeTypeMatch(java.lang.String mimeType)
Return the closest matching FxType (any derived type of DocumentFile) for a given mime type

Specified by:
getMimeTypeMatch in interface FxEnvironment
Parameters:
mimeType - e.g. application/pdf as a String
Returns:
the relevant FxType or the resp. root type f. a given main mime type (i.e. DocumentFile f. unknown/unknown, Image f. image/unknown, Document f. application/unknown

getUserGroups

public java.util.List<UserGroup> getUserGroups()
Return all defined user groups

Specified by:
getUserGroups in interface FxEnvironment
Returns:
list of all user groups

getUserGroup

public UserGroup getUserGroup(long id)
Get a user group by id

Specified by:
getUserGroup in interface FxEnvironment
Parameters:
id - id of the user group
Returns:
UserGroup or null if not found

getUserGroup

public UserGroup getUserGroup(java.lang.String name)
Get a user group by id

Specified by:
getUserGroup in interface FxEnvironment
Parameters:
name - name of the user group
Returns:
UserGroup or null if not found