com.flexive.shared.structure
Class FxProperty

java.lang.Object
  extended by com.flexive.shared.structure.FxStructureElement
      extended by com.flexive.shared.structure.FxProperty
All Implemented Interfaces:
SelectableObject, SelectableObjectWithName, java.io.Serializable
Direct Known Subclasses:
FxPropertyEdit

public class FxProperty
extends FxStructureElement
implements java.io.Serializable

property definition

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

Field Summary
protected  ACL ACL
           
protected  FxDataType dataType
           
protected  FxValue defaultValue
           
protected  boolean fulltextIndexed
           
protected  boolean overrideACL
           
protected  FxSelectList referencedList
           
protected  FxType referencedType
           
protected  boolean systemInternal
           
protected  UniqueMode uniqueMode
           
 
Fields inherited from class com.flexive.shared.structure.FxStructureElement
hint, label, multiplicity, name, options, overrideMultiplicity, referenced
 
Constructor Summary
FxProperty(long id, java.lang.String name, FxMultiplicity multiplicity, ACL acl, FxDataType dataType)
           
FxProperty(long id, java.lang.String name, FxString label, FxString hint, boolean systemInternal, boolean overrideBaseMultiplicity, FxMultiplicity multiplicity, boolean overrideACL, ACL ACL, FxDataType dataType, FxValue defaultValue, boolean fulltextIndexed, FxType referencedType, FxSelectList referencedList, UniqueMode uniqueMode, java.util.List<FxStructureOption> options)
           
 
Method Summary
 FxPropertyEdit asEditable()
           
 boolean equals(java.lang.Object obj)
          
 ACL getACL()
          Get the ACL
 FxDataType getDataType()
          Get the data type
 FxValue getDefaultValue()
          Get the default value
 FxValue getEmptyValue()
          Get an empty FxValue object for this property
protected  FxValue getEmptyValue(boolean multiLang)
          Get an empty FxValue instance for this property in single or multi language mode.
protected  FxValue getEmptyValue(boolean multiLang, long lang)
          Get an empty FxValue instance for this property in single or multi language mode.
 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
 FxSelectList getReferencedList()
          Get referenced FxSelectList
 FxType getReferencedType()
          Get referenced FxType
 UniqueMode getUniqueMode()
          Get the uniqueness mode of this property
 int hashCode()
          
 boolean hasMaxLength()
          Shortcut to determine if a max.
 boolean hasReferencedList()
          Does this property reference a FxSelectList
 boolean hasReferencedType()
          Does this property reference a FxType
 boolean isDefaultValueSet()
          Returns if the default value of this property is set.
 boolean isFulltextIndexed()
          Is this property fulltext indexed?
 boolean isInOverview()
          Does this property appear in overviews?
 boolean isMultiLang()
          Is this property available in multiple languages?
 boolean isMultiLine()
          Show as multiple lines in editors?
 boolean isSearchable()
          Can this property be used in the visual query editor (UI hint)
 boolean isSystemInternal()
          Is this a system-internal property like ID or VERSION?
 boolean isUseHTMLEditor()
          Use a HTML editor for this property?
 boolean mayOverrideACL()
          May assignments override this properties ACL?
 boolean mayOverrideInOverview()
          May assignments override this properties appearance in overviews?
 boolean mayOverrideMaxLength()
          May assignments override this properties maxLength setting?
 boolean mayOverrideMultiLang()
          May assignments override this properties multilanguage setting?
 boolean mayOverrideMultiLine()
          May assignments override this properties multiline setting?
 boolean mayOverrideSearchable()
          May assignments override this properties searchable flag?
 boolean mayOverrideUseHTMLEditor()
          May assignments override this properties setting wether to use a HTML editor?
 void resolveReferencedType(FxEnvironment environment)
          (Internal!) method to resolve referenced type in the second stage of loading the environment
 void updateEnvironmentData(FxValue value)
          Updates miscellaneous FxValue information that has to be updated from the environment, like select lists for FxSelectOne objects.
 
Methods inherited from class com.flexive.shared.structure.FxStructureElement
getHint, getId, getLabel, getMultiplicity, getName, getOption, getOptions, hasOption, isReferenced, mayOverrideBaseMultiplicity, setReferenced
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACL

protected ACL ACL

overrideACL

protected boolean overrideACL

dataType

protected FxDataType dataType

fulltextIndexed

protected boolean fulltextIndexed

referencedType

protected FxType referencedType

referencedList

protected FxSelectList referencedList

defaultValue

protected FxValue defaultValue

systemInternal

protected boolean systemInternal

uniqueMode

protected UniqueMode uniqueMode
Constructor Detail

FxProperty

public FxProperty(long id,
                  java.lang.String name,
                  FxMultiplicity multiplicity,
                  ACL acl,
                  FxDataType dataType)

FxProperty

public FxProperty(long id,
                  java.lang.String name,
                  FxString label,
                  FxString hint,
                  boolean systemInternal,
                  boolean overrideBaseMultiplicity,
                  FxMultiplicity multiplicity,
                  boolean overrideACL,
                  ACL ACL,
                  FxDataType dataType,
                  FxValue defaultValue,
                  boolean fulltextIndexed,
                  FxType referencedType,
                  FxSelectList referencedList,
                  UniqueMode uniqueMode,
                  java.util.List<FxStructureOption> options)
Method Detail

asEditable

public FxPropertyEdit asEditable()

mayOverrideACL

public boolean mayOverrideACL()
May assignments override this properties ACL?

Returns:
if assignments may override this properties ACL?

getACL

public ACL getACL()
Get the ACL

Returns:
ACL

getDataType

public FxDataType getDataType()
Get the data type

Returns:
data type

getDefaultValue

public FxValue getDefaultValue()
Get the default value

Returns:
default value

mayOverrideMultiLang

public boolean mayOverrideMultiLang()
May assignments override this properties multilanguage setting?

Returns:
if assignments may override this properties multilanguage setting?

isMultiLang

public boolean isMultiLang()
Is this property available in multiple languages?

Returns:
property is available in multiple languages

mayOverrideSearchable

public boolean mayOverrideSearchable()
May assignments override this properties searchable flag?

Returns:
if assignments may override this properties searchable flag?

isSearchable

public boolean isSearchable()
Can this property be used in the visual query editor (UI hint)

Returns:
if property can be used in the visual query editor

isSystemInternal

public boolean isSystemInternal()
Is this a system-internal property like ID or VERSION?

Returns:
property is system internal

mayOverrideInOverview

public boolean mayOverrideInOverview()
May assignments override this properties appearance in overviews?

Returns:
if assignments may override this properties appearance in overviews?

isInOverview

public boolean isInOverview()
Does this property appear in overviews?

Returns:
if this property appears in overviews

mayOverrideUseHTMLEditor

public boolean mayOverrideUseHTMLEditor()
May assignments override this properties setting wether to use a HTML editor?

Returns:
if assignments may override this properties setting wether to use a HTML editor?

isUseHTMLEditor

public boolean isUseHTMLEditor()
Use a HTML editor for this property?

Returns:
use HTML editor

mayOverrideMultiLine

public boolean mayOverrideMultiLine()
May assignments override this properties multiline setting?

Returns:
if assignments may override this properties multiline setting?

isMultiLine

public boolean isMultiLine()
Show as multiple lines in editors?

Returns:
if this property appears in multiple lines

getMultiLines

public int getMultiLines()
Get the number of multilines to display or 0 if multiline is not set

Returns:
number of multilines to display or 0 if multiline is not set

hasMaxLength

public boolean hasMaxLength()
Shortcut to determine if a max. input length has been set

Returns:
has a max. input length been set?

getMaxLength

public int getMaxLength()
Shortcut to get the maximum input length

Returns:
maximum input length

mayOverrideMaxLength

public boolean mayOverrideMaxLength()
May assignments override this properties maxLength setting?

Returns:
if assignments may override this properties maxLength setting?

isFulltextIndexed

public boolean isFulltextIndexed()
Is this property fulltext indexed?

Returns:
is property fulltext indexed?

hasReferencedType

public boolean hasReferencedType()
Does this property reference a FxType

Returns:
if this property references a FxType

getReferencedType

public FxType getReferencedType()
Get referenced FxType

Returns:
referenced FxType

hasReferencedList

public boolean hasReferencedList()
Does this property reference a FxSelectList

Returns:
if this property references a FxSelectList

getReferencedList

public FxSelectList getReferencedList()
Get referenced FxSelectList

Returns:
referenced FxSelectList

getUniqueMode

public UniqueMode getUniqueMode()
Get the uniqueness mode of this property

Returns:
uniqueness mode of this property

resolveReferencedType

public void resolveReferencedType(FxEnvironment environment)
(Internal!) method to resolve referenced type in the second stage of loading the environment

Parameters:
environment - reference to the environment to resolve the referenced type

getEmptyValue

public FxValue getEmptyValue()
Get an empty FxValue object for this property

Returns:
empty FxValue object

getEmptyValue

protected FxValue getEmptyValue(boolean multiLang)
Get an empty FxValue instance for this property in single or multi language mode. To be called from property assignments only!

Parameters:
multiLang - multi language
Returns:
empty FxValue instance for the data type

updateEnvironmentData

public void updateEnvironmentData(FxValue value)
Updates miscellaneous FxValue information that has to be updated from the environment, like select lists for FxSelectOne objects.

Parameters:
value - the value to be updated

getEmptyValue

protected FxValue getEmptyValue(boolean multiLang,
                                long lang)
Get an empty FxValue instance for this property in single or multi language mode. To be called from property assignments only!

Parameters:
multiLang - multi language
lang - language to initialize this value for
Returns:
empty FxValue instance for the data type

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

isDefaultValueSet

public boolean isDefaultValueSet()
Returns if the default value of this property is set.

Returns:
if the default value of this property is set.