com.flexive.shared.structure
Class FxSelectListItemEdit

java.lang.Object
  extended by com.flexive.shared.structure.FxSelectListItem
      extended by com.flexive.shared.structure.FxSelectListItemEdit
All Implemented Interfaces:
ObjectWithColor, ObjectWithLabel, SelectableObject, SelectableObjectWithLabel, SelectableObjectWithName, java.io.Serializable

public class FxSelectListItemEdit
extends FxSelectListItem
implements java.io.Serializable

Editable select list item

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

Field Summary
 
Fields inherited from class com.flexive.shared.structure.FxSelectListItem
acl, color, data, EMPTY, iconId, iconQuality, iconVer, id, label, lifeCycleInfo, list, name, parentItem, parentItemId, position
 
Constructor Summary
FxSelectListItemEdit(FxSelectListItem item)
          Constructor to make an existing list item editable
FxSelectListItemEdit(FxSelectListItem item, FxSelectListEdit list)
          Constructor to make an existing list item editable and add it to an editable select list.
FxSelectListItemEdit(java.lang.String name, ACL acl, FxSelectList list, FxString label, java.lang.String data, java.lang.String color)
          Constructor for creating a new list item
 
Method Summary
 boolean changes()
          Have any changes been made?
static FxSelectListItemEdit cloneItem(FxSelectListItem item, boolean markNew, boolean applyList)
          Clone an FxSelectListItem for editing
static FxSelectListItemEdit createNew(java.lang.String name, ACL acl, FxSelectList list, FxString label, java.lang.String data, java.lang.String color)
          Helper method to create a new FxSelectListItemEdit instance
 long getAclId()
           
 boolean isAssignable(FxSelectListItem item)
          Check if the given list item is assignable as child (and not already assigned).
 boolean isChildOf(FxSelectListItem item)
          Check if this item is a child of the requested
 boolean isNew()
          Is this a new list item?
 void resetChanges()
          Reset all changes to this item
 void setAcl(ACL acl)
          Set this items acl
 void setAclId(long aclId)
           
 void setColor(java.lang.String color)
          Set the items display color
 void setData(java.lang.String data)
          Set optional item data
 FxSelectListItemEdit setDefaultItem()
           
 void setIconId(long iconId)
          Set the id of icon used for user interfaces (reference to binaries, internal field!)
 void setIconQuality(int iconQuality)
          Set the quality of icon used for user interfaces (reference to binaries, internal field!)
 void setIconVer(int iconVer)
          Set the version of icon used for user interfaces (reference to binaries, internal field!)
 void setLabel(FxString label)
          Set this items label
 void setName(java.lang.String name)
          Set item name (has to be unique for the list)
 FxSelectListItemEdit setParentItem(FxSelectListItem item)
          Set a parent item
 
Methods inherited from class com.flexive.shared.structure.FxSelectListItem
_synchronize, asEditable, equals, getAcl, getChildCount, getChildren, getColor, getData, getHasChildren, getIconId, getIconQuality, getIconVer, getId, getLabel, getLabelBreadcrumbPath, getLabelBreadcrumbPath, getLifeCycleInfo, getList, getName, getParentItem, getPosition, hashCode, hasParentItem, isEmpty, isValidLabel, isValidName, setList, setPosition, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FxSelectListItemEdit

public FxSelectListItemEdit(FxSelectListItem item)
Constructor to make an existing list item editable

Parameters:
item - the item to make editable

FxSelectListItemEdit

public FxSelectListItemEdit(FxSelectListItem item,
                            FxSelectListEdit list)
Constructor to make an existing list item editable and add it to an editable select list.

Parameters:
item - the item to make editable
list - the new list to add the item to

FxSelectListItemEdit

public FxSelectListItemEdit(java.lang.String name,
                            ACL acl,
                            FxSelectList list,
                            FxString label,
                            java.lang.String data,
                            java.lang.String color)
Constructor for creating a new list item

Parameters:
name - unique name of the item (within the list)
acl - the items ACL
list - the list this item belongs to
label - this items label
data - optional data
color - color for display
Method Detail

isNew

public boolean isNew()
Is this a new list item?

Returns:
is anew list item?

changes

public boolean changes()
Have any changes been made?

Returns:
changes made?

setName

public void setName(java.lang.String name)
Set item name (has to be unique for the list)

Parameters:
name - item name (has to be unique for the list)

setLabel

public void setLabel(FxString label)
Set this items label

Parameters:
label - label of this item

setAcl

public void setAcl(ACL acl)
Set this items acl

Parameters:
acl - acl of this item

setAclId

public void setAclId(long aclId)

getAclId

public long getAclId()

setData

public void setData(java.lang.String data)
Set optional item data

Parameters:
data - optional item data

setColor

public void setColor(java.lang.String color)
Set the items display color

Parameters:
color - display color

setIconId

public void setIconId(long iconId)
Set the id of icon used for user interfaces (reference to binaries, internal field!)

Parameters:
iconId - id of icon used for user interfaces (reference to binaries, internal field!)

setIconVer

public void setIconVer(int iconVer)
Set the version of icon used for user interfaces (reference to binaries, internal field!)

Parameters:
iconVer - version of icon used for user interfaces (reference to binaries, internal field!)

setIconQuality

public void setIconQuality(int iconQuality)
Set the quality of icon used for user interfaces (reference to binaries, internal field!)

Parameters:
iconQuality - quality of icon used for user interfaces (reference to binaries, internal field!)

setDefaultItem

public FxSelectListItemEdit setDefaultItem()

createNew

public static FxSelectListItemEdit createNew(java.lang.String name,
                                             ACL acl,
                                             FxSelectList list,
                                             FxString label,
                                             java.lang.String data,
                                             java.lang.String color)
Helper method to create a new FxSelectListItemEdit instance

Parameters:
name - unique name of the item (within the list)
acl - the items ACL
list - the list this item belongs to
label - this items label
data - optional data
color - color for display
Returns:
FxSelectListItemEdit

cloneItem

public static FxSelectListItemEdit cloneItem(FxSelectListItem item,
                                             boolean markNew,
                                             boolean applyList)
Clone an FxSelectListItem for editing

Parameters:
item - the item to clone
markNew - mark this item as new?
applyList - apply the item to the list of the original item?
Returns:
FxSelectListItemEdit

setParentItem

public FxSelectListItemEdit setParentItem(FxSelectListItem item)
                                   throws FxInvalidParameterException
Set a parent item

Parameters:
item - item from the parent list to assign as parent item
Returns:
FxSelectListItemEdit
Throws:
FxInvalidParameterException - if the parent item is not valid for this item

isAssignable

public boolean isAssignable(FxSelectListItem item)
Check if the given list item is assignable as child (and not already assigned). An item is assignable if it has no parent already, is different from this item and is assigned to the same list

Parameters:
item - item to check
Returns:
assignable

isChildOf

public boolean isChildOf(FxSelectListItem item)
Check if this item is a child of the requested

Parameters:
item - item to check if this one is a child of
Returns:
child of item

resetChanges

public void resetChanges()
Reset all changes to this item