org.apache.slide.structure
Interface Structure

All Known Implementing Classes:
StructureImpl

public interface Structure

Structure helper.

Version:
$Revision: 1.5 $
Author:
Remy Maucherat

Method Summary
 void create(SlideToken token, ObjectNode object, java.lang.String strUri)
          Create an object.
 void createLink(SlideToken token, LinkNode link, java.lang.String linkUri, ObjectNode linkedObject)
          Create a link.
 java.util.Enumeration getChildren(SlideToken token, ObjectNode object)
          Get object's children.
 ObjectNode getParent(SlideToken token, ObjectNode object)
          Get object's parent.
 void remove(SlideToken token, ObjectNode object)
          Remove an object.
 ObjectNode retrieve(SlideToken token, java.lang.String strUri)
          Get an object, following any link.
 ObjectNode retrieve(SlideToken token, java.lang.String strUri, boolean translateLastUriElement)
          Get an object, following any link.
 void store(SlideToken token, ObjectNode object)
          Store (ie, update) an object.
 

Method Detail

getChildren

public java.util.Enumeration getChildren(SlideToken token,
                                         ObjectNode object)
                                  throws ServiceAccessException,
                                         ObjectNotFoundException,
                                         LinkedObjectNotFoundException
Get object's children.
Parameters:
token - Credentials token
object - Slide object
Returns:
Enumeration Enumeration of children objects
Throws:
ServiceAccessException - Low level service access exception
ObjectNotFoundException - One of the children specified by the object were not found
LinkedObjectNotFoundException - Cannot happen

getParent

public ObjectNode getParent(SlideToken token,
                            ObjectNode object)
                     throws ServiceAccessException,
                            ObjectNotFoundException,
                            LinkedObjectNotFoundException,
                            AccessDeniedException
Get object's parent.
Parameters:
token - Credentials token
object - Slide object
Returns:
ObjectNode Object's parent
Throws:
ServiceAccessException - Low level service access exception
ObjectNotFoundException - The parent object specified by the object was not found
LinkedObjectNotFoundException - Cannot happen : a link cannot have children
AccessDeniedException - Credentials token does not have permission to perform the action

retrieve

public ObjectNode retrieve(SlideToken token,
                           java.lang.String strUri)
                    throws ServiceAccessException,
                           ObjectNotFoundException,
                           LinkedObjectNotFoundException,
                           AccessDeniedException
Get an object, following any link.
Parameters:
token - Credentials token
strUri - Object uri
Returns:
ObjectNode Object specified by the Uri
Throws:
ServiceAccessException - Low level service access exception
ObjectNotFoundException - The given Uri doesn't have any matching ObjectNode
LinkedObjectNotFoundException - A link object encountered during Uri resolution doesn't have a valid target
AccessDeniedException - Credentials token does not have permission to perform the action

retrieve

public ObjectNode retrieve(SlideToken token,
                           java.lang.String strUri,
                           boolean translateLastUriElement)
                    throws ServiceAccessException,
                           ObjectNotFoundException,
                           LinkedObjectNotFoundException,
                           AccessDeniedException
Get an object, following any link.
Parameters:
token - Credentials token
strUri - Object uri
translateLastUriElement - If set to true and if the uri is associated with a link, the function will return the linked object. Otherwise, the link object is returned
Throws:
ServiceAccessException - Low level service access exception
ObjectNotFoundException - The given Uri doesn't have any matching ObjectNode
LinkedObjectNotFoundException - A link object encountered during Uri resolution doesn't have a valid target
AccessDeniedException - Credentials token does not have permission to perform the action

create

public void create(SlideToken token,
                   ObjectNode object,
                   java.lang.String strUri)
            throws ServiceAccessException,
                   ObjectAlreadyExistsException,
                   ObjectNotFoundException,
                   LinkedObjectNotFoundException,
                   AccessDeniedException
Create an object.
Parameters:
token - Credentials token
object - Object we want to create
uri - Location in the namespace where we want to create the object
Throws:
ServiceAccessException - Low level service access exception
ObjectAlreadyExistException - An object already exist at the specified Uri
ObjectNotFoundException - Update of the parent object failed because the parent object does no longer exist. Should not happen, and indicate a critical error
LinkedObjectNotFoundException - Retrieval of a link target failed during Uri resolution
AccessDeniedException - Credentials token does not have permission to perform the action

createLink

public void createLink(SlideToken token,
                       LinkNode link,
                       java.lang.String linkUri,
                       ObjectNode linkedObject)
                throws ServiceAccessException,
                       ObjectAlreadyExistsException,
                       ObjectNotFoundException,
                       LinkedObjectNotFoundException,
                       AccessDeniedException
Create a link.
Parameters:
token - Credentials token
link - Link object we want to create
linkUri - Location in the namespace where we want to create the object
linkedObject - Link target
Throws:
ServiceAccessException - Low level service access exception
ObjectAlreadyExistException - An object already exist at the specified Uri
ObjectNotFoundException - Update of the parent object failed because the parent object does no longer exist. Should not happen, and indicate a critical error
LinkedObjectNotFoundException - Retrieval of a link target failed during Uri resolution
AccessDeniedException - Credentials token does not have permission to perform the action

store

public void store(SlideToken token,
                  ObjectNode object)
           throws ServiceAccessException,
                  ObjectNotFoundException,
                  AccessDeniedException,
                  LinkedObjectNotFoundException
Store (ie, update) an object.
Parameters:
token - Credentials token
object - Object to update
Throws:
ServiceAccessException - Low level service access exception
ObjectNotFoundException - The update failed because one object was not found during Uri resolution
LinkedObjectNotFoundException - Retrieval of a link target failed during Uri resolution
AccessDeniedException - Credentials token does not have permission to perform the action

remove

public void remove(SlideToken token,
                   ObjectNode object)
            throws ServiceAccessException,
                   ObjectNotFoundException,
                   ObjectHasChildrenException,
                   AccessDeniedException,
                   LinkedObjectNotFoundException
Remove an object.
Parameters:
token - Credentials token
object - Slide object to remove
Throws:
ServiceAccessException - Low level service access exception
ObjectNotFoundException - The update failed because one object was not found during Uri resolution
ObjectHasChildrenException - Removal failed because object has children
LinkedObjectNotFoundException - Retrieval of a link target failed during Uri resolution
AccessDeniedException - Credentials token does not have permission to perform the action