|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flexive.shared.AbstractSelectableObjectWithLabel
com.flexive.shared.structure.FxType
public class FxType
Type definition
| Field Summary | |
|---|---|
protected ACL |
ACL
|
protected java.util.List<FxGroupAssignment> |
assignedGroups
|
protected java.util.List<FxPropertyAssignment> |
assignedProperties
|
static java.lang.String |
AUDIO
Name of the audio type for storing audio file formats (mimetypes audio/*) |
protected boolean |
autoVersion
|
protected TypeCategory |
category
|
static java.lang.String |
CONTACTDATA
Name of the account contact data type |
protected boolean |
containsFlatStorageAssignments
|
protected ACL |
defaultInstanceACL
|
protected java.util.List<FxType> |
derivedTypes
|
static java.lang.String |
DOCUMENT
Name of the document type for storing typical document file formats (application mime types: PDF, Word, Excel, ...) |
static java.lang.String |
DOCUMENTFILE
Name of the ROOT document type for storing (binary) file formats |
static java.lang.String |
FOLDER
Name of the folder data type. |
protected long |
historyAge
|
protected FxReference |
icon
|
protected long |
id
|
static java.lang.String |
IMAGE
Name of the image type for storing image file formats (mimetypes image/*) |
protected boolean |
includedInSupertypeQueries
|
protected FxString |
label
|
protected LanguageMode |
language
|
protected LifeCycleInfo |
lifeCycleInfo
|
protected int |
maxRelDestination
|
protected int |
maxRelSource
|
protected long |
maxVersions
|
protected TypeMode |
mode
|
protected boolean |
multipleContentACLs
|
protected java.lang.String |
name
|
protected java.util.List<FxStructureOption> |
options
|
protected FxType |
parent
|
protected byte |
permissions
|
protected java.util.List<FxTypeRelation> |
relations
|
static java.lang.String |
ROOT
ROOT type name. |
static long |
ROOT_ID
Root type ID. |
protected java.util.List<FxAssignment> |
scriptedAssignments
|
protected java.util.Map<FxScriptEvent,long[]> |
scriptMapping
|
protected TypeState |
state
|
protected TypeStorageMode |
storageMode
|
protected boolean |
trackHistory
|
protected java.util.List<FxProperty> |
uniqueProperties
|
static java.lang.String |
VIDEO
Name of the video type for storing video file formats (mimetypes video/*) |
protected Workflow |
workflow
|
| Constructor Summary | |
|---|---|
FxType(long id,
ACL acl,
ACL defaultInstanceACL,
Workflow workflow,
java.lang.String name,
FxString label,
FxType parent,
TypeStorageMode storageMode,
TypeCategory category,
TypeMode mode,
LanguageMode language,
TypeState state,
byte permissions,
boolean multipleContentACLs,
boolean includedInSupertypeQueries,
boolean trackHistory,
long historyAge,
long maxVersions,
boolean autoVersion,
int maxRelSource,
int maxRelDestination,
LifeCycleInfo lifeCycleInfo,
java.util.List<FxType> derivedTypes,
java.util.List<FxTypeRelation> relations,
java.util.List<FxStructureOption> options)
[fleXive] internal constructor for FxTypes, do not used this outside the flexive core! |
|
FxType(long id,
ACL acl,
Workflow workflow,
java.lang.String name,
FxString label,
FxType parent,
TypeStorageMode storageMode,
TypeCategory category,
TypeMode mode,
LanguageMode language,
TypeState state,
byte permissions,
boolean multipleContentACLs,
boolean includedInSupertypeQueries,
boolean trackHistory,
long historyAge,
long maxVersions,
int maxRelSource,
int maxRelDestination,
LifeCycleInfo lifeCycleInfo,
java.util.List<FxType> derivedTypes,
java.util.List<FxTypeRelation> relations,
java.util.List<FxStructureOption> options)
Deprecated. since 3.1.1 |
|
| Method Summary | |
|---|---|
protected void |
addDerivedTypes(java.util.Collection<FxType> result)
Add the derived types (direct and through transitive dependency) of this type to the result list. |
FxTypeEdit |
asEditable()
Get this FxType as editable |
java.lang.String |
buildXPathPrefix(FxPK pk)
Build an XPath prefix for addressing an instance in XPath's |
FxGroupData |
createEmptyData(java.lang.String xpPrefix)
Create an empty FxData hierarchy for a new FxContent starting with a virtual root group. |
FxGroupData |
createRandomData(FxPK pk,
FxEnvironment env,
java.util.Random rnd,
int maxMultiplicity)
Create a base group with random data |
ACL |
getACL()
Get the ACL of this type |
java.util.List<FxAssignment> |
getAllAssignments()
Get all assignments (groups and properties) that are attached to a type |
java.util.List<FxPropertyAssignment> |
getAllProperties()
Get all property assignments that are attached to the type's root or to a group attached to the type. |
java.util.List<FxGroupAssignment> |
getAssignedGroups()
Get all group assignments that are attached to the type's root |
java.util.List<FxPropertyAssignment> |
getAssignedProperties()
Get all property assignments that are attached to the type's root |
FxAssignment |
getAssignment(java.lang.String parentXPath)
Get the assignment for the given XPath |
java.util.List<FxPropertyAssignment> |
getAssignmentsForDataType(FxDataType dataType)
Get a list of all FxPropertyAssignments connected to this type that are of the given FxDataType. |
java.util.List<FxPropertyAssignment> |
getAssignmentsForProperty(long propertyId)
Get a list of all FxPropertyAssignments connected to this type that are assigned to the requested property |
byte |
getBitCodedPermissions()
Get the permissions set for this type bit coded |
TypeCategory |
getCategory()
Get the category of this FxType (System, User, ...) |
java.util.List<FxAssignment> |
getConnectedAssignments(java.lang.String parentXPath)
Get all assignments directly connected to the given XPath |
ACL |
getDefaultInstanceACL()
Get the default instance ACL for this type. |
java.util.List<FxType> |
getDerivedTypes()
Get all FxTypes that are derived from this Type |
java.util.List<FxType> |
getDerivedTypes(boolean transitive,
boolean includeOwnType)
Get all FxTypes that are derived from this type. |
FxString |
getDescription()
Deprecated. replaced by getLabel() |
java.lang.String |
getDisplayName()
Returrn a localized, human-readable name for the type. |
FxGroupAssignment |
getGroupAssignment(java.lang.String parentXPath)
Get the FxGroupAssignment for the given XPath. |
long |
getHistoryAge()
Get how many days history is tracked (0 = forever) |
FxReference |
getIcon()
Get the preview icon of this type. |
long |
getId()
Internal id of this FxType |
java.util.List<FxStructureOption> |
getInheritedOptions()
Retrieve the List of options which are inherited by derived types |
FxString |
getLabel()
Return the localized label of the object. |
LanguageMode |
getLanguage()
How are languages handled? (None, Single, Multiple, ...) |
LifeCycleInfo |
getLifeCycleInfo()
Get information about changes |
FxPropertyAssignment |
getMainBinaryAssignment()
Determines the property assignment that should be treated as the main binary content for this type. |
java.util.List<FxPropertyAssignment> |
getMandatoryAssignments(FxDataType datatype)
Returns the mandatory assignments of the given type. |
int |
getMaxRelDestination()
How many destination instances may be related to this instance in total? (infinte = <0) |
int |
getMaxRelSource()
How many source instances may be related to this instance in total? (infinte = <0) |
long |
getMaxVersions()
Get how many versions of instances are kept (-1 = infinite, 0 = none) |
FxMimeTypeWrapper |
getMimeType()
Retrieve the mime types for a given FxType |
TypeMode |
getMode()
Is this FxType defining a content or relation? |
java.lang.String |
getName()
Get the name of this FxType |
FxStructureOption |
getOption(java.lang.String key)
Get an option entry for the given key, if the key is invalid or not found a FxTypeStructureOption object
will be returned with set set to false, overridable set to false and value
set to an empty String. |
java.util.List<FxStructureOption> |
getOptions()
Get a (unmodifiable) list of all options set for this group |
FxType |
getParent()
If this FxType is derived from another FxType get the 'super' FxType |
FxPropertyAssignment |
getPropertyAssignment(java.lang.String parentXPath)
Get the FxPropertyAssignment for the given XPath. |
java.util.List<FxTypeRelation> |
getRelations()
Get all possible relation combinations |
java.util.List<FxAssignment> |
getScriptedAssignments(FxScriptEvent event)
Get a list with all assignments that have scripts assigned for the given script type |
java.util.Set<FxScriptEvent> |
getScriptEvents()
Get a Set of all events that have script mappings for this type |
long[] |
getScriptMapping(FxScriptEvent event)
Get the script id's that are mapped to this type for the requested script type |
TypeState |
getState()
Get the state of this type |
TypeStorageMode |
getStorageMode()
Get how is data stored internally. |
java.util.List<FxProperty> |
getUniqueProperties()
Get all properties used in this type that have a unique constraint set |
Workflow |
getWorkflow()
Getter for the assigned Workflow |
boolean |
hasAssignment(java.lang.String xPath)
Check if the requested assignment exists for this type |
boolean |
hasDefaultInstanceACL()
Is a default instance ACL defined for this type? |
boolean |
hasMimeType(java.lang.String mimeType)
Checks if a given mime type is set for the FxType The given String parameter can either be a main type of a mimetype ("e.g." "image" or "image/") or a fully qualified mime type including the subtype, e.g. |
boolean |
hasOption(java.lang.String key)
Check if an option is set for the requested key |
boolean |
hasScriptedAssignments()
Do scripted assignments exists for this type? |
boolean |
hasScriptMapping(FxScriptEvent event)
Does this type have mappings for the requested script event type? |
boolean |
hasUniqueProperties()
Do unique properties for this type exist? |
boolean |
isAutoVersion()
Should new versions be automatically created when data changed? |
boolean |
isContainsFlatStorageAssignments()
Does this type contain assignments that are stored in a flat storage? |
boolean |
isDerived()
Is this FxType derived from another? |
boolean |
isDerivedFrom(long typeId)
Is this FxType derived from the given type? |
boolean |
isDerivedFrom(java.lang.String typeName)
Is this FxType derived from the given type? |
boolean |
isIncludedInSupertypeQueries()
Should this type be included in supertype queries? |
boolean |
isMimeTypeSet()
Convenience method to check if ANY mime type was set for this FxType |
boolean |
isMultipleContentACLs()
Allow multiple ACLs for a content of this type? |
boolean |
isRelation()
Is this type a relation? |
boolean |
isTrackHistory()
Track history of changes? |
boolean |
isUseInstancePermissions()
Use content instance permissions? |
boolean |
isUsePermissions()
Use permissions at all? |
boolean |
isUsePropertyPermissions()
Use property permissions? |
boolean |
isUseStepPermissions()
Use step permissions? |
boolean |
isUseTypePermissions()
Use type permissions? |
boolean |
isXPathValid(java.lang.String XPath,
boolean checkProperty)
Check if the given XPath is valid for this type |
void |
reloadWorkflow(FxEnvironment environment)
Reload this types workflow, internal method, called from the StructureLoader upon Workflow changes |
void |
resolveReferences(FxEnvironment fxStructure)
Resolve references after initial loading |
java.lang.String |
toString()
|
boolean |
useInstancePermissions()
Deprecated. will be removed in 3.2 |
boolean |
usePermissions()
Deprecated. will be removed in 3.2 |
boolean |
usePropertyPermissions()
Deprecated. will be removed in 3.2 |
boolean |
useStepPermissions()
Deprecated. will be removed in 3.2 |
boolean |
useTypePermissions()
Deprecated. will be removed in 3.2 |
| Methods inherited from class com.flexive.shared.AbstractSelectableObjectWithLabel |
|---|
equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long ROOT_ID
public static final java.lang.String ROOT
public static final java.lang.String CONTACTDATA
public static final java.lang.String FOLDER
public static final java.lang.String DOCUMENTFILE
public static final java.lang.String DOCUMENT
public static final java.lang.String IMAGE
public static final java.lang.String AUDIO
public static final java.lang.String VIDEO
protected long id
protected ACL ACL
protected ACL defaultInstanceACL
protected Workflow workflow
protected java.lang.String name
protected FxString label
protected FxType parent
protected TypeStorageMode storageMode
protected TypeCategory category
protected TypeMode mode
protected LanguageMode language
protected TypeState state
protected byte permissions
protected boolean trackHistory
protected long historyAge
protected long maxVersions
protected boolean autoVersion
protected int maxRelSource
protected int maxRelDestination
protected boolean multipleContentACLs
protected boolean includedInSupertypeQueries
protected LifeCycleInfo lifeCycleInfo
protected boolean containsFlatStorageAssignments
protected java.util.List<FxType> derivedTypes
protected java.util.List<FxTypeRelation> relations
protected java.util.List<FxPropertyAssignment> assignedProperties
protected java.util.List<FxProperty> uniqueProperties
protected java.util.List<FxGroupAssignment> assignedGroups
protected java.util.List<FxAssignment> scriptedAssignments
protected java.util.Map<FxScriptEvent,long[]> scriptMapping
protected FxReference icon
protected java.util.List<FxStructureOption> options
| Constructor Detail |
|---|
public FxType(long id,
ACL acl,
ACL defaultInstanceACL,
Workflow workflow,
java.lang.String name,
FxString label,
FxType parent,
TypeStorageMode storageMode,
TypeCategory category,
TypeMode mode,
LanguageMode language,
TypeState state,
byte permissions,
boolean multipleContentACLs,
boolean includedInSupertypeQueries,
boolean trackHistory,
long historyAge,
long maxVersions,
boolean autoVersion,
int maxRelSource,
int maxRelDestination,
LifeCycleInfo lifeCycleInfo,
java.util.List<FxType> derivedTypes,
java.util.List<FxTypeRelation> relations,
java.util.List<FxStructureOption> options)
id - type idacl - type ACLdefaultInstanceACL - optional default ACL to assign for new instancesworkflow - the types workflowname - namelabel - labelparent - parent typestorageMode - storage modecategory - type categorymode - type modelanguage - language modestate - type statepermissions - permissions to use (bit coded)multipleContentACLs - does this type support multiple acls for instances?includedInSupertypeQueries - include this type in super type queries?trackHistory - track history?historyAge - max. age of history to keepmaxVersions - max. number of versions to keep for instances of this typeautoVersion - automatically create a new version when contents changed during a save operationmaxRelSource - max. number of relation sourcesmaxRelDestination - max. number of relation destinationlifeCycleInfo - life cycle info for the typederivedTypes - list of types derived from this typerelations - list of relations this type is affiliated withoptions - type options
public FxType(long id,
ACL acl,
Workflow workflow,
java.lang.String name,
FxString label,
FxType parent,
TypeStorageMode storageMode,
TypeCategory category,
TypeMode mode,
LanguageMode language,
TypeState state,
byte permissions,
boolean multipleContentACLs,
boolean includedInSupertypeQueries,
boolean trackHistory,
long historyAge,
long maxVersions,
int maxRelSource,
int maxRelDestination,
LifeCycleInfo lifeCycleInfo,
java.util.List<FxType> derivedTypes,
java.util.List<FxTypeRelation> relations,
java.util.List<FxStructureOption> options)
id - type idacl - type ACLworkflow - the types workflowname - namelabel - labelparent - parent typestorageMode - storage modecategory - type categorymode - type modelanguage - language modestate - type statepermissions - permissions to use (bit coded)multipleContentACLs - does this type support multiple acls for instances?includedInSupertypeQueries - include this type in super type queries?trackHistory - track history?historyAge - max. age of history to keepmaxVersions - max. number of versions to keep for instances of this typemaxRelSource - max. number of relation sourcesmaxRelDestination - max. number of relation destinationlifeCycleInfo - life cycle info for the typederivedTypes - list of types derived from this typerelations - list of relations this type is affiliated withoptions - type options| Method Detail |
|---|
public TypeCategory getCategory()
public long getId()
getId in interface SelectableObjectpublic ACL getACL()
public boolean hasDefaultInstanceACL()
public ACL getDefaultInstanceACL()
public Workflow getWorkflow()
public void reloadWorkflow(FxEnvironment environment)
environment - environment with updated workflowspublic LanguageMode getLanguage()
public TypeState getState()
public TypeMode getMode()
public java.lang.String getName()
getName in interface SelectableObjectWithName@Deprecated public FxString getDescription()
getLabel()
public FxString getLabel()
getLabel in interface ObjectWithLabelpublic java.lang.String getDisplayName()
public boolean isRelation()
public boolean isDerived()
getParent()public boolean isDerivedFrom(long typeId)
typeId - the parent type
typeId
or when this type's ID is typeIdpublic boolean isDerivedFrom(java.lang.String typeName)
typeName - the type name
typeName
or when the typeName refers to this typepublic FxType getParent()
nullpublic java.util.List<FxType> getDerivedTypes()
public java.util.List<FxType> getDerivedTypes(boolean transitive,
boolean includeOwnType)
transitive - if transitive dependencies (derived types of derived types) should be resolvedincludeOwnType - if the own type should be included (as first element)
protected void addDerivedTypes(java.util.Collection<FxType> result)
result - the result list to be populatedpublic TypeStorageMode getStorageMode()
public boolean usePermissions()
public boolean useInstancePermissions()
public boolean usePropertyPermissions()
public boolean useStepPermissions()
public boolean useTypePermissions()
public boolean isUsePermissions()
public boolean isUseInstancePermissions()
public boolean isUsePropertyPermissions()
public boolean isUseStepPermissions()
public boolean isUseTypePermissions()
public boolean isMultipleContentACLs()
public boolean isIncludedInSupertypeQueries()
public boolean isTrackHistory()
public long getHistoryAge()
public long getMaxVersions()
public boolean isAutoVersion()
public int getMaxRelSource()
public int getMaxRelDestination()
public LifeCycleInfo getLifeCycleInfo()
public java.util.List<FxGroupAssignment> getAssignedGroups()
public java.util.List<FxPropertyAssignment> getAssignedProperties()
public java.util.List<FxPropertyAssignment> getAllProperties()
public java.util.List<FxAssignment> getAllAssignments()
public boolean hasUniqueProperties()
public java.util.List<FxProperty> getUniqueProperties()
public java.util.List<FxTypeRelation> getRelations()
public boolean hasScriptMapping(FxScriptEvent event)
event - requested script event type
public boolean hasScriptedAssignments()
public java.util.List<FxAssignment> getScriptedAssignments(FxScriptEvent event)
event - script event
public long[] getScriptMapping(FxScriptEvent event)
event - requested script event
null if mapping does not exist for this typepublic java.util.Set<FxScriptEvent> getScriptEvents()
public byte getBitCodedPermissions()
public FxReference getIcon()
public void resolveReferences(FxEnvironment fxStructure)
throws FxNotFoundException
fxStructure - structure for references
FxNotFoundException - on errorspublic FxGroupData createEmptyData(java.lang.String xpPrefix)
xpPrefix - XPath prefix like "FxType name[@pk=..]"
public FxGroupData createRandomData(FxPK pk,
FxEnvironment env,
java.util.Random rnd,
int maxMultiplicity)
pk - primary key of instance that uses this random dataenv - environmentrnd - Random to usemaxMultiplicity - the maximum multiplicity for groups
public FxAssignment getAssignment(java.lang.String parentXPath)
parentXPath - desired XPath
public boolean hasAssignment(java.lang.String xPath)
xPath - xpath of the assignment
public FxPropertyAssignment getPropertyAssignment(java.lang.String parentXPath)
parentXPath - desired XPath
public FxPropertyAssignment getMainBinaryAssignment()
However, parent group multiplicities are not yet taken into account.
public java.util.List<FxPropertyAssignment> getMandatoryAssignments(FxDataType datatype)
datatype - data type to check for
public FxGroupAssignment getGroupAssignment(java.lang.String parentXPath)
parentXPath - desired XPath
public java.util.List<FxPropertyAssignment> getAssignmentsForProperty(long propertyId)
propertyId - requested property id
public java.util.List<FxPropertyAssignment> getAssignmentsForDataType(FxDataType dataType)
FxDataType.
dataType - the data type
public java.util.List<FxAssignment> getConnectedAssignments(java.lang.String parentXPath)
parentXPath - desired XPath
public boolean isXPathValid(java.lang.String XPath,
boolean checkProperty)
XPath - the XPath to checkcheckProperty - should the XPath point to a property?
public boolean isContainsFlatStorageAssignments()
public java.lang.String toString()
toString in class AbstractSelectableObjectWithLabelpublic FxTypeEdit asEditable()
public java.lang.String buildXPathPrefix(FxPK pk)
pk - primary key of the instance
public boolean hasOption(java.lang.String key)
key - option key
public FxStructureOption getOption(java.lang.String key)
FxTypeStructureOption object
will be returned with set set to false, overridable set to false and value
set to an empty String.
key - option key
public java.util.List<FxStructureOption> getOptions()
public java.util.List<FxStructureOption> getInheritedOptions()
public FxMimeTypeWrapper getMimeType()
public boolean isMimeTypeSet()
public boolean hasMimeType(java.lang.String mimeType)
mimeType - the mime type's type or the fully qualified mime type as a String parameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||