Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal.layout.node
Class UserLayoutNodeDescription

    java.lang.Object
      org.jasig.portal.layout.node.UserLayoutNodeDescription

All Implemented Interfaces:
  IUserLayoutNodeDescription

Direct Known Subclasses:
  UserLayoutChannelDescription, UserLayoutFolderDescription

    public abstract class UserLayoutNodeDescription

extends java.lang.Object
implements IUserLayoutNodeDescription

An class describing common features of user layout nodes, that is channels and folders

Version:
  1.0
Author:
  Peter Kharchenko

Field Summary
`protected boolean` | `addChildAllowed`
`protected boolean` | `deleteAllowed`
`protected boolean` | `editAllowed`
`protected boolean` | `hidden`
`protected java.lang.String` | `id`
`protected boolean` | `immutable`
`protected boolean` | `moveAllowed`
`protected java.lang.String` | `name`
`protected double` | `precedence`
`protected boolean` | `unremovable`

Fields inherited from interface org.jasig.portal.layout.node.IUserLayoutNodeDescription
`CHANNEL, FOLDER`

Constructor Summary
`UserLayoutNodeDescription()`
`UserLayoutNodeDescription(org.w3c.dom.Element xmlNode)`
`UserLayoutNodeDescription(IUserLayoutNodeDescription d)`

Method Summary
`void` | `addNodeAttributes(org.w3c.dom.Element node)` Add all of common node attributes to the `Element`.
`static UserLayoutNodeDescription` | `createUserLayoutNodeDescription(org.w3c.dom.Element xmlNode)` A factory method to create a `UserLayoutNodeDescription` instance, based on the information provided in the user layout `Element`.
`java.lang.String` | `getId()` Returns a node Id.
`java.lang.String` | `getName()` Determine a name associated with this node.
`double` | `getPrecedence()` Returns the precedence value for this node.
`abstract int` | `getType()` Returns a type of the node, could be FOLDER or CHANNEL integer constant.
`abstract org.w3c.dom.Element` | `getXML(org.w3c.dom.Document root)` Creates a `org.w3c.dom.Element` representation of the current node.
`boolean` | `isAddChildAllowed()` Returns true if a child node may be added to the node.
`boolean` | `isDeleteAllowed()` Returns true if the node can be deleted.
`boolean` | `isEditAllowed()` Returns true if the node can be edited.
`boolean` | `isHidden()`
`boolean` | `isImmutable()`
`boolean` | `isMoveAllowed()` Returns true if the node can be moved.
`boolean` | `isUnremovable()`
`void` | `setAddChildAllowed(boolean setting)` Set whether or not child nodes can be added to this node.
`void` | `setDeleteAllowed(boolean setting)` Set whether a node can be deleted or not.
`void` | `setEditAllowed(boolean setting)` Set whether a node can be edited or not.
`void` | `setHidden(boolean setting)`
`void` | `setId(java.lang.String id)` Set a new node Id.
`void` | `setImmutable(boolean setting)`
`void` | `setMoveAllowed(boolean setting)` Set whether a node can be moved or not.
`void` | `setName(java.lang.String name)`
`void` | `setPrecedence(double setting)` Set the precedence of a node.
`void` | `setUnremovable(boolean setting)`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### id

    protected java.lang.String id

### name

    protected java.lang.String name

### immutable

    protected boolean immutable

### unremovable

    protected boolean unremovable

### hidden

    protected boolean hidden

### deleteAllowed

    protected boolean deleteAllowed

### editAllowed

    protected boolean editAllowed

### moveAllowed

    protected boolean moveAllowed

### addChildAllowed

    protected boolean addChildAllowed

### precedence

    protected double precedence

Constructor Detail

### UserLayoutNodeDescription

    public UserLayoutNodeDescription()

### UserLayoutNodeDescription

    public UserLayoutNodeDescription(IUserLayoutNodeDescription d)

### UserLayoutNodeDescription

    UserLayoutNodeDescription(org.w3c.dom.Element xmlNode)
                        throws PortalException

Throws:
  `PortalException`

Method Detail

### getPrecedence

    public double getPrecedence()

  Returns the precedence value for this node. The precedence is 0.0 for a user owned node and the value of the node's owning fragment's precedence for a node incorporated from another fragment. Added by SCT for DLM.

  Specified by:
    `getPrecedence` in interface `IUserLayoutNodeDescription`

### setPrecedence

    public void setPrecedence(double setting)

  Set the precedence of a node. See getPrecedence for more information. Added by SCT for DLM.

  Specified by:
    `setPrecedence` in interface `IUserLayoutNodeDescription`

### isMoveAllowed

    public boolean isMoveAllowed()

  Returns true if the node can be moved. Added by SCT for DLM.

  Specified by:
    `isMoveAllowed` in interface `IUserLayoutNodeDescription`

### setMoveAllowed

    public void setMoveAllowed(boolean setting)

  Set whether a node can be moved or not. Added by SCT for DLM.

  Specified by:
    `setMoveAllowed` in interface `IUserLayoutNodeDescription`

### isDeleteAllowed

    public boolean isDeleteAllowed()

  Returns true if the node can be deleted. Added by SCT for DLM.

  Specified by:
    `isDeleteAllowed` in interface `IUserLayoutNodeDescription`

### setDeleteAllowed

    public void setDeleteAllowed(boolean setting)

  Set whether a node can be deleted or not. Added by SCT for DLM.

  Specified by:
    `setDeleteAllowed` in interface `IUserLayoutNodeDescription`

### isEditAllowed

    public boolean isEditAllowed()

  Returns true if the node can be edited. Added by SCT for DLM.

  Specified by:
    `isEditAllowed` in interface `IUserLayoutNodeDescription`

### setEditAllowed

    public void setEditAllowed(boolean setting)

  Set whether a node can be edited or not. Added by SCT for DLM.

  Specified by:
    `setEditAllowed` in interface `IUserLayoutNodeDescription`

### isAddChildAllowed

    public boolean isAddChildAllowed()

  Returns true if a child node may be added to the node. Added by SCT for DLM.

  Specified by:
    `isAddChildAllowed` in interface `IUserLayoutNodeDescription`

### setAddChildAllowed

    public void setAddChildAllowed(boolean setting)

  Set whether or not child nodes can be added to this node. Added by SCT for DLM.

  Specified by:
    `setAddChildAllowed` in interface `IUserLayoutNodeDescription`

### getId

    public java.lang.String getId()

  Returns a node Id. The Id has to be unique in the entire user layout document.

  Specified by:
    `getId` in interface `IUserLayoutNodeDescription`
  Returns:
    a `String` value

### setId

    public void setId(java.lang.String id)

  Set a new node Id. The Id has to be unique in the entire user layout document.

  Specified by:
    `setId` in interface `IUserLayoutNodeDescription`

### getName

    public java.lang.String getName()

  Determine a name associated with this node.

  Specified by:
    `getName` in interface `IUserLayoutNodeDescription`
  Returns:
    a folder/channel name.

### setName

    public void setName(java.lang.String name)

  Specified by:
    `setName` in interface `IUserLayoutNodeDescription`

### isUnremovable

    public boolean isUnremovable()

  Specified by:
    `isUnremovable` in interface `IUserLayoutNodeDescription`

### setUnremovable

    public void setUnremovable(boolean setting)

  Specified by:
    `setUnremovable` in interface `IUserLayoutNodeDescription`

### isImmutable

    public boolean isImmutable()

  Specified by:
    `isImmutable` in interface `IUserLayoutNodeDescription`

### setImmutable

    public void setImmutable(boolean setting)

  Specified by:
    `setImmutable` in interface `IUserLayoutNodeDescription`

### isHidden

    public boolean isHidden()

  Specified by:
    `isHidden` in interface `IUserLayoutNodeDescription`

### setHidden

    public void setHidden(boolean setting)

  Specified by:
    `setHidden` in interface `IUserLayoutNodeDescription`

### getType

    public abstract int getType()

  Returns a type of the node, could be FOLDER or CHANNEL integer constant.

  Specified by:
    `getType` in interface `IUserLayoutNodeDescription`
  Returns:
    a type

### getXML

    public abstract org.w3c.dom.Element getXML(org.w3c.dom.Document root)

  Creates a `org.w3c.dom.Element` representation of the current node.

  Specified by:
    `getXML` in interface `IUserLayoutNodeDescription`
  Parameters:
    `root` - a `Document` for which the `Element` should be created.
  Returns:
    a `Element` value

### addNodeAttributes

    public void addNodeAttributes(org.w3c.dom.Element node)

  Add all of common node attributes to the `Element`.

  Specified by:
    `addNodeAttributes` in interface `IUserLayoutNodeDescription`
  Parameters:
    `node` - an `Element` value

### createUserLayoutNodeDescription

    public static UserLayoutNodeDescription createUserLayoutNodeDescription(org.w3c.dom.Element xmlNode)
                                                                     throws PortalException

  A factory method to create a `UserLayoutNodeDescription` instance, based on the information provided in the user layout `Element`.

  Parameters:
    `xmlNode` - a user layout DTD folder/channel `Element` value
  Returns:
    an `UserLayoutNodeDescription` value
  Throws:
    `PortalException` - if the xml passed is somehow invalid.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD