Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.content.virtual
Class VirtualNode

    java.lang.Object
      com.bea.content.virtual.VirtualNode

All Implemented Interfaces
  Serializable, Cloneable

    public class VirtualNode

extends Object
implements Serializable, Cloneable

A Virtual Node represents an element in a virtual hieararchy.

Methods which return an `ISortableFilterablePagedList` from `IVersionManager` can sort and filter the responses. For a discussion on paging, sorting and filtering, see `com.bea.content.paging` and `ContentListKeys`. Native sortable properties for the WLP Repository are found via the `ISortablePagedList.getNativeSortableProperties()` method on a paged list of Node objects.

For the Virtual Nodes in the WLP Repository, the current list of native sortable and filterable properties is:

- name
- isLocked
- objectClassId
- assignedToUserName
- path
- modifiedDate
- nodeType (content, hierarchy or node). The type concept is deprecated in 9.2.
- typeName

See Also
  Serialized Form

Field Summary
`protected String[]` | `assignedToRoles` The roles that this virtual node is assigned to.
`protected String` | `assignedToUser` The user that this virtual node is assigned to.
`protected String` | `assignedToVersionName` This value is set to the version name if this virtual node is locked.
`protected Version` | `currentVersion` The current version of this virtual node.
`protected String` | `currentVersionName` The name of the virtual node's current version.
`protected ID` | `id` The virtual node's ID.
`protected boolean` | `isLocked` The flag indicating if this virtual node is locked.
`protected String` | `name` The virtual node's name.
`protected ObjectClass` | `objectClass` The object class of this virtual node.
`protected String` | `objectClassId` The object class id for this virtual node.

Constructor Summary
`VirtualNode()`

Method Summary
`Object` | `clone()` Clones a virutal node and its current version if it has previously been loaded.
`String[]` | `getAssignedToRoles()` Gets the role the Node is assigned to.
`String` | `getAssignedToUser()` Get the user name that this node is assigned to.
`Version` | `getCurrentVersion()` Gets the latest version, if the user requesting the operation has a working version of the Node then that will be returned.
`ID` | `getId()` Gets the id, including the repository name and uid.
`String` | `getName()` Gets the name of the virtual node.
`ObjectClass` | `getObjectClass()` Return the objectClass associated with the node.
`String` | `getObjectClassId()` Return the objectClassId associated with the node.
`boolean` | `isLocked()` Returns the lock value of this virtual node.
`void` | `setName(String name)` Set the name of the virtual node.
`void` | `setObjectClass(ObjectClass objectClass)` Sets the objectClass associated with the node.
`void` | `setObjectClassId(String objectClassId)` Sets the objectClass ID associated with the node.
`String` | `toString()` Returns the attributes of this Node in a String.

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

Field Detail

### id

    protected ID id

  The virtual node's ID.

### name

    protected String name

  The virtual node's name.

### assignedToRoles

    protected String[] assignedToRoles

  The roles that this virtual node is assigned to.

### assignedToUser

    protected String assignedToUser

  The user that this virtual node is assigned to.

### isLocked

    protected boolean isLocked

  The flag indicating if this virtual node is locked.

### currentVersion

    protected Version currentVersion

  The current version of this virtual node. Note: As of 10.2, this member variable is no longer used. The accessor `getCurrentVersion()` should be used.

### currentVersionName

    protected String currentVersionName

  The name of the virtual node's current version.

### objectClassId

    protected String objectClassId

  The object class id for this virtual node.

### objectClass

    protected ObjectClass objectClass

  The object class of this virtual node.

### assignedToVersionName

    protected String assignedToVersionName

  This value is set to the version name if this virtual node is locked. Then this version name is used in place of the current version name to get the version data.

Constructor Detail

### VirtualNode

    public VirtualNode()

Method Detail

### getId

    public ID getId()

  Gets the id, including the repository name and uid.

  Returns
    The ID of this virtual node.

### getName

    public String getName()

  Gets the name of the virtual node.

  Returns
    The name.

### setName

    public void setName(String name)

  Set the name of the virtual node.

  Parameters
    `name` - The name.

### getCurrentVersion

    public Version getCurrentVersion()

  Gets the latest version, if the user requesting the operation has a working version of the Node then that will be returned. This method will always return the current version. If the caller wishes to modify that version for a subsequent operation, the returned version should be kept in a local variable. For example, do this:

           IVersionManager versionManager = ContentManagerFactory.getVersionManager();
           VirtualNode vn = versionManager.checkOut(context, nodeId, version);
           Version currentVersion = vn.getCurrentVersion();
           currentVersion.setStatus(Workflow.PUBLISHED);
           versionManager.checkIn(context, nodeId, currentVersion);

           // Instead of:
           vn.getCurrentVersion().setStatus(Workflow.PUBLISHED);
           // This subsequent call gets the version again and will not checkIn the node as Published as desired.chec
           versionManager.checkIn(context, nodeId, vn.getCurrentVersion());

  Returns
    The current version for this virtual node.

### isLocked

    public boolean isLocked()

  Returns the lock value of this virtual node.

  Returns
    True if this virtual node is locked.

### getAssignedToRoles

    public String[] getAssignedToRoles()

  Gets the role the Node is assigned to. If there is an assignedToUser for the Node, then the roles will be ignored.

  Returns
    The role(s) the node is assigned to.

### getAssignedToUser

    public String getAssignedToUser()

  Get the user name that this node is assigned to. If there is an assignedToUser for the Node, then assignedToRoles will be ignored.

  Returns
    The user name

### getObjectClassId

    public String getObjectClassId()

  Return the objectClassId associated with the node.

  Returns
    The objectclass Uid

### setObjectClassId

    public void setObjectClassId(String objectClassId)

  Sets the objectClass ID associated with the node.

  Parameters
    `objectClassId` - The objectclass UID.

### getObjectClass

    public ObjectClass getObjectClass()
                               throws RepositoryException

  Return the objectClass associated with the node.

  Returns
    The objectclass
  Throws
    `RepositoryException` - if this object class cannot be retrieved.

### setObjectClass

    public void setObjectClass(ObjectClass objectClass)

  Sets the objectClass associated with the node.

  Parameters
    `objectClass` - The objectclass.

### toString

    public String toString()

  Returns the attributes of this Node in a String.

  Overrides:
    `toString` in class `Object`

### clone

    public Object clone()
                 throws CloneNotSupportedException

  Clones a virutal node and its current version if it has previously been loaded.

  Overrides:
    `clone` in class `Object`
  Returns
    A clone of the virutal node.
  Throws
    `CloneNotSupportedException` - If the clone fails.

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

Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.