Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.slide.structure
Class StructureImpl  view StructureImpl download StructureImpl.java

java.lang.Object
  extended byorg.apache.slide.structure.StructureImpl
All Implemented Interfaces:
Structure

public final class StructureImpl
extends java.lang.Object
implements Structure

Default implementation of the Structure interface.

Version:
$Revision: 1.49.2.3 $

Field Summary
private  org.apache.slide.lock.Lock lockHelper
          Lock helper.
private  org.apache.slide.common.Namespace namespace
          Namespace.
private  org.apache.slide.common.NamespaceConfig namespaceConfig
          Namespace configuration.
private  org.apache.slide.security.Security securityHelper
          Security helper.
 
Constructor Summary
StructureImpl(org.apache.slide.common.Namespace namespace, org.apache.slide.common.NamespaceConfig namespaceConfig, org.apache.slide.security.Security securityHelper, org.apache.slide.lock.Lock lockHelper)
          Constructor.
 
Method Summary
 void addBinding(org.apache.slide.common.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(org.apache.slide.common.SlideToken token, ObjectNode object, java.lang.String strUri)
          Creates a new node in the namespace.
 void createLink(org.apache.slide.common.SlideToken token, LinkNode link, java.lang.String linkUri, ObjectNode linkedObject)
          Creates a link to another node in the namespace.
 java.lang.String generateUniqueUri(org.apache.slide.common.SlideToken token, java.lang.String parentUri)
          Generates an URI that is guranteed to be unqiue globally.
 java.util.Enumeration getChildren(org.apache.slide.common.SlideToken token, ObjectNode object)
          Returns the children of a node.
 ObjectNode getParent(org.apache.slide.common.SlideToken token, ObjectNode object)
          Returns the parent of a node.
 java.util.List getParents(org.apache.slide.common.SlideToken token, ObjectNode object, boolean pathOnly, boolean storeOnly, boolean includeSelf)
          Return all parents of this object node.
 void remove(org.apache.slide.common.SlideToken token, ObjectNode object)
          Method remove
 void removeBinding(org.apache.slide.common.SlideToken token, ObjectNode collectionNode, java.lang.String segment)
          Modifies the collection identified by collectionNode, by removing the binding for the specified segment.
 ObjectNode retrieve(org.apache.slide.common.SlideToken token, java.lang.String strUri)
          Retrieves a node by URI, following any links.
 ObjectNode retrieve(org.apache.slide.common.SlideToken token, java.lang.String strUri, boolean translateLastUriElement)
          Retrieves a node by URI.
 void store(org.apache.slide.common.SlideToken token, ObjectNode object)
          Stores/updates an object.
protected  void store(org.apache.slide.common.SlideToken token, ObjectNode object, boolean setModificationDate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

namespace

private org.apache.slide.common.Namespace namespace
Namespace.


namespaceConfig

private org.apache.slide.common.NamespaceConfig namespaceConfig
Namespace configuration.


securityHelper

private org.apache.slide.security.Security securityHelper
Security helper.


lockHelper

private org.apache.slide.lock.Lock lockHelper
Lock helper.

Constructor Detail

StructureImpl

public StructureImpl(org.apache.slide.common.Namespace namespace,
                     org.apache.slide.common.NamespaceConfig namespaceConfig,
                     org.apache.slide.security.Security securityHelper,
                     org.apache.slide.lock.Lock lockHelper)
Constructor.

Method Detail

generateUniqueUri

public java.lang.String generateUniqueUri(org.apache.slide.common.SlideToken token,
                                          java.lang.String parentUri)
                                   throws org.apache.slide.common.ServiceAccessException
Description copied from interface: Structure
Generates an URI that is guranteed to be unqiue globally. If this is not possible null will be returned.

Specified by:
generateUniqueUri in interface Structure

getChildren

public java.util.Enumeration getChildren(org.apache.slide.common.SlideToken token,
                                         ObjectNode object)
                                  throws org.apache.slide.common.ServiceAccessException,
                                         ObjectNotFoundException,
                                         LinkedObjectNotFoundException,
                                         org.apache.slide.event.VetoException
Description copied from interface: Structure
Returns the children of a node.

Specified by:
getChildren in interface Structure

getParent

public ObjectNode getParent(org.apache.slide.common.SlideToken token,
                            ObjectNode object)
                     throws org.apache.slide.common.ServiceAccessException,
                            ObjectNotFoundException,
                            LinkedObjectNotFoundException,
                            org.apache.slide.security.AccessDeniedException,
                            org.apache.slide.event.VetoException
Description copied from interface: Structure
Returns the parent of a node.

Specified by:
getParent in interface Structure

retrieve

public ObjectNode retrieve(org.apache.slide.common.SlideToken token,
                           java.lang.String strUri)
                    throws org.apache.slide.common.ServiceAccessException,
                           ObjectNotFoundException,
                           LinkedObjectNotFoundException,
                           org.apache.slide.security.AccessDeniedException,
                           org.apache.slide.event.VetoException
Description copied from interface: Structure
Retrieves a node by URI, following any links.

Specified by:
retrieve in interface Structure

retrieve

public ObjectNode retrieve(org.apache.slide.common.SlideToken token,
                           java.lang.String strUri,
                           boolean translateLastUriElement)
                    throws org.apache.slide.common.ServiceAccessException,
                           ObjectNotFoundException,
                           LinkedObjectNotFoundException,
                           org.apache.slide.security.AccessDeniedException,
                           org.apache.slide.event.VetoException
Description copied from interface: Structure
Retrieves a node by URI.

Specified by:
retrieve in interface Structure

create

public void create(org.apache.slide.common.SlideToken token,
                   ObjectNode object,
                   java.lang.String strUri)
            throws org.apache.slide.common.ServiceAccessException,
                   ObjectAlreadyExistsException,
                   ObjectNotFoundException,
                   LinkedObjectNotFoundException,
                   org.apache.slide.security.AccessDeniedException,
                   org.apache.slide.lock.ObjectLockedException,
                   org.apache.slide.event.VetoException
Description copied from interface: Structure
Creates a new node in the namespace.

Specified by:
create in interface Structure

createLink

public void createLink(org.apache.slide.common.SlideToken token,
                       LinkNode link,
                       java.lang.String linkUri,
                       ObjectNode linkedObject)
                throws org.apache.slide.common.ServiceAccessException,
                       ObjectAlreadyExistsException,
                       ObjectNotFoundException,
                       LinkedObjectNotFoundException,
                       org.apache.slide.security.AccessDeniedException,
                       org.apache.slide.lock.ObjectLockedException,
                       org.apache.slide.event.VetoException
Description copied from interface: Structure
Creates a link to another node in the namespace.

Specified by:
createLink in interface Structure

store

public void store(org.apache.slide.common.SlideToken token,
                  ObjectNode object)
           throws org.apache.slide.common.ServiceAccessException,
                  ObjectNotFoundException,
                  org.apache.slide.security.AccessDeniedException,
                  LinkedObjectNotFoundException,
                  org.apache.slide.event.VetoException
Description copied from interface: Structure
Stores/updates an object.

Specified by:
store in interface Structure

store

protected void store(org.apache.slide.common.SlideToken token,
                     ObjectNode object,
                     boolean setModificationDate)
              throws org.apache.slide.common.ServiceAccessException,
                     ObjectNotFoundException,
                     org.apache.slide.security.AccessDeniedException,
                     LinkedObjectNotFoundException,
                     org.apache.slide.event.VetoException

remove

public void remove(org.apache.slide.common.SlideToken token,
                   ObjectNode object)
            throws org.apache.slide.common.ServiceAccessException,
                   ObjectNotFoundException,
                   ObjectHasChildrenException,
                   org.apache.slide.security.AccessDeniedException,
                   LinkedObjectNotFoundException,
                   org.apache.slide.lock.ObjectLockedException,
                   org.apache.slide.event.VetoException
Method remove

Specified by:
remove in interface Structure

addBinding

public void addBinding(org.apache.slide.common.SlideToken token,
                       ObjectNode collectionNode,
                       java.lang.String segment,
                       ObjectNode sourceNode)
                throws org.apache.slide.common.ServiceAccessException,
                       ObjectNotFoundException,
                       org.apache.slide.security.AccessDeniedException,
                       LinkedObjectNotFoundException,
                       org.apache.slide.lock.ObjectLockedException,
                       CrossServerBindingException,
                       org.apache.slide.event.VetoException
Modifies the collection identified by collectionNode, by adding a new binding from the specified segment to the resource identified by sourceNode.

Specified by:
addBinding in interface Structure

removeBinding

public void removeBinding(org.apache.slide.common.SlideToken token,
                          ObjectNode collectionNode,
                          java.lang.String segment)
                   throws org.apache.slide.common.ServiceAccessException,
                          ObjectNotFoundException,
                          org.apache.slide.security.AccessDeniedException,
                          LinkedObjectNotFoundException,
                          org.apache.slide.lock.ObjectLockedException,
                          org.apache.slide.event.VetoException
Modifies the collection identified by collectionNode, by removing the binding for the specified segment.

Specified by:
removeBinding in interface Structure

getParents

public java.util.List getParents(org.apache.slide.common.SlideToken token,
                                 ObjectNode object,
                                 boolean pathOnly,
                                 boolean storeOnly,
                                 boolean includeSelf)
                          throws org.apache.slide.common.ServiceAccessException,
                                 ObjectNotFoundException,
                                 LinkedObjectNotFoundException,
                                 org.apache.slide.security.AccessDeniedException,
                                 org.apache.slide.event.VetoException
Return all parents of this object node. If pathOnly=true, only parents on the path of the specified ObjectNode are returned, all parents (binding!) otherwise. If storeOnly=true, only parents within the scope of the store in charge of the specified ObjectNode are returned, parents up to the root ObjectNode (uri="/") otherwise.

Specified by:
getParents in interface Structure