|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flexive.shared.tree.FxTreeNode
public class FxTreeNode
FxNode implementation for flexive
| Field Summary | |
|---|---|
protected boolean |
activate
|
protected java.util.List<FxTreeNode> |
children
|
protected java.lang.String |
data
|
protected long |
id
|
protected FxString |
label
|
protected FxLock |
lock
|
protected FxTreeMode |
mode
|
protected java.lang.String |
name
|
protected long |
parentNodeId
|
static int |
PARTIAL_LOADED_POS
|
static java.lang.String |
PATH_NOT_LOADED
|
protected int |
position
|
protected FxPK |
reference
|
protected LifeCycleInfo |
referenceLifeCycleInfo
|
protected long |
referenceTypeId
|
static long |
ROOT_NODE
Constant id of the root node |
| Constructor Summary | |
|---|---|
protected |
FxTreeNode()
Protected constructor to avoid construction |
|
FxTreeNode(FxTreeMode mode,
FxLock lock,
long id,
long parentNodeId,
FxPK reference,
LifeCycleInfo referenceLifeCycleInfo,
long referenceTypeId,
java.util.List<java.lang.Long> acls,
java.lang.String name,
java.lang.String path,
FxString label,
int position,
java.util.List<FxTreeNode> children,
java.util.List<java.lang.Long> childIds,
int depth,
int directChildCount,
boolean leaf,
boolean dirty,
long modifiedAt,
java.lang.String data,
boolean mayEdit,
boolean mayCreate,
boolean mayDelete,
boolean mayRelate,
boolean mayExport)
Ctor |
| Method Summary | |
|---|---|
void |
_addChild(FxTreeNode node)
Internal method only used during loading phase of a tree |
void |
_applyPath(java.lang.String path)
Internal method to recursively apply a path from the root to all children |
void |
_applyPosition(int position)
Internal method to recursively apply positions |
FxTreeNodeEdit |
asEditable()
Make this node editable |
static FxTreeNode |
createErrorNode(long nodeId,
java.lang.String message)
Create a temporary error node to be used in UI |
static FxTreeNode |
createNewTemporaryChildNode(FxTreeNode parentNode)
Create a temporary node below the given parent node |
boolean |
equals(java.lang.Object obj)
|
long |
getACLId()
Deprecated. use getACLIds() |
java.util.List<java.lang.Long> |
getACLIds()
Return the ACL id(s) of the referenced content. |
java.util.List<java.lang.Long> |
getChildIds()
Returns the child Id's of this node, but only if they are a part of the resultset. |
java.util.List<FxTreeNode> |
getChildren()
Returns the children of this node, but only if they are a part of the resultset - use isLeaf(), getDirectChildCount() and getTotalChildCount() to find out if the node has children. |
java.lang.String |
getData()
Get the template assigned to this node, can be null |
int |
getDepth()
Returns the depth of the node within the complete tree The root node has depth 1 |
int |
getDirectChildCount()
Get the number of child nodes directly attached to this node |
long |
getId()
The object's unique identifier |
FxString |
getLabel()
Return the localized label of the object. |
FxLock |
getLock()
Get the lock of the reference, if set |
FxTreeMode |
getMode()
Get the tree mode (live or edit) |
long |
getModifiedAt()
Get the timestamp of the last modification |
java.lang.String |
getName()
Get the name of this node |
long |
getParentNodeId()
Get the id of the parent node |
java.lang.String |
getPath()
Get the path of this node |
int |
getPosition()
Get the position of this node |
FxPK |
getReference()
Get the referenced content |
LifeCycleInfo |
getReferenceLifeCycleInfo()
Get the LifeCycleInfo of the referenced content |
long |
getReferenceTypeId()
Get the type id of the referenced content |
boolean |
hasData()
Is data assigned to this node? |
int |
hashCode()
|
boolean |
hasReference()
Is a reference set for this node (Description) |
boolean |
isActivate()
Is the node marked as active? (only used in GUI, not persisted!) |
boolean |
isDirty()
Is this node flagged as dirty? |
boolean |
isLeaf()
Is this a leaf node? |
boolean |
isLive()
Is this node "live"? |
boolean |
isMarkForDelete()
Is this node marked to be deleted? (only used in GUI, not persisted!) |
boolean |
isMayCreate()
ACL: Create permission for the calling user |
boolean |
isMayDelete()
ACL: Delete permission for the calling user |
boolean |
isMayEdit()
ACL: Edit permission for the calling user |
boolean |
isMayExport()
ACL: Export permission for the calling user |
boolean |
isMayRelate()
ACL: Relate permission for the calling user |
boolean |
isPartialLoaded()
Is this FxTreeNode only partially loaded? Loading a (sub)tree is usually performed with partial loading enabled (only the calling users current language filled in the label) |
boolean |
isTemporary()
Is this node temporary only? (only used in GUI, not persisted!) |
java.util.Iterator<FxTreeNode> |
iterator()
Returns an iterator over this node and its children. |
void |
setActivate(boolean activate)
Set the active flag of this tree node (only used in GUI, not persisted!) |
FxTreeNode |
setMarkForDelete(boolean markForDelete)
Mark to be deleted for UI (only used in GUI, not persisted!) |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected FxString label
protected FxPK reference
protected LifeCycleInfo referenceLifeCycleInfo
protected long referenceTypeId
protected FxLock lock
protected FxTreeMode mode
protected int position
protected java.util.List<FxTreeNode> children
protected long id
protected long parentNodeId
protected java.lang.String name
protected java.lang.String data
protected boolean activate
public static final int PARTIAL_LOADED_POS
public static final java.lang.String PATH_NOT_LOADED
public static final long ROOT_NODE
| Constructor Detail |
|---|
protected FxTreeNode()
public FxTreeNode(FxTreeMode mode,
FxLock lock,
long id,
long parentNodeId,
FxPK reference,
LifeCycleInfo referenceLifeCycleInfo,
long referenceTypeId,
java.util.List<java.lang.Long> acls,
java.lang.String name,
java.lang.String path,
FxString label,
int position,
java.util.List<FxTreeNode> children,
java.util.List<java.lang.Long> childIds,
int depth,
int directChildCount,
boolean leaf,
boolean dirty,
long modifiedAt,
java.lang.String data,
boolean mayEdit,
boolean mayCreate,
boolean mayDelete,
boolean mayRelate,
boolean mayExport)
mode - FxTreeModelock - the lock of the referenceid - node idparentNodeId - id of the parent nodereference - pk of the referenced contentreferenceLifeCycleInfo - if the node has a referenced content this is its LifeCycleInforeferenceTypeId - type id of the referenced contentacls - acls of the referenced contentname - name (part of the path)path - complete path from the root nodelabel - labelposition - positionchildren - child nodes (only available if loaded with #getTree)childIds - ids of the child nodes (only available if loaded with #getTree)depth - depth of this node relative to the root nodedirectChildCount - number of children attached to this node directlyleaf - is this node a leaf?dirty - dirty flagmodifiedAt - timestamp of last modificationdata - optional datamayEdit - edit permission for the calling usermayCreate - create permission for the calling usermayDelete - delete permission for the calling usermayRelate - relate permission for the calling usermayExport - export permission for the calling user| Method Detail |
|---|
public int getPosition()
public boolean isPartialLoaded()
public boolean isLive()
public boolean isDirty()
public long getId()
getId in interface SelectableObjectpublic long getACLId()
getACLIds()
public java.util.List<java.lang.Long> getACLIds()
public long getParentNodeId()
public java.lang.String getName()
getName in interface SelectableObjectWithNamepublic boolean hasReference()
public FxPK getReference()
public LifeCycleInfo getReferenceLifeCycleInfo()
public long getReferenceTypeId()
public FxLock getLock()
public long getModifiedAt()
public boolean hasData()
public java.lang.String getData()
null
nullpublic int getDepth()
public int getDirectChildCount()
public boolean isLeaf()
public FxString getLabel()
getLabel in interface ObjectWithLabelpublic java.lang.String getPath()
public java.util.List<FxTreeNode> getChildren()
public java.util.List<java.lang.Long> getChildIds()
public boolean isMayEdit()
public boolean isMayDelete()
public boolean isMayRelate()
public boolean isMayExport()
public boolean isMayCreate()
public boolean isMarkForDelete()
public FxTreeNode setMarkForDelete(boolean markForDelete)
markForDelete - delete?
public void setActivate(boolean activate)
activate - activate flagpublic boolean isActivate()
public boolean isTemporary()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
public static FxTreeNode createErrorNode(long nodeId,
java.lang.String message)
nodeId - desired node idmessage - error message
public FxTreeMode getMode()
public FxTreeNodeEdit asEditable()
public static FxTreeNode createNewTemporaryChildNode(FxTreeNode parentNode)
parentNode - the parent node
public void _addChild(FxTreeNode node)
node - child node to addpublic void _applyPath(java.lang.String path)
path - path to apply (includes name already!)public void _applyPosition(int position)
position - position to apply to this nodepublic java.util.Iterator<FxTreeNode> iterator()
iterator in interface java.lang.Iterable<FxTreeNode>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||