|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.slide.structure.StructureImpl
Default implementation of the Structure interface.
Constructor Summary | |
StructureImpl(Namespace namespace,
NamespaceConfig namespaceConfig,
Security securityHelper,
Lock lockHelper)
Constructor. |
Method Summary | |
void |
addBinding(SlideToken token,
ObjectNode collectionNode,
java.lang.String segment,
ObjectNode sourceNode)
Modifies the collection identified by collectionNode, by adding a new binding from the specified segment to the resource identified by sourceNode. |
void |
create(SlideToken token,
ObjectNode object,
java.lang.String strUri)
Creates a new node in the namespace. |
void |
createLink(SlideToken token,
LinkNode link,
java.lang.String linkUri,
ObjectNode linkedObject)
Creates a link to another node in the namespace. |
java.lang.String |
generateUniqueUri(SlideToken token,
java.lang.String parentUri)
Generates an URI that is guranteed to be unqiue globally. |
java.util.Enumeration |
getChildren(SlideToken token,
ObjectNode object)
Returns the children of a node. |
ObjectNode |
getParent(SlideToken token,
ObjectNode object)
Returns the parent of a node. |
java.util.List |
getParents(SlideToken token,
ObjectNode object,
boolean pathOnly,
boolean storeOnly,
boolean includeSelf)
Return all parents of this object node. |
void |
remove(SlideToken token,
ObjectNode object)
Method remove |
void |
removeBinding(SlideToken token,
ObjectNode collectionNode,
java.lang.String segment)
Modifies the collection identified by collectionNode, by removing the binding for the specified segment. |
ObjectNode |
retrieve(SlideToken token,
java.lang.String strUri)
Retrieves a node by URI, following any links. |
ObjectNode |
retrieve(SlideToken token,
java.lang.String strUri,
boolean translateLastUriElement)
Retrieves a node by URI. |
void |
store(SlideToken token,
ObjectNode object)
Stores/updates an object. |
protected void |
store(SlideToken token,
ObjectNode object,
boolean setModificationDate)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StructureImpl(Namespace namespace, NamespaceConfig namespaceConfig, Security securityHelper, Lock lockHelper)
namespace
- the namespace associated with the helper objectnamespaceConfig
- configuration of the namespacesecurityHelper
- the associated security helperlockHelper
- the associated lock helperMethod Detail |
public java.lang.String generateUniqueUri(SlideToken token, java.lang.String parentUri) throws ServiceAccessException
Structure
null
will be returned.
generateUniqueUri
in interface Structure
token
- the slide tokenparentUri
- the parent of the unique URI that shall be created
null
if not possible
ServiceAccessException
- low level service access exceptionpublic java.util.Enumeration getChildren(SlideToken token, ObjectNode object) throws ServiceAccessException, ObjectNotFoundException, LinkedObjectNotFoundException, VetoException
Structure
getChildren
in interface Structure
token
- the slide tokenobject
- the node
ServiceAccessException
- low level service access exception
ObjectNotFoundException
- one of the children specified
by the object was not found
LinkedObjectNotFoundException
- cannot happen
VetoException
ObjectNode.enumerateChildren()
public ObjectNode getParent(SlideToken token, ObjectNode object) throws ServiceAccessException, ObjectNotFoundException, LinkedObjectNotFoundException, AccessDeniedException, VetoException
Structure
getParent
in interface Structure
token
- the slide tokenobject
- the node
null
if the object specified
is the root node of the namespace
AccessDeniedException
- credentials token does not
have permission to perform the action
ObjectNotFoundException
- the parent object specified
by the object was not found
ServiceAccessException
- low level service access exception
LinkedObjectNotFoundException
- cannot happen (a link
cannot have children)
VetoException
ObjectNode.enumerateChildren()
public ObjectNode retrieve(SlideToken token, java.lang.String strUri) throws ServiceAccessException, ObjectNotFoundException, LinkedObjectNotFoundException, AccessDeniedException, VetoException
Structure
retrieve
in interface Structure
token
- the slide tokenstrUri
- the URI of the object to retrieve
ObjectNotFoundException
- if no node exists at the URI
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
ServiceAccessException
- low level service access exception
VetoException
public ObjectNode retrieve(SlideToken token, java.lang.String strUri, boolean translateLastUriElement) throws ServiceAccessException, ObjectNotFoundException, LinkedObjectNotFoundException, AccessDeniedException, VetoException
Structure
retrieve
in interface Structure
token
- the slide tokenstrUri
- the URI of the object to retrievetranslateLastUriElement
- if set to true and the URI is
associated with a link, this method will return the target of
the link, otherwise the link itself is returned
translateLastUriElement
is true
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
ObjectNotFoundException
- if no node exists at the URI
ServiceAccessException
- low level service access exception
VetoException
public void create(SlideToken token, ObjectNode object, java.lang.String strUri) throws ServiceAccessException, ObjectAlreadyExistsException, ObjectNotFoundException, LinkedObjectNotFoundException, AccessDeniedException, ObjectLockedException, VetoException
Structure
create
in interface Structure
token
- the slide tokenobject
- the object that should be createdstrUri
- location in the namespace where we the object should be
created
ServiceAccessException
- low level service access exception
ObjectNotFoundException
- Update of the parent object
failed because the parent object does no longer exist.
Should not happen, and indicates a critical error if it does
LinkedObjectNotFoundException
- retrieval of a link target
failed during URI resolution
AccessDeniedException
- credentials token does not have
permission to perform the action
ObjectAlreadyExistsException
ObjectLockedException
VetoException
public void createLink(SlideToken token, LinkNode link, java.lang.String linkUri, ObjectNode linkedObject) throws ServiceAccessException, ObjectAlreadyExistsException, ObjectNotFoundException, LinkedObjectNotFoundException, AccessDeniedException, ObjectLockedException, VetoException
Structure
createLink
in interface Structure
token
- the slide tokenlink
- the link object that should be createdlinkUri
- location in the namespace where the link object should
be createdlinkedObject
- target object of the link
AccessDeniedException
- credentials token does not have
permission to perform the action
LinkedObjectNotFoundException
- Retrieval of a link target
failed during Uri resolution
ObjectNotFoundException
- Update of the parent object
failed because the parent object does no longer exist.
Should not happen, and indicate a critical error if it does
ServiceAccessException
- Low level service access exception
ObjectAlreadyExistsException
ObjectLockedException
VetoException
public void store(SlideToken token, ObjectNode object) throws ServiceAccessException, ObjectNotFoundException, AccessDeniedException, LinkedObjectNotFoundException, VetoException
Structure
store
in interface Structure
token
- the slide tokenobject
- the object to update
AccessDeniedException
- credentials token does not have
permission to perform the action
LinkedObjectNotFoundException
- retrieval of a link target
failed during URI resolution
ObjectNotFoundException
- the update failed because one
object was not found during URI resolution
ServiceAccessException
- low level service access exception
VetoException
protected void store(SlideToken token, ObjectNode object, boolean setModificationDate) throws ServiceAccessException, ObjectNotFoundException, AccessDeniedException, LinkedObjectNotFoundException, VetoException
ServiceAccessException
ObjectNotFoundException
AccessDeniedException
LinkedObjectNotFoundException
VetoException
public void remove(SlideToken token, ObjectNode object) throws ServiceAccessException, ObjectNotFoundException, ObjectHasChildrenException, AccessDeniedException, LinkedObjectNotFoundException, ObjectLockedException, VetoException
remove
in interface Structure
token
- a SlideTokenobject
- an ObjectNode
ServiceAccessException
ObjectNotFoundException
ObjectHasChildrenException
AccessDeniedException
LinkedObjectNotFoundException
ObjectLockedException
VetoException
public void addBinding(SlideToken token, ObjectNode collectionNode, java.lang.String segment, ObjectNode sourceNode) throws ServiceAccessException, ObjectNotFoundException, AccessDeniedException, LinkedObjectNotFoundException, ObjectLockedException, CrossServerBindingException, VetoException
addBinding
in interface Structure
token
- a SlideTokencollectionNode
- an ObjectNodesegment
- a StringsourceNode
- an ObjectNode
ServiceAccessException
ObjectNotFoundException
AccessDeniedException
LinkedObjectNotFoundException
ObjectLockedException
CrossServerBindingException
VetoException
public void removeBinding(SlideToken token, ObjectNode collectionNode, java.lang.String segment) throws ServiceAccessException, ObjectNotFoundException, AccessDeniedException, LinkedObjectNotFoundException, ObjectLockedException, VetoException
removeBinding
in interface Structure
token
- a SlideTokencollectionNode
- an ObjectNodesegment
- a String
ServiceAccessException
ObjectNotFoundException
AccessDeniedException
LinkedObjectNotFoundException
ObjectLockedException
VetoException
public java.util.List getParents(SlideToken token, ObjectNode object, boolean pathOnly, boolean storeOnly, boolean includeSelf) throws ServiceAccessException, ObjectNotFoundException, LinkedObjectNotFoundException, AccessDeniedException, VetoException
getParents
in interface Structure
token
- a SlideTokenobject
- an ObjectNodepathOnly
- if true, only parents on the path of the specified
ObjectNode are returned, all parents (binding!)
otherwisestoreOnly
- if true, only parents within the scope of the store
in charge of the specified ObjectNode are returned,
parents up to the root ObjectNode (uri="/") otherwiseincludeSelf
- if true, the ObjectNode specified by object is included,
otherwise, it is excluded
ServiceAccessException
ObjectNotFoundException
LinkedObjectNotFoundException
AccessDeniedException
VetoException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |