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(CategoryNode node, java.lang.String previousNodeName)
          This method is used to place a Category Node under us.
 void addNodeBefore(CategoryNode node, java.lang.String nextNodeName)
          This method is used to place a Category Node under us.
 Category getCategory()
          This method returns the category that this category node belongs to.
 java.lang.String getName()
          Returns the name of this category.
 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(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.
 Category newSubCategory()
          This creates a new subcategory under this category, with displayOrder after the last item currently in the category.
 void removeNode(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.

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.

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.

getCategory

public 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.

getNodes

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

getNode

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

addNodeAfter

public void addNodeAfter(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.

addNodeBefore

public void addNodeBefore(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
prevNodeName - the name of the node that the new node is to be added before, must not be path-qualified

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.

removeNode

public void removeNode(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.


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.


newSubCategory

public 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.

isUnder

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