com.flexive.shared.structure
Class FxStructureElement

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

public abstract class FxStructureElement
extends java.lang.Object
implements java.io.Serializable, SelectableObjectWithName

Abstract base class for FxGroup and FxProperty

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

Field Summary
protected  FxString hint
           
protected  FxString label
           
protected  FxMultiplicity multiplicity
           
protected  java.lang.String name
           
protected  java.util.List<FxStructureOption> options
           
protected  boolean overrideMultiplicity
           
protected  boolean referenced
           
 
Constructor Summary
protected FxStructureElement(long id, java.lang.String name, FxString label, FxString hint, boolean overrideMultiplicity, FxMultiplicity multiplicity, java.util.List<FxStructureOption> options)
          Constructor
 
Method Summary
 FxString getHint()
          Get hint text for UI
 long getId()
          Internal id of this element
 FxString getLabel()
          Multilingual label of this element
 FxMultiplicity getMultiplicity()
          (Base) multiplicity of this element, may be overriden in assignment depending on mayOverrideMultiplicity
 java.lang.String getName()
          Name of this element (may be overriden with an alias)
 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.
 java.util.List<FxStructureOption> getOptions()
          Get a (unmodifiable) list of all options set for this group
 boolean hasOption(java.lang.String key)
          Check if an option is set for the requested key
 boolean isReferenced()
          Is this element referenced? (=in use)
 boolean mayOverrideBaseMultiplicity()
          Indicate if assignments of this element may override the default multiplicity
 void setReferenced(boolean referenced)
          Set if this element is referenced (not to be called 'by hand'!!!)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

label

protected FxString label

hint

protected FxString hint

multiplicity

protected FxMultiplicity multiplicity

overrideMultiplicity

protected boolean overrideMultiplicity

referenced

protected boolean referenced

options

protected java.util.List<FxStructureOption> options
Constructor Detail

FxStructureElement

protected FxStructureElement(long id,
                             java.lang.String name,
                             FxString label,
                             FxString hint,
                             boolean overrideMultiplicity,
                             FxMultiplicity multiplicity,
                             java.util.List<FxStructureOption> options)
Constructor

Parameters:
id - id
name - name
label - label
hint - hint
overrideMultiplicity - may override base multiplicity
multiplicity - the multiplicity
options - options
Method Detail

getId

public long getId()
Internal id of this element

Specified by:
getId in interface SelectableObject
Returns:
internal id of this element

getName

public java.lang.String getName()
Name of this element (may be overriden with an alias)

Specified by:
getName in interface SelectableObjectWithName
Returns:
name of this element

getLabel

public FxString getLabel()
Multilingual label of this element

Returns:
label of this element

getHint

public FxString getHint()
Get hint text for UI

Returns:
hint text for UI

mayOverrideBaseMultiplicity

public boolean mayOverrideBaseMultiplicity()
Indicate if assignments of this element may override the default multiplicity

Returns:
indicate if assignments of this element may override the default multiplicity

getMultiplicity

public FxMultiplicity getMultiplicity()
(Base) multiplicity of this element, may be overriden in assignment depending on mayOverrideMultiplicity

Returns:
multiplicity of this element
See Also:
mayOverrideBaseMultiplicity()

isReferenced

public boolean isReferenced()
Is this element referenced? (=in use)

Returns:
if this element is referenced

setReferenced

public void setReferenced(boolean referenced)
Set if this element is referenced (not to be called 'by hand'!!!)

Parameters:
referenced - is referenced

hasOption

public boolean hasOption(java.lang.String key)
Check if an option is set for the requested key

Parameters:
key - option key
Returns:
if an option is set for the requested key

getOption

public 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.

Parameters:
key - option key
Returns:
the found option or an object that indicates that the option is not set

getOptions

public java.util.List<FxStructureOption> getOptions()
Get a (unmodifiable) list of all options set for this group

Returns:
(unmodifiable) list of all options set for this group