com.flexive.shared.structure
Class FxTypeEdit

java.lang.Object
  extended by com.flexive.shared.AbstractSelectableObjectWithLabel
      extended by com.flexive.shared.structure.FxType
          extended by com.flexive.shared.structure.FxTypeEdit
All Implemented Interfaces:
ObjectWithLabel, SelectableObject, SelectableObjectWithLabel, SelectableObjectWithName, java.io.Serializable

public class FxTypeEdit
extends FxType
implements java.io.Serializable

FxType used for structure editing

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

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, 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 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.structure.FxType
addDerivedTypes, asEditable, buildXPathPrefix, createEmptyData, createRandomData, getACL, getAllAssignments, getAllProperties, getAssignment, getAssignmentsForDataType, getAssignmentsForProperty, getBitCodedPermissions, getCategory, getConnectedAssignments, getDefaultInstanceACL, getDerivedTypes, getDerivedTypes, getDisplayName, getGroupAssignment, getHistoryAge, getIcon, getId, getInheritedOptions, getLabel, getLanguage, getLifeCycleInfo, getMainBinaryAssignment, getMandatoryAssignments, getMaxRelDestination, getMaxRelSource, getMaxVersions, getMimeType, getMode, getName, getOption, getOptions, getParent, getPropertyAssignment, getRelations, getScriptedAssignments, getScriptEvents, getScriptMapping, getState, getStorageMode, getUniqueProperties, getWorkflow, hasAssignment, hasDefaultInstanceACL, hasMimeType, hasOption, hasScriptedAssignments, hasScriptMapping, hasUniqueProperties, isAutoVersion, isContainsFlatStorageAssignments, isDerived, isDerivedFrom, isDerivedFrom, isIncludedInSupertypeQueries, isMimeTypeSet, isMultipleContentACLs, isRelation, isTrackHistory, isUseInstancePermissions, isUsePermissions, isUsePropertyPermissions, isUseStepPermissions, isUseTypePermissions, isXPathValid, reloadWorkflow, resolveReferences, toString
 
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

changed

protected boolean changed
Constructor Detail

FxTypeEdit

public FxTypeEdit(FxType type)
Create a new FxTypeEdit instance for editing and updating an existing FxType

Parameters:
type - the FxType to edit
Method Detail

createNew

public static FxTypeEdit createNew(java.lang.String name)
Create a new FxTypeEdit instance for creating a new FxType

Parameters:
name - name of the type
Returns:
FxTypeEdit instance for creating a new FxType

createNew

public static FxTypeEdit createNew(java.lang.String name,
                                   java.lang.String parentTypeName)
Create a new FxTypeEdit instance for creating a derived FxType

Parameters:
name - name of the type
parentTypeName - parent type name
Returns:
FxTypeEdit instance for creating a new FxType
Since:
3.1

createNew

public static FxTypeEdit createNew(java.lang.String name,
                                   FxType parentType)
Create a new FxTypeEdit instance for creating a derived FxType

Parameters:
name - name of the type
parentType - the parent type ID
Returns:
FxTypeEdit instance for creating a new FxType
Since:
3.0.3

createNew

public static FxTypeEdit createNew(java.lang.String name,
                                   long parentTypeId)
Create a new FxTypeEdit instance for creating a new FxType

Parameters:
name - name of the type
parentTypeId - the parent type ID
Returns:
FxTypeEdit instance for creating a new FxType
Since:
3.0.3

createNew

public static FxTypeEdit createNew(java.lang.String name,
                                   FxString label,
                                   ACL acl)
Create a new FxTypeEdit instance for creating a new FxType

Parameters:
name - name of the type
label - label
acl - type ACL
Returns:
FxTypeEdit instance for creating a new FxType

createNew

public 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

Parameters:
name - name of the type
label - label
acl - type ACL
parent - parent type or null if not derived
Returns:
FxTypeEdit instance for creating a new FxType

createNew

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)
Create a new FxTypeEdit instance for creating a new FxType (no structure options)

Parameters:
name - name of the type
label - label
acl - type ACL
defaultInstanceACL - optional default ACL to assign for new instances
workflow - workflow to use
parent - parent type or null if not derived
enableParentAssignments - if parent is not null enable all derived assignments from the parent?
storageMode - the storage mode
category - category mode (system, user)
mode - type mode (content, relation)
language - language mode
state - type state (active, locked, etc)
permissions - permissions bit coded
trackHistory - track history
historyAge - max. age of the history to track
maxVersions - max. number of versions to keep, if < 0 unlimited
autoVersion - automatically create a new version when contents changed during a save operation
maxRelSource - max. number of instance related as source
maxRelDestination - max. number of instance related as destination
Returns:
FxTypeEdit instance for creating a new FxType
Since:
3.1.1

createNew

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)
Create a new FxTypeEdit instance for creating a new FxType

Parameters:
name - name of the type
label - label
acl - type ACL
defaultInstanceACL - optional default ACL to assign for new instances
workflow - workflow to use
parent - parent type or null if not derived
enableParentAssignments - if parent is not null enable all derived assignments from the parent?
storageMode - the storage mode
category - category mode (system, user)
mode - type mode (content, relation)
language - language mode
state - type state (active, locked, etc)
permissions - permissions bit coded
trackHistory - track history
historyAge - max. age of the history to track
maxVersions - max. number of versions to keep, if < 0 unlimited
autoVersion - automatically create a new version when contents changed during a save operation
maxRelSource - max. number of instance related as source
maxRelDestination - max. number of instance related as destination
options - list of structure options
Returns:
FxTypeEdit instance for creating a new FxType
Since:
3.1.1

setLifeCycleInfo

public void setLifeCycleInfo(LifeCycleInfo lifeCycleInfo)
Set the LifeCycleInfo - this can only be assigned when there is no LifeCycleInfo available (which is when it is null)

Parameters:
lifeCycleInfo - the lifeCycleInfo to assign if the current is null

isNew

public boolean isNew()
Is this a new type or updating an existing type?

Returns:
new or existing type?

isRemoveInstancesWithRelationTypes

public boolean isRemoveInstancesWithRelationTypes()
If FxTypeRelation entries are removed, remove all affected instances?

Returns:
remove all affected instances if FxTypeRelation entries are removed?

setRemoveInstancesWithRelationTypes

public void setRemoveInstancesWithRelationTypes(boolean removeInstancesWithRelationTypes)
Set if affected instances should be removed if FxTypeRelations are removed

Parameters:
removeInstancesWithRelationTypes - if affected instances should be removed if FxTypeRelations are removed

isEnableParentAssignments

public boolean isEnableParentAssignments()
Enable parent assignments if creating a derived type? This method has no effect if editing an existing type!

Returns:
are parent assignments enabled?

setEnableParentAssignments

public FxTypeEdit setEnableParentAssignments(boolean enableParentAssignments)
Enable parent assignments if creating a derived type? This method has no effect if editing an existing type!

Parameters:
enableParentAssignments - are parent assignments enabled?
Returns:
the type itself, useful for chained calls

setACL

public FxTypeEdit setACL(ACL acl)
Assign a new ACL

Parameters:
acl - ACL to assign for this type
Returns:
the type itself, useful for chained calls

setDefaultInstanceACL

public FxTypeEdit setDefaultInstanceACL(ACL defaultInstanceACL)
Assign a new default instance ACL

Parameters:
defaultInstanceACL - default instance ACL to assign for this type
Returns:
the type itself, useful for chained calls
Since:
3.1.1

setWorkflow

public FxTypeEdit setWorkflow(Workflow workflow)
Set the workflow to use

Parameters:
workflow - the workflow to use
Returns:
the type itself, useful for chained calls

setName

public FxTypeEdit setName(java.lang.String name)
Set the name of this type

Parameters:
name - the name of this type
Returns:
the type itself, useful for chained calls

setLabel

public FxTypeEdit setLabel(FxString label)
Set the label of this type

Parameters:
label - label
Returns:
the type itself, useful for chained calls

setCategory

public FxTypeEdit setCategory(TypeCategory category)
Set the types category (user, system)

Parameters:
category - the category to set
Returns:
the type itself, useful for chained calls

setMode

public FxTypeEdit setMode(TypeMode mode)
Set this type's mode. Setting does not check anything, if the requested mode is really available and possible is determined during saving

Parameters:
mode - requested mode
Returns:
this

setLanguage

public FxTypeEdit setLanguage(LanguageMode language)
Set the language mode to use for this type

Parameters:
language - language mode to use
Returns:
the type itself, useful for chained calls

setState

public FxTypeEdit setState(TypeState state)
Set the state of this type

Parameters:
state - the state of this type
Returns:
the type itself, useful for chained calls

setIcon

public FxTypeEdit setIcon(FxReference icon)
Set the preview icon of this type

Parameters:
icon - the (optional) preview icon of this type
Returns:
the type itself, useful for chained calls

setPermissions

public FxTypeEdit setPermissions(byte permissions)
Set the bit coded permissions of this type

Parameters:
permissions - bit coded permissions
Returns:
the type itself, useful for chained calls

setUseInstancePermissions

public FxTypeEdit setUseInstancePermissions(boolean use)
Set usage of instance permissions

Parameters:
use - use instance permissions?
Returns:
the type itself, useful for chained calls

setUsePropertyPermissions

public FxTypeEdit setUsePropertyPermissions(boolean use)
Set usage of property permissions

Parameters:
use - use property permissions?
Returns:
the type itself, useful for chained calls

setUseStepPermissions

public FxTypeEdit setUseStepPermissions(boolean use)
Set usage of step permissions

Parameters:
use - use step permissions?
Returns:
the type itself, useful for chained calls

setUseTypePermissions

public FxTypeEdit setUseTypePermissions(boolean use)
Set usage of type permissions

Parameters:
use - use type permissions?
Returns:
the type itself, useful for chained calls

setTrackHistory

public FxTypeEdit setTrackHistory(boolean trackHistory)
Track history for this type

Parameters:
trackHistory - track history?
Returns:
the type itself, useful for chained calls

setHistoryAge

public FxTypeEdit setHistoryAge(long historyAge)
Set the max. age of history entries

Parameters:
historyAge - max. age of history entries
Returns:
the type itself, useful for chained calls

setMaxVersions

public FxTypeEdit setMaxVersions(long maxVersions)
Set the max. number of versions to keep, if negative unlimited

Parameters:
maxVersions - max. number of versions to keep, if negative unlimited
Returns:
the type itself, useful for chained calls

setAutoVersion

public FxType setAutoVersion(boolean autoVersion)
Set if new versions should be automatically created on content changes

Parameters:
autoVersion - automatically create a new version when contents changed during a save operation
Returns:
the type itself, useful for chained calls
Since:
3.1.5

setMaxRelSource

public FxTypeEdit setMaxRelSource(int maxRelSource)
Set the max. number related source instances for this type, if negative unlimited

Parameters:
maxRelSource - max. number related source instances for this type, if negative or zero unlimited
Returns:
the type itself, useful for chained calls

setMultipleContentACLs

public FxTypeEdit setMultipleContentACLs(boolean value)
Enable or disable multiple ACLs per content instance.

Parameters:
value - true to enable multiple ACLs
Returns:
the type itself, useful for chained calls

setIncludedInSupertypeQueries

public FxTypeEdit setIncludedInSupertypeQueries(boolean value)
Enable or disable inclusion of this type in supertype queries

Parameters:
value - true to enable
Returns:
the type itself, useful for chained calls

setMaxRelDestination

public FxTypeEdit setMaxRelDestination(int maxRelDestination)
Set the max. number related destination instances for this type, if negative or zero unlimited

Parameters:
maxRelDestination - max. number related destination instances for this type, if negative unlimited
Returns:
the type itself, useful for chained calls

getRemovedRelations

public java.util.List<FxTypeRelation> getRemovedRelations()
Get a list of all FxTypeRelations that have been removed

Returns:
list of all FxTypeRelations that have been removed

getAddedRelations

public java.util.List<FxTypeRelation> getAddedRelations()
Get a list of all FxTypeRelations that have been added

Returns:
list of all FxTypeRelations that have been added

getUpdatedRelations

public java.util.List<FxTypeRelation> getUpdatedRelations()
Get a list of all FxTypeRelations that have been updated

Returns:
list of all FxTypeRelations that have been updated

addRelation

public FxTypeEdit addRelation(FxTypeRelation relation)
                       throws FxInvalidParameterException
Add or update a relation

Parameters:
relation - the relation to add or update
Returns:
this
Throws:
FxInvalidParameterException - if the relation is invalid.

setDefaultOptions

public void setDefaultOptions(java.util.List<FxStructureOption> defaultOptions)
Set the default options for new assignments created with addProperty(String, FxDataType).

Parameters:
defaultOptions - the default options

addProperty

public FxPropertyAssignmentEdit addProperty(java.lang.String name,
                                            FxDataType dataType)
                                     throws FxApplicationException
Add a new assignment to this type. The assignment is saved instantly and is returned to the caller.

Parameters:
name - the assignment name
dataType - the data type
Returns:
the created assignment
Throws:
FxApplicationException - on errors
Since:
3.1

addSelectListProperty

public FxPropertyAssignmentEdit addSelectListProperty(java.lang.String name,
                                                      FxSelectList referencedList,
                                                      boolean selectMany)
                                               throws FxApplicationException
Add a new select list assignment to this type. The assignment is saved instantly and is returned to the caller.

Parameters:
name - the assignment name
referencedList - the referenced select list
selectMany - true to enable multiple selection
Returns:
the created assignment
Throws:
FxApplicationException - on errors
Since:
3.1.2

addReferenceProperty

public FxPropertyAssignmentEdit addReferenceProperty(java.lang.String name,
                                                     FxType referencedType)
                                              throws FxApplicationException
Add a reference assignment to this type. The assignment is saved instantly and is returned to the caller.

Parameters:
name - the assignment name
referencedType - the referenced type
Returns:
the created assignment
Throws:
FxApplicationException - on errors
Since:
3.1.2

addGroup

public FxGroupAssignmentEdit addGroup(java.lang.String name)
                               throws FxApplicationException
Add a new group to this type. The group assignment is saved instantly and is returned to the caller.

Parameters:
name - the group name
Returns:
the group assignment
Throws:
FxApplicationException - on errors
Since:
3.1

updateRelation

public void updateRelation(FxTypeRelation relation)
                    throws FxInvalidParameterException
Add or update a relation

Parameters:
relation - the relation to add or update
Throws:
FxInvalidParameterException - if the relation is invalid.

removeRelation

public void removeRelation(FxTypeRelation relation)
Remove a relation

Parameters:
relation - the relation to remove

getAssignedGroups

public java.util.List<FxGroupAssignment> getAssignedGroups()
Get all group assignments that are attached to the type's root

Overrides:
getAssignedGroups in class FxType
Returns:
all group assignments that are attached to the type's root

getAssignedProperties

public java.util.List<FxPropertyAssignment> getAssignedProperties()
Get all property assignments that are attached to the type's root

Overrides:
getAssignedProperties in class FxType
Returns:
all property assignments that are attached to the type's root

setOptions

public FxTypeEdit setOptions(java.util.List<FxStructureOption> options)
Set structure options, overwrites any set options

Parameters:
options - a List of FxTypeStructureOptions
Returns:
itself
Since:
3.1

setOption

public FxTypeEdit setOption(java.lang.String key,
                            java.lang.String value)
                     throws FxInvalidParameterException
Set an overridable option (not inherited by derived types if it doesn't exist)

Parameters:
key - option key
value - value of the option
Returns:
the assignment itself, useful for chained calls
Throws:
FxInvalidParameterException - if the property does not allow overriding
Since:
3.1

setOption

public FxTypeEdit setOption(java.lang.String key,
                            java.lang.String value,
                            boolean overridable,
                            boolean isInherited)
                     throws FxInvalidParameterException
Set an option

Parameters:
key - option key
value - value of the option
overridable - may derived types override the option?
isInherited - will the option be inherited by derived types?
Returns:
the assignment itself, useful for chained calls
Throws:
FxInvalidParameterException - if the property does not allow overriding
Since:
3.1

setOption

public FxTypeEdit setOption(java.lang.String key,
                            boolean value)
                     throws FxInvalidParameterException
Set an overridable boolean option (not inherited by derived types if it doesn't exist)

Parameters:
key - option key
value - value of the option
Returns:
the assignemnt itself, useful for chained calls
Throws:
FxInvalidParameterException - if the property does not allow overriding
Since:
3.1

setOption

public FxTypeEdit setOption(java.lang.String key,
                            boolean value,
                            boolean overridable,
                            boolean isInherited)
                     throws FxInvalidParameterException
Set a boolean option

Parameters:
key - option key
value - value of the option
overridable - may derived types override the option?
isInherited - is the option inherited by derived types?
Returns:
the assignemnt itself, useful for chained calls
Throws:
FxInvalidParameterException - if the property does not allow overriding
Since:
3.1

clearOption

public void clearOption(java.lang.String key)
Clear an option entry

Parameters:
key - option name
Since:
3.1

setMimeType

public FxTypeEdit setMimeType(FxMimeTypeWrapper mimeTypeWrapper)
Set 1* MimeTypes for a given FxType. The mimetype can only be set for descendents of "DOCUMENTFILE"

Parameters:
mimeTypeWrapper - the MimeType to set
Returns:
this
Since:
3.1

mayAssignMimeType

public boolean mayAssignMimeType()
Checks whether a mime type may be assigned to the given FxType. Mime types can only be assigned to "DOCUMENTFILE" or any of its derived types

Returns:
returns true if a mime type may be assigned to this FxType
Since:
3.1

isChanged

public boolean isChanged()
Have changes been made?

Returns:
changes made

save

public FxTypeEdit save()
                throws FxApplicationException
Save the type and return the saved instance.

Returns:
the saved instance.
Throws:
FxApplicationException - on errors
Since:
3.1