arlut.csd.ganymede
Interface Category

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
CategoryDump, DBBaseCategory

public interface Category
extends java.rmi.Remote

Client side interface definition for the Ganymede DBBaseCategory class. This interface allows the client to manipulate a category's relationships.


Method Summary
 void addNodeAfter(arlut.csd.ganymede.CategoryNode node, java.lang.String previousNodeName)
          This method is used to place a Category Node under us.
 void addNodeBefore(arlut.csd.ganymede.CategoryNode node, java.lang.String nextNodeName)
          This method is used to place a Category Node under us.
 arlut.csd.ganymede.Category getCategory()
          This method returns the category that this category node belongs to.
 java.lang.String getName()
          Returns the name of this category.
 arlut.csd.ganymede.CategoryNode getNode(java.lang.String name)
          Returns a subcategory of name .
 java.util.Vector getNodes()
          Returns child nodes
 java.lang.String getPath()
          Returns the full path to this category, with levels in the hierarchy separated by '/'s.
 boolean isUnder(arlut.csd.ganymede.Category cat)
          This method returns true if this is a subcategory of cat.
 void moveCategoryNode(java.lang.String catPath, java.lang.String previousNodeName)
          This method can be used to move a Category from another Category to this Category, or to move a Category around within this Category.
 arlut.csd.ganymede.Category newSubCategory()
          This creates a new subcategory under this category, with displayOrder after the last item currently in the category.
 void removeNode(arlut.csd.ganymede.CategoryNode node)
          This method is used to remove a Category Node from under us.
 void removeNode(java.lang.String name)
          This method is used to remove a Category Node from under us.
 boolean setName(java.lang.String newName)
          Sets the name of this node.
 

Method Detail

getName

public java.lang.String getName()
                         throws java.rmi.RemoteException
Returns the name of this category.

java.rmi.RemoteException

getPath

public java.lang.String getPath()
                         throws java.rmi.RemoteException
Returns the full path to this category, with levels in the hierarchy separated by '/'s.

java.rmi.RemoteException

setName

public boolean setName(java.lang.String newName)
                throws java.rmi.RemoteException
Sets the name of this node. The name must not include a '/' character, but all other characters are acceptable.

java.rmi.RemoteException

getCategory

public arlut.csd.ganymede.Category getCategory()
                                        throws java.rmi.RemoteException
This method returns the category that this category node belongs to. If this is the DBStore's root category, this will return null.

java.rmi.RemoteException

getNodes

public java.util.Vector getNodes()
                          throws java.rmi.RemoteException
Returns child nodes

java.rmi.RemoteException

getNode

public arlut.csd.ganymede.CategoryNode getNode(java.lang.String name)
                                        throws java.rmi.RemoteException
Returns a subcategory of name .

java.rmi.RemoteException

addNodeAfter

public void addNodeAfter(arlut.csd.ganymede.CategoryNode node,
                         java.lang.String previousNodeName)
                  throws java.rmi.RemoteException
This method is used to place a Category Node under us. The node will be placed according to the node's displayOrder value, if resort and/or adjustNodes are true.

Parameters:
node - Node to place under this category
previousNodeName - The name of the node to place node after, must not be path-qualified.
java.rmi.RemoteException

addNodeBefore

public void addNodeBefore(arlut.csd.ganymede.CategoryNode node,
                          java.lang.String nextNodeName)
                   throws java.rmi.RemoteException

This method is used to place a Category Node under us. This method adds a new node into this category, before nextNodeName if nextNodeName is not null, or at the beginning of the category if it is.

Parameters:
node - Node to place under this category
java.rmi.RemoteException

moveCategoryNode

public void moveCategoryNode(java.lang.String catPath,
                             java.lang.String previousNodeName)
                      throws java.rmi.RemoteException
This method can be used to move a Category from another Category to this Category, or to move a Category around within this Category.

Parameters:
catPath - the fully specified path of the node to be moved
previousNodeName - The name of the node to place node after, must be fully path-qualified.
java.rmi.RemoteException

removeNode

public void removeNode(arlut.csd.ganymede.CategoryNode node)
                throws java.rmi.RemoteException

This method is used to remove a Category Node from under us.

Note that removeNode assumes that it can recalculate the displayOrder values for other nodes in this category. This method should not be called if other nodes with prefixed displayOrder values are still to be added to this category, as from the DBStore file.

java.rmi.RemoteException

removeNode

public void removeNode(java.lang.String name)
                throws java.rmi.RemoteException

This method is used to remove a Category Node from under us.

Note that removeNode assumes that it can recalculate the displayOrder values for other nodes in this category. This method should not be called if other nodes with prefixed displayOrder values are still to be added to this category, as from the DBStore file.

java.rmi.RemoteException

newSubCategory

public arlut.csd.ganymede.Category newSubCategory()
                                           throws java.rmi.RemoteException
This creates a new subcategory under this category, with displayOrder after the last item currently in the category. This method should only be called when there are no nodes left to be added to the category with prefixed displayOrder values.

java.rmi.RemoteException

isUnder

public boolean isUnder(arlut.csd.ganymede.Category cat)
                throws java.rmi.RemoteException
This method returns true if this is a subcategory of cat.

java.rmi.RemoteException