|
||||||||||
| 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
com.flexive.shared.structure.FxTypeEdit
public class FxTypeEdit
FxType used for structure editing
| Field Summary | |
|---|---|
protected boolean |
changed
|
| Fields inherited from class com.flexive.shared.structure.FxType |
|---|
ACL, assignedGroups, assignedProperties, AUDIO, autoVersion, category, CONTACTDATA, containsFlatStorageAssignments, defaultInstanceACL, derivedTypes, DOCUMENT, DOCUMENTFILE, FOLDER, historyAge, icon, id, IMAGE, includedInSupertypeQueries, label, language, lifeCycleInfo, maxRelDestination, maxRelSource, maxVersions, mode, multipleContentACLs, name, options, parent, permissions, relations, ROOT, ROOT_ID, scriptedAssignments, scriptMapping, state, storageMode, trackHistory, uniqueProperties, VIDEO, workflow |
| Constructor Summary | |
|---|---|
FxTypeEdit(FxType type)
Create a new FxTypeEdit instance for editing and updating an existing FxType |
|
| Method Summary | |
|---|---|
FxGroupAssignmentEdit |
addGroup(java.lang.String name)
Add a new group to this type. |
FxPropertyAssignmentEdit |
addProperty(java.lang.String name,
FxDataType dataType)
Add a new assignment to this type. |
FxPropertyAssignmentEdit |
addReferenceProperty(java.lang.String name,
FxType referencedType)
Add a reference assignment to this type. |
FxTypeEdit |
addRelation(FxTypeRelation relation)
Add or update a relation |
FxPropertyAssignmentEdit |
addSelectListProperty(java.lang.String name,
FxSelectList referencedList,
boolean selectMany)
Add a new select list assignment to this type. |
void |
clearOption(java.lang.String key)
Clear an option entry |
static FxTypeEdit |
createNew(java.lang.String name)
Create a new FxTypeEdit instance for creating a new FxType |
static FxTypeEdit |
createNew(java.lang.String name,
FxString label,
ACL acl)
Create a new FxTypeEdit instance for creating a new FxType |
static FxTypeEdit |
createNew(java.lang.String name,
FxString label,
ACL acl,
ACL defaultInstanceACL,
Workflow workflow,
FxType parent,
boolean enableParentAssignments,
TypeStorageMode storageMode,
TypeCategory category,
TypeMode mode,
LanguageMode language,
TypeState state,
byte permissions,
boolean trackHistory,
long historyAge,
long maxVersions,
boolean autoVersion,
int maxRelSource,
int maxRelDestination)
Create a new FxTypeEdit instance for creating a new FxType (no structure options) |
static FxTypeEdit |
createNew(java.lang.String name,
FxString label,
ACL acl,
ACL defaultInstanceACL,
Workflow workflow,
FxType parent,
boolean enableParentAssignments,
TypeStorageMode storageMode,
TypeCategory category,
TypeMode mode,
LanguageMode language,
TypeState state,
byte permissions,
boolean trackHistory,
long historyAge,
long maxVersions,
boolean autoVersion,
int maxRelSource,
int maxRelDestination,
java.util.List<FxStructureOption> options)
Create a new FxTypeEdit instance for creating a new FxType |
static FxTypeEdit |
createNew(java.lang.String name,
FxString label,
ACL acl,
FxType parent)
Create a new FxTypeEdit instance derived from an existing FxType using the parents default instance ACL if it is set |
static FxTypeEdit |
createNew(java.lang.String name,
FxString label,
ACL acl,
Workflow workflow,
FxType parent,
boolean enableParentAssignments,
TypeStorageMode storageMode,
TypeCategory category,
TypeMode mode,
LanguageMode language,
TypeState state,
byte permissions,
boolean trackHistory,
long historyAge,
long maxVersions,
boolean autoVersion,
int maxRelSource,
int maxRelDestination)
Deprecated. since 3.1.1 (defaultInstanceACL added to method) |
static FxTypeEdit |
createNew(java.lang.String name,
FxString label,
ACL acl,
Workflow workflow,
FxType parent,
boolean enableParentAssignments,
TypeStorageMode storageMode,
TypeCategory category,
TypeMode mode,
LanguageMode language,
TypeState state,
byte permissions,
boolean trackHistory,
long historyAge,
long maxVersions,
int maxRelSource,
int maxRelDestination,
java.util.List<FxStructureOption> options)
Deprecated. since 3.1.1 (defaultInstanceACL added to method) |
static FxTypeEdit |
createNew(java.lang.String name,
FxType parentType)
Create a new FxTypeEdit instance for creating a derived FxType |
static FxTypeEdit |
createNew(java.lang.String name,
long parentTypeId)
Create a new FxTypeEdit instance for creating a new FxType |
static FxTypeEdit |
createNew(java.lang.String name,
java.lang.String parentTypeName)
Create a new FxTypeEdit instance for creating a derived FxType |
java.util.List<FxTypeRelation> |
getAddedRelations()
Get a list of all FxTypeRelations that have been added |
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 |
java.util.List<FxTypeRelation> |
getRemovedRelations()
Get a list of all FxTypeRelations that have been removed |
java.util.List<FxTypeRelation> |
getUpdatedRelations()
Get a list of all FxTypeRelations that have been updated |
boolean |
isChanged()
Have changes been made? |
boolean |
isEnableParentAssignments()
Enable parent assignments if creating a derived type? This method has no effect if editing an existing type! |
boolean |
isNew()
Is this a new type or updating an existing type? |
boolean |
isRemoveInstancesWithRelationTypes()
If FxTypeRelation entries are removed, remove all affected instances? |
boolean |
mayAssignMimeType()
Checks whether a mime type may be assigned to the given FxType. |
void |
removeRelation(FxTypeRelation relation)
Remove a relation |
FxTypeEdit |
save()
Save the type and return the saved instance. |
FxTypeEdit |
setACL(ACL acl)
Assign a new ACL |
FxType |
setAutoVersion(boolean autoVersion)
Set if new versions should be automatically created on content changes |
FxTypeEdit |
setCategory(TypeCategory category)
Set the types category (user, system) |
FxTypeEdit |
setDefaultInstanceACL(ACL defaultInstanceACL)
Assign a new default instance ACL |
void |
setDefaultOptions(java.util.List<FxStructureOption> defaultOptions)
Set the default options for new assignments created with addProperty(String, FxDataType). |
FxTypeEdit |
setDescription(FxString description)
Deprecated. replaced by setLabel(com.flexive.shared.value.FxString) |
FxTypeEdit |
setEnableParentAssignments(boolean enableParentAssignments)
Enable parent assignments if creating a derived type? This method has no effect if editing an existing type! |
FxTypeEdit |
setHistoryAge(long historyAge)
Set the max. |
FxTypeEdit |
setIcon(FxReference icon)
Set the preview icon of this type |
FxTypeEdit |
setIncludedInSupertypeQueries(boolean value)
Enable or disable inclusion of this type in supertype queries |
FxTypeEdit |
setLabel(FxString label)
Set the label of this type |
FxTypeEdit |
setLanguage(LanguageMode language)
Set the language mode to use for this type |
void |
setLifeCycleInfo(LifeCycleInfo lifeCycleInfo)
Set the LifeCycleInfo - this can only be assigned when there is no LifeCycleInfo available (which is when it is null) |
FxTypeEdit |
setMaxRelDestination(int maxRelDestination)
Set the max. |
FxTypeEdit |
setMaxRelSource(int maxRelSource)
Set the max. |
FxTypeEdit |
setMaxVersions(long maxVersions)
Set the max. |
FxTypeEdit |
setMimeType(FxMimeTypeWrapper mimeTypeWrapper)
Set 1* MimeTypes for a given FxType. |
FxTypeEdit |
setMode(TypeMode mode)
Set this type's mode. |
FxTypeEdit |
setMultipleContentACLs(boolean value)
Enable or disable multiple ACLs per content instance. |
FxTypeEdit |
setName(java.lang.String name)
Set the name of this type |
FxTypeEdit |
setOption(java.lang.String key,
boolean value)
Set an overridable boolean option (not inherited by derived types if it doesn't exist) |
FxTypeEdit |
setOption(java.lang.String key,
boolean value,
boolean overridable,
boolean isInherited)
Set a boolean option |
FxTypeEdit |
setOption(java.lang.String key,
java.lang.String value)
Set an overridable option (not inherited by derived types if it doesn't exist) |
FxTypeEdit |
setOption(java.lang.String key,
java.lang.String value,
boolean overridable,
boolean isInherited)
Set an option |
FxTypeEdit |
setOptions(java.util.List<FxStructureOption> options)
Set structure options, overwrites any set options |
FxTypeEdit |
setPermissions(byte permissions)
Set the bit coded permissions of this type |
void |
setRemoveInstancesWithRelationTypes(boolean removeInstancesWithRelationTypes)
Set if affected instances should be removed if FxTypeRelations are removed |
FxTypeEdit |
setState(TypeState state)
Set the state of this type |
FxTypeEdit |
setTrackHistory(boolean trackHistory)
Track history for this type |
FxTypeEdit |
setUseInstancePermissions(boolean use)
Set usage of instance permissions |
FxTypeEdit |
setUsePropertyPermissions(boolean use)
Set usage of property permissions |
FxTypeEdit |
setUseStepPermissions(boolean use)
Set usage of step permissions |
FxTypeEdit |
setUseTypePermissions(boolean use)
Set usage of type permissions |
FxTypeEdit |
setWorkflow(Workflow workflow)
Set the workflow to use |
void |
updateRelation(FxTypeRelation relation)
Add or update a relation |
| 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 |
|---|
protected boolean changed
| Constructor Detail |
|---|
public FxTypeEdit(FxType type)
type - the FxType to edit| Method Detail |
|---|
public static FxTypeEdit createNew(java.lang.String name)
name - name of the type
public static FxTypeEdit createNew(java.lang.String name,
java.lang.String parentTypeName)
name - name of the typeparentTypeName - parent type name
public static FxTypeEdit createNew(java.lang.String name,
FxType parentType)
name - name of the typeparentType - the parent type ID
public static FxTypeEdit createNew(java.lang.String name,
long parentTypeId)
name - name of the typeparentTypeId - the parent type ID
public static FxTypeEdit createNew(java.lang.String name,
FxString label,
ACL acl)
name - name of the typelabel - labelacl - type ACL
public static FxTypeEdit createNew(java.lang.String name,
FxString label,
ACL acl,
FxType parent)
name - name of the typelabel - labelacl - type ACLparent - parent type or null if not derived
public static FxTypeEdit createNew(java.lang.String name,
FxString label,
ACL acl,
Workflow workflow,
FxType parent,
boolean enableParentAssignments,
TypeStorageMode storageMode,
TypeCategory category,
TypeMode mode,
LanguageMode language,
TypeState state,
byte permissions,
boolean trackHistory,
long historyAge,
long maxVersions,
boolean autoVersion,
int maxRelSource,
int maxRelDestination)
name - name of the typelabel - labelacl - type ACLworkflow - workflow to useparent - parent type or null if not derivedenableParentAssignments - if parent is not null enable all derived assignments from the parent?storageMode - the storage modecategory - category mode (system, user)mode - type mode (content, relation)language - language modestate - type state (active, locked, etc)permissions - permissions bit codedtrackHistory - track historyhistoryAge - max. age of the history to trackmaxVersions - max. number of versions to keep, if < 0 unlimitedautoVersion - automatically create a new version when contents changed during a save operationmaxRelSource - max. number of instance related as sourcemaxRelDestination - max. number of instance related as destination
public static FxTypeEdit createNew(java.lang.String name,
FxString label,
ACL acl,
ACL defaultInstanceACL,
Workflow workflow,
FxType parent,
boolean enableParentAssignments,
TypeStorageMode storageMode,
TypeCategory category,
TypeMode mode,
LanguageMode language,
TypeState state,
byte permissions,
boolean trackHistory,
long historyAge,
long maxVersions,
boolean autoVersion,
int maxRelSource,
int maxRelDestination)
name - name of the typelabel - labelacl - type ACLdefaultInstanceACL - optional default ACL to assign for new instancesworkflow - workflow to useparent - parent type or null if not derivedenableParentAssignments - if parent is not null enable all derived assignments from the parent?storageMode - the storage modecategory - category mode (system, user)mode - type mode (content, relation)language - language modestate - type state (active, locked, etc)permissions - permissions bit codedtrackHistory - track historyhistoryAge - max. age of the history to trackmaxVersions - max. number of versions to keep, if < 0 unlimitedautoVersion - automatically create a new version when contents changed during a save operationmaxRelSource - max. number of instance related as sourcemaxRelDestination - max. number of instance related as destination
public static FxTypeEdit createNew(java.lang.String name,
FxString label,
ACL acl,
Workflow workflow,
FxType parent,
boolean enableParentAssignments,
TypeStorageMode storageMode,
TypeCategory category,
TypeMode mode,
LanguageMode language,
TypeState state,
byte permissions,
boolean trackHistory,
long historyAge,
long maxVersions,
int maxRelSource,
int maxRelDestination,
java.util.List<FxStructureOption> options)
name - name of the typelabel - labelacl - type ACLworkflow - workflow to useparent - parent type or null if not derivedenableParentAssignments - if parent is not null enable all derived assignments from the parent?storageMode - the storage modecategory - category mode (system, user)mode - type mode (content, relation)language - language modestate - type state (active, locked, etc)permissions - permissions bit codedtrackHistory - track historyhistoryAge - max. age of the history to trackmaxVersions - max. number of versions to keep, if < 0 unlimitedmaxRelSource - max. number of instance related as sourcemaxRelDestination - max. number of instance related as destinationoptions - list of structure options
public static FxTypeEdit createNew(java.lang.String name,
FxString label,
ACL acl,
ACL defaultInstanceACL,
Workflow workflow,
FxType parent,
boolean enableParentAssignments,
TypeStorageMode storageMode,
TypeCategory category,
TypeMode mode,
LanguageMode language,
TypeState state,
byte permissions,
boolean trackHistory,
long historyAge,
long maxVersions,
boolean autoVersion,
int maxRelSource,
int maxRelDestination,
java.util.List<FxStructureOption> options)
name - name of the typelabel - labelacl - type ACLdefaultInstanceACL - optional default ACL to assign for new instancesworkflow - workflow to useparent - parent type or null if not derivedenableParentAssignments - if parent is not null enable all derived assignments from the parent?storageMode - the storage modecategory - category mode (system, user)mode - type mode (content, relation)language - language modestate - type state (active, locked, etc)permissions - permissions bit codedtrackHistory - track historyhistoryAge - max. age of the history to trackmaxVersions - max. number of versions to keep, if < 0 unlimitedautoVersion - automatically create a new version when contents changed during a save operationmaxRelSource - max. number of instance related as sourcemaxRelDestination - max. number of instance related as destinationoptions - list of structure options
public void setLifeCycleInfo(LifeCycleInfo lifeCycleInfo)
null)
lifeCycleInfo - the lifeCycleInfo to assign if the current is nullpublic boolean isNew()
public boolean isRemoveInstancesWithRelationTypes()
public void setRemoveInstancesWithRelationTypes(boolean removeInstancesWithRelationTypes)
removeInstancesWithRelationTypes - if affected instances should be removed if FxTypeRelations are removedpublic boolean isEnableParentAssignments()
public FxTypeEdit setEnableParentAssignments(boolean enableParentAssignments)
enableParentAssignments - are parent assignments enabled?
public FxTypeEdit setACL(ACL acl)
acl - ACL to assign for this type
public FxTypeEdit setDefaultInstanceACL(ACL defaultInstanceACL)
defaultInstanceACL - default instance ACL to assign for this type
public FxTypeEdit setWorkflow(Workflow workflow)
workflow - the workflow to use
public FxTypeEdit setName(java.lang.String name)
name - the name of this type
@Deprecated public FxTypeEdit setDescription(FxString description)
setLabel(com.flexive.shared.value.FxString)
description - description
public FxTypeEdit setLabel(FxString label)
label - label
public FxTypeEdit setCategory(TypeCategory category)
category - the category to set
public FxTypeEdit setMode(TypeMode mode)
mode - requested mode
public FxTypeEdit setLanguage(LanguageMode language)
language - language mode to use
public FxTypeEdit setState(TypeState state)
state - the state of this type
public FxTypeEdit setIcon(FxReference icon)
icon - the (optional) preview icon of this type
public FxTypeEdit setPermissions(byte permissions)
permissions - bit coded permissions
public FxTypeEdit setUseInstancePermissions(boolean use)
use - use instance permissions?
public FxTypeEdit setUsePropertyPermissions(boolean use)
use - use property permissions?
public FxTypeEdit setUseStepPermissions(boolean use)
use - use step permissions?
public FxTypeEdit setUseTypePermissions(boolean use)
use - use type permissions?
public FxTypeEdit setTrackHistory(boolean trackHistory)
trackHistory - track history?
public FxTypeEdit setHistoryAge(long historyAge)
historyAge - max. age of history entries
public FxTypeEdit setMaxVersions(long maxVersions)
maxVersions - max. number of versions to keep, if negative unlimited
public FxType setAutoVersion(boolean autoVersion)
autoVersion - automatically create a new version when contents changed during a save operation
public FxTypeEdit setMaxRelSource(int maxRelSource)
maxRelSource - max. number related source instances for this type, if negative or zero unlimited
public FxTypeEdit setMultipleContentACLs(boolean value)
value - true to enable multiple ACLs
public FxTypeEdit setIncludedInSupertypeQueries(boolean value)
value - true to enable
public FxTypeEdit setMaxRelDestination(int maxRelDestination)
maxRelDestination - max. number related destination instances for this type, if negative unlimited
public java.util.List<FxTypeRelation> getRemovedRelations()
public java.util.List<FxTypeRelation> getAddedRelations()
public java.util.List<FxTypeRelation> getUpdatedRelations()
public FxTypeEdit addRelation(FxTypeRelation relation)
throws FxInvalidParameterException
relation - the relation to add or update
FxInvalidParameterException - if the relation is invalid.public void setDefaultOptions(java.util.List<FxStructureOption> defaultOptions)
addProperty(String, FxDataType).
defaultOptions - the default options
public FxPropertyAssignmentEdit addProperty(java.lang.String name,
FxDataType dataType)
throws FxApplicationException
name - the assignment namedataType - the data type
FxApplicationException - on errors
public FxPropertyAssignmentEdit addSelectListProperty(java.lang.String name,
FxSelectList referencedList,
boolean selectMany)
throws FxApplicationException
name - the assignment namereferencedList - the referenced select listselectMany - true to enable multiple selection
FxApplicationException - on errors
public FxPropertyAssignmentEdit addReferenceProperty(java.lang.String name,
FxType referencedType)
throws FxApplicationException
name - the assignment namereferencedType - the referenced type
FxApplicationException - on errors
public FxGroupAssignmentEdit addGroup(java.lang.String name)
throws FxApplicationException
name - the group name
FxApplicationException - on errors
public void updateRelation(FxTypeRelation relation)
throws FxInvalidParameterException
relation - the relation to add or update
FxInvalidParameterException - if the relation is invalid.public void removeRelation(FxTypeRelation relation)
relation - the relation to removepublic java.util.List<FxGroupAssignment> getAssignedGroups()
getAssignedGroups in class FxTypepublic java.util.List<FxPropertyAssignment> getAssignedProperties()
getAssignedProperties in class FxTypepublic FxTypeEdit setOptions(java.util.List<FxStructureOption> options)
options - a List of FxTypeStructureOptions
public FxTypeEdit setOption(java.lang.String key,
java.lang.String value)
throws FxInvalidParameterException
key - option keyvalue - value of the option
FxInvalidParameterException - if the property does not allow overriding
public FxTypeEdit setOption(java.lang.String key,
java.lang.String value,
boolean overridable,
boolean isInherited)
throws FxInvalidParameterException
key - option keyvalue - value of the optionoverridable - may derived types override the option?isInherited - will the option be inherited by derived types?
FxInvalidParameterException - if the property does not allow overriding
public FxTypeEdit setOption(java.lang.String key,
boolean value)
throws FxInvalidParameterException
key - option keyvalue - value of the option
FxInvalidParameterException - if the property does not allow overriding
public FxTypeEdit setOption(java.lang.String key,
boolean value,
boolean overridable,
boolean isInherited)
throws FxInvalidParameterException
key - option keyvalue - value of the optionoverridable - may derived types override the option?isInherited - is the option inherited by derived types?
FxInvalidParameterException - if the property does not allow overridingpublic void clearOption(java.lang.String key)
key - option namepublic FxTypeEdit setMimeType(FxMimeTypeWrapper mimeTypeWrapper)
mimeTypeWrapper - the MimeType to set
public boolean mayAssignMimeType()
public boolean isChanged()
public FxTypeEdit save()
throws FxApplicationException
FxApplicationException - on errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||