Class Node

All Implemented Interfaces:
Serializable, IBaseEntity, ICoreEntity, IEntity, IHrcManaged<Node>, IRightManaged, ISortableEntity, IStateManaged, ITypeManaged, IVersionManaged

@Entity public class Node extends HrcEntity implements IRightManaged, IStateManaged, IVersionManaged, IHrcManaged<Node>
In most PIM-systems Node is chosen as the main entity that carries information and represents the sellable product or article. Nodes are grouped in a hierarchy with a fix number of levels, each level being represented by a NodeType. NodeTypes serve to configure and structure the data that describe the corresponding Nodes. Structuring of information in Node:
  • Fields of ComplexEntity are used for the most accessed data, such as for display in trees and lists and for searches: name, description, externalKey. Additionally there are 5 user defined fields that allow quicker access in searches and display.
  • type attributes carry the information that each Node of the same type has. The set of type attributes, their ordering and if they are mandatory is configured with the NodeType.
  • object attributes: User can freely assign Attributes to each Node from the list of allowedAttributeTypes of NodeType. Usually the object and type Attributes have one ore more value(s), but there are also Attributes (subtype OBJECTS_STATIC that have no values, which serve as text blocks.
  • Classification: Nodes can be assigned to one or more classifications. The classification can be used to provide a set of features similar to the type attributes.
Management and Lifecycle:
  • Nodes can be right managed, user need permissions to manipulate and see the Node.
  • State: Nodes can have one or more States in order to signal if Node can be edited, can be published or other user defined stages.
  • Right management and State management must be enabled and configured in NodeType.
    See Also:
    • Constructor Details

      • Node

        public Node()
      • Node

        public Node(Node source)
    • Method Details

      • getNodeType

        public NodeType getNodeType()
      • setNodeType

        public void setNodeType(NodeType nodeType)
      • getNodeHrc

        public NodeHrc getNodeHrc()
      • setNodeHrc

        public void setNodeHrc(NodeHrc nodeHrc)
      • getUdfField1

        public String getUdfField1()
      • setUdfField1

        public void setUdfField1(String udfField1)
      • getUdfField2

        public String getUdfField2()
      • setUdfField2

        public void setUdfField2(String udfField2)
      • getUdfField3

        public String getUdfField3()
      • setUdfField3

        public void setUdfField3(String udfField3)
      • getUdfField4

        public String getUdfField4()
      • setUdfField4

        public void setUdfField4(String udfField4)
      • getUdfField5

        public String getUdfField5()
      • setUdfField5

        public void setUdfField5(String udfField5)
      • getClassifications

        public List<ClassificationToNode> getClassifications()
      • setClassifications

        public void setClassifications(List<ClassificationToNode> classifications)
      • addClassification

        public void addClassification(ClassificationToNode classification)
      • getAllowedRightTypes

        public RightType[] getAllowedRightTypes()
        Description copied from interface: IRightManaged
        give the maximum list of RightTypes that apply for this class.
        Specified by:
        getAllowedRightTypes in interface IRightManaged
        Returns:
        array of enum RightType
      • getType

        public ComplexTypeEntity getType()
        Description copied from class: ComplexEntity
        override in derived classes, return null if ComplexEntity-subclass is not type managed.
        Specified by:
        getType in interface ITypeManaged
        Specified by:
        getType in class ComplexEntity
      • setType

        public void setType(ComplexTypeEntity type)
        Description copied from class: ComplexEntity
        override in derived classes if ComplexEntity-subclass is type managed, else do nothing.
        be used by entity mapper
        Overrides:
        setType in class ComplexEntity
      • getInheritedStateGroupTypes

        public List<StateGroupType> getInheritedStateGroupTypes()
        Returns:
        StateGroupTypes of closest ancestor's NodeType, only if this Node's NodeType has no StateGroupTypes. NodeType must be attached
      • getStateGroupTypes

        public List<StateGroupType> getStateGroupTypes()
        Description copied from class: ComplexEntity
        type of ComplexEntity must be attached
        Specified by:
        getStateGroupTypes in interface IStateManaged
        Overrides:
        getStateGroupTypes in class ComplexEntity
        Returns:
        the list of StateGroupType assigned to this Node's NodeType or assigned to an ancestor's NodeType. Node and NodeType must be attached
      • getHrc

        public ComplexEntity getHrc()
        Description copied from class: HrcEntity
        override in derived classes
        return hierarchy
        Specified by:
        getHrc in class HrcEntity
      • hrcChildren

        public List<Node> hrcChildren()
        Description copied from interface: IHrcManaged
        typesafe retrieval of HrcEntity children. never return proxies
        Specified by:
        hrcChildren in interface IHrcManaged<Node>
        Returns:
        typesafe list of children entities or empty list. never null
      • hrcVisibleChildren

        public List<Node> hrcVisibleChildren()
        Description copied from interface: IHrcManaged
        typesafe retrieval of HrcEntity visible children (filtered on life cycle flag visible)
        never return proxies
        Specified by:
        hrcVisibleChildren in interface IHrcManaged<Node>
        Returns:
        typesafe list of children entities or empty list. never null
      • hrcParent

        public Node hrcParent()
        Description copied from interface: IHrcManaged
        typesafe retrieval of HrcEntity parent. never return proxy. use this preferable over getParent() if you want access type special properties or use entity class, instead of safeCast to target type yourself. still use getParent() if you only need the id, cause no need to initialize (load) proxy then
        Specified by:
        hrcParent in interface IHrcManaged<Node>
        Returns:
        parent entity or null
      • hrcParents

        public List<Node> hrcParents()
        Description copied from interface: IHrcManaged
        typesafe retrieval of HrcEntity parents. never return proxies. use this if you want access type special properties or use entity class, instead of safeCast to target type yourself
        Specified by:
        hrcParents in interface IHrcManaged<Node>
        Overrides:
        hrcParents in class HrcEntity
        Returns:
        Parents starting from root up to (but not including) this HrcEntity.
      • hrcPath

        public List<Node> hrcPath()
        Description copied from interface: IHrcManaged
        typesafe retrieval of HrcEntity parents plus entity itself. never return proxies. use this if you want access type special properties or use entity class, instead of safeCast to target type yourself
        Specified by:
        hrcPath in interface IHrcManaged<Node>
        Overrides:
        hrcPath in class HrcEntity
        Returns:
        List of ancestors starting with root ancestor and including ourself at the end
        See Also: