|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flexive.shared.structure.FxAssignment
com.flexive.shared.structure.FxPropertyAssignment
public class FxPropertyAssignment
Assignment of a property to a type or group
| Field Summary | |
|---|---|
protected ACL |
ACL
Overridden ACL (if the embedded property permits) |
protected long |
defaultLang
|
protected FxValue |
defaultValue
|
protected FxProperty |
property
The property assigned |
| Fields inherited from class com.flexive.shared.structure.FxAssignment |
|---|
alias, baseAssignment, defaultMultiplicity, enabled, hint, label, multiplicity, NO_BASE, NO_PARENT, options, parentGroupAssignment, position, POSITION_BOTTOM, ROOT_BASE, scriptMapping, TYPE_GROUP, TYPE_PROPERTY, XPath |
| Constructor Summary | |
|---|---|
FxPropertyAssignment(long assignmentId,
boolean enabled,
FxType assignedType,
java.lang.String alias,
java.lang.String xpath,
int position,
FxMultiplicity multiplicity,
int defaultMultiplicity,
FxGroupAssignment parentGroupAssignment,
long baseAssignment,
FxString label,
FxString hint,
FxValue defaultValue,
FxProperty property,
ACL ACL,
long defaultLang,
java.util.List<FxStructureOption> options)
Constructor |
|
| Method Summary | |
|---|---|
FxPropertyAssignmentEdit |
asEditable()
Get this FxPropertyAssignment as editable |
FxData |
createEmptyData(FxGroupData parent,
int index)
Create an empty FxData entry for this assignment |
FxData |
createRandomData(java.util.Random rnd,
FxEnvironment env,
FxGroupData parent,
int index,
int maxMultiplicity)
Create a random FxData entry for this assignment |
ACL |
getACL()
Get the ACL of the embedded property. |
long |
getDefaultLanguage()
Get the default language for this property assignment (if set) |
FxValue |
getDefaultValue()
Get the default value for this assignment. |
FxValue |
getEmptyValue()
Get an empty FxValue object for this assignment |
int |
getMaxLength()
Shortcut to get the maximum input length |
int |
getMultiLines()
Get the number of multilines to display or 0 if multiline is not set |
FxMultiplicity |
getMultiplicity()
Get the multiplicity of this assignment. |
FxStructureOption |
getOption(java.lang.String key)
Get an option entry for the given key, if the key is invalid or not found a FxStructureOption object
will be returned with set set to false, overrideable set to false and value
set to an empty String. |
FxProperty |
getProperty()
Get the property this assignment relates to |
boolean |
hasAssignmentDefaultValue()
Is an explicit default value set for this assignment or is it taken from the property? |
boolean |
hasDefaultLanguage()
Is a default language defined for this property assignment? |
boolean |
hasMaxLength()
Shortcut to determine if a max. |
boolean |
hasOption(java.lang.String key)
Check if an option is set for the requested key |
boolean |
isInOverview()
|
boolean |
isMultiLang()
|
boolean |
isMultiLine()
Show as multiple lines in editors? |
boolean |
isOverridingPropertyACL()
Check if an ACL is defined for this assignment which overrides the properties ACL |
boolean |
isOverridingPropertyMultiplicity()
Check if a multiplicity is defined for this assignment which overrides the properties multiplicity |
boolean |
isSearchable()
|
boolean |
isUseHTMLEditor()
|
boolean |
isValid(java.lang.Object value)
Validate the given value for this assignment. |
| Methods inherited from class com.flexive.shared.structure.FxAssignment |
|---|
_setSystemInternal, compareTo, equals, getAlias, getAssignedType, getBaseAssignmentId, getDefaultMultiplicity, getDisplayLabel, getDisplayName, getHint, getId, getLabel, getOptions, getParentGroupAssignment, getPosition, getScriptMapping, getXPath, hashCode, hasParentGroupAssignment, hasScriptMapping, hasScriptMappings, isDerivedAssignment, isEnabled, isSystemInternal, resolveParentDependencies, resolvePreloadDependencies, resolveReferences, sort, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected FxProperty property
protected ACL ACL
protected FxValue defaultValue
protected long defaultLang
| Constructor Detail |
|---|
public FxPropertyAssignment(long assignmentId,
boolean enabled,
FxType assignedType,
java.lang.String alias,
java.lang.String xpath,
int position,
FxMultiplicity multiplicity,
int defaultMultiplicity,
FxGroupAssignment parentGroupAssignment,
long baseAssignment,
FxString label,
FxString hint,
FxValue defaultValue,
FxProperty property,
ACL ACL,
long defaultLang,
java.util.List<FxStructureOption> options)
assignmentId - internal id of this assignmentenabled - is this assignment enabled?assignedType - the FxType this assignment belongs toalias - an optional alias, if null the original name will be usedxpath - XPath relative to the assigned FxTypeposition - position within the same XPath hierarchymultiplicity - multiplicity (will only be used if the embedded property allows overriding)defaultMultiplicity - default multiplicityparentGroupAssignment - (optional) parent FxGroupAssignment this property assignment belongs tobaseAssignment - base assignment (if derived the parent, if not the root assignment, if its a root assignment FxAssignment.ROOT_BASE)label - (optional) labelhint - (optional) hintdefaultValue - (optional) default valueproperty - the assigned propertyACL - the embedded property's ACL (will only be used if the embedded property allows overriding)defaultLang - default language if multilingual (if 0==SYSTEM then not set)options - options| Method Detail |
|---|
public FxProperty getProperty()
public boolean hasAssignmentDefaultValue()
public ACL getACL()
public boolean isOverridingPropertyACL()
true if an ACL is defined for this assignment which overrides the properties ACLpublic FxMultiplicity getMultiplicity()
getMultiplicity in class FxAssignmentpublic boolean isOverridingPropertyMultiplicity()
true if a multiplicity is defined for this assignment which overrides the properties multiplicitypublic FxStructureOption getOption(java.lang.String key)
FxStructureOption object
will be returned with set set to false, overrideable set to false and value
set to an empty String.
getOption in class FxAssignmentkey - option key
public boolean hasOption(java.lang.String key)
hasOption in class FxAssignmentkey - option key
public boolean isMultiLang()
public boolean isSearchable()
public boolean isInOverview()
public boolean isUseHTMLEditor()
public boolean hasMaxLength()
public int getMaxLength()
public boolean isMultiLine()
public int getMultiLines()
public FxValue getDefaultValue()
public FxValue getEmptyValue()
public FxData createEmptyData(FxGroupData parent,
int index)
throws FxCreateException
createEmptyData in class FxAssignmentparent - the parent groupindex - the index of the new entry
FxCreateException - on errors
public FxData createRandomData(java.util.Random rnd,
FxEnvironment env,
FxGroupData parent,
int index,
int maxMultiplicity)
throws FxCreateException
createRandomData in class FxAssignmentrnd - the Random to useenv - environmentparent - the parent groupindex - the index of the new entrymaxMultiplicity - the maximum multiplicity
FxCreateException - on errorspublic boolean isValid(java.lang.Object value)
isValid in class FxAssignmentvalue - the value to be checked
public boolean hasDefaultLanguage()
public long getDefaultLanguage()
public FxPropertyAssignmentEdit asEditable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||