xdrs
Interface XDirectoryService

All Superinterfaces:
NodeAuthorization, soaprmi.Remote, UserManagement
All Known Implementing Classes:
GenericXDirectoryService, ServiceImpl, ServiceImpl, ServiceImpl, ServiceImpl

public interface XDirectoryService
extends soaprmi.Remote, NodeAuthorization, UserManagement


Field Summary
static java.lang.String NAMESPACE
           
static java.lang.String ROOT
           
 
Fields inherited from interface xdrs.authorization.NodeAuthorization
ADMIN, EVERYBODY, NOBODY
 
Method Summary
 void addNode(java.lang.String path, org.gjt.xpp.XmlNode node)
          Add the given node as a child of the node associated with the given path.
 void copyNodes(java.lang.String[] sourcePaths, java.lang.String targetPath)
          Copy a set of nodes from one location to another.
 void deleteNodes(java.lang.String dirPath, java.lang.String[] childrenNames)
          Delete children nodes that are continaed in directory identified by path.
 org.gjt.xpp.XmlNode[] getChildrenWithoutHtml(java.lang.String pathToDirNode)
          Get list of XML nodes that are contained inside directory.
 org.gjt.xpp.XmlNode getNode(java.lang.String path)
          Get an XmlNode representation of whatever is at the given path.
 java.lang.String getNodeHtml(java.lang.String path)
          Get an XmlNode representation for the given path's html.
 java.lang.String[] keywordSearch(java.lang.String[] keywords, boolean doAnd, int maxResults)
          Search using keywords to find nodes.
 void modifyNode(java.lang.String path, org.gjt.xpp.XmlNode node)
          Update the values of a node, pointed to by the given path, with those in the given node.
 void moveNodes(java.lang.String[] sourcePaths, java.lang.String targetPath)
          Move a set of nodes from one location to another.
 
Methods inherited from interface xdrs.authorization.NodeAuthorization
setPermissions
 
Methods inherited from interface xdrs.authorization.UserManagement
addDNForUser, addGroupToSuperGroup, addUsersToGroup, addUserToGroup, createUser, deleteAllDNsForUser, deleteDNForUser, deleteGroup, deleteGroups, deleteUser, deleteUsers, getGroups, getUserForDN, listGroups, listSubGroupsOfGroup, listUsers, listUsersOfGroup, removeGroupFromSuperGroup, removeUserFromGroup, removeUsersFromGroup
 

Field Detail

NAMESPACE

public static final java.lang.String NAMESPACE
See Also:
Constant Field Values

ROOT

public static final java.lang.String ROOT
See Also:
Constant Field Values
Method Detail

getNode

public org.gjt.xpp.XmlNode getNode(java.lang.String path)
                            throws soaprmi.RemoteException,
                                   xsul.XsulException
Get an XmlNode representation of whatever is at the given path.

Parameters:
path - The path from which to extract an XmlNode.
Returns:
An XmlNode representation for the given path.
Throws:
soaprmi.RemoteException - If the given path does not exist, or there is a problem generating the XmlNode.
xsul.XsulException

getChildrenWithoutHtml

public org.gjt.xpp.XmlNode[] getChildrenWithoutHtml(java.lang.String pathToDirNode)
                                             throws soaprmi.RemoteException,
                                                    xsul.XsulException
Get list of XML nodes that are contained inside directory. Returned nodes does not contain HTML.

Returns:
List of XmlNode representations for children of this directory. If directory has no children
Throws:
soaprmi.RemoteException - If the given path does not exist, node identified by path is not direcotry.
xsul.XsulException

getNodeHtml

public java.lang.String getNodeHtml(java.lang.String path)
                             throws soaprmi.RemoteException,
                                    xsul.XsulException
Get an XmlNode representation for the given path's html.

Parameters:
path - The path whose html will be returned.
Returns:
An XmlNode representation for the given path's html.
Throws:
soaprmi.RemoteException - If the given path does not exist, there is a problem generating the XmlNode, or the node associated with the given path does not have html.
xsul.XsulException

deleteNodes

public void deleteNodes(java.lang.String dirPath,
                        java.lang.String[] childrenNames)
                 throws soaprmi.RemoteException,
                        xsul.XsulException
Delete children nodes that are continaed in directory identified by path.

Parameters:
dirPath - The path to the direcotry node
childrenNames - list of children nodes to delete.
Throws:
soaprmi.RemoteException - If the given path does not exist, there is a problem deleting the node, or if there is an attempt to delete the ROOT.
xsul.XsulException

addNode

public void addNode(java.lang.String path,
                    org.gjt.xpp.XmlNode node)
             throws soaprmi.RemoteException,
                    xsul.XsulException
Add the given node as a child of the node associated with the given path. Due to the fact that nodes can only be added to existing paths, a default, root, path always exists and can be accessed through the ROOT class variable.

Parameters:
path - The proposed parent for the given node.
node - The node that will be added.
Throws:
soaprmi.RemoteException - If the given path does not exist, the given path plus the given node's name already exists, the given node is not of a supported type, or the given path points to a node that cannot have children.
xsul.XsulException

modifyNode

public void modifyNode(java.lang.String path,
                       org.gjt.xpp.XmlNode node)
                throws soaprmi.RemoteException,
                       xsul.XsulException
Update the values of a node, pointed to by the given path, with those in the given node.

Parameters:
path - The path to the node to be modified.
node - A node containing new values for specific fields.
Throws:
soaprmi.RemoteException - If the given path does not exist, the type of the given node's type does not match the type of the node associated with the given path, or the given node tries to change the name of the node associated with the given path.
xsul.XsulException

copyNodes

public void copyNodes(java.lang.String[] sourcePaths,
                      java.lang.String targetPath)
               throws soaprmi.RemoteException,
                      xsul.XsulException
Copy a set of nodes from one location to another. The sourcePaths can be any type of nodes. If targetPath exists and is a directory node then the nodes associated with the sourcePaths are copied into the targetPath, as children. NOTE: In the future it would be nice to rename things as they are copied.

Parameters:
sourcePaths - The paths to the nodes to be copied.
Throws:
soaprmi.RemoteException - If the given sourcePaths do not exist, or the targetPath exists and is not a directory.
xsul.XsulException

moveNodes

public void moveNodes(java.lang.String[] sourcePaths,
                      java.lang.String targetPath)
               throws soaprmi.RemoteException,
                      xsul.XsulException
Move a set of nodes from one location to another. The sourcePaths can be any type of nodes. If targetPath exists and is a directory node then the nodes associated with the sourcePaths are moved into the targetPath, as children. NOTE: In the future it would be nice to rename things as they are moved.

Parameters:
sourcePaths - The paths to the nodes to be moved.
Throws:
soaprmi.RemoteException - If the given sourcePaths do not exist, or the targetPath exists and is not a directory.
xsul.XsulException

keywordSearch

public java.lang.String[] keywordSearch(java.lang.String[] keywords,
                                        boolean doAnd,
                                        int maxResults)
                                 throws soaprmi.RemoteException,
                                        xsul.XsulException
Search using keywords to find nodes.

Parameters:
keywords - The keywords for which to search.
doAnd - Whether to AND the keywrods together or not.
maxResults - The max number of results to return.
Returns:
An array of paths that can be given to getNode().
Throws:
soaprmi.RemoteException
xsul.XsulException