|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RepositoryService
The RepositoryService is the entry point to the content of SDD. It mostly deals with Node
objects. These can be one of two types: RemoteNode
and NodeBean
. A
RemoteNode
is constructed by the service when information about a Node is retrieved from the server. This
type of Node is immutable. A NodeBean
is constructed on the client by the consumer
of the API. It is used to describe a server-side Node that you would like to update or create.
One common practice is to construct the NodeBean using a RemoteNode using
FileBean.FileBean(RemoteFile)
or ContainerBean.ContainerBean(RemoteContainer)
. This is useful, for instance, when you
have gotten a List of RemoteNode objects using getChildren(Container)
and would like to
update the properties on one of the children.
When a NodeBean is passed into a method, the Node is looked up by the path if the path is defined
in the NodeBean, then by the id if the path isn't specified in the bean.
Method Summary | |
---|---|
RemoteFile |
checkinFile(File file)
Check in the file described by the given File. |
RemoteFile |
checkinFile(File file,
java.lang.String comment)
Check in the file described by the given File. |
RemoteFile |
checkoutFile(File file)
Checkout the file described by the given File. |
RemoteNode |
copyNode(Node srcNode,
Node destNode)
Copy the node described by srcNode to destNode. |
RemoteContainer |
createContainer(ContainerBean containerBean)
Create the container described by the given ContainerBean. |
RemoteFile |
createFile(FileBean fileBean)
Create the file described by the given FileBean. |
void |
deleteNode(Node node)
Delete the node described by the given Node. |
RemoteFile |
enableVersioning(File file)
Enable versioning on the file described by the given File. |
AccessControlList |
getAccessControlList(Node node)
Get the AccessControlList of the given node |
java.util.List |
getChildren(Container container)
Get the children of the container described by the given Container. |
RemoteContainer |
getContainer(ContainerBean container)
Get the Container described by the given ContainerBean. |
void |
getContents(File file,
java.io.OutputStream stream)
Get the contents of the file described by the given file, including the version specified in file. |
RemoteFile |
getFile(FileBean file)
Get the File described by the given FileBean. |
RemoteNode |
getNode(NodeBean node)
Get the RemoteNode specified by the given NodeBean. |
RemoteNode |
moveNode(Node srcNode,
Node destNode)
Move the node described by srcNode to destNode. |
boolean |
nodeExists(NodeBean node)
Test whether the node described by the given NodeBean exists. |
RemoteNode |
renameNode(Node srcNode,
java.lang.String newName)
Rename the node desribed by srcNode to the newName. |
RemoteContainer |
setDefaultContainerVersioning(Container container,
ContainerDepth depth,
boolean onOff)
Turn on default versioning for the specified container, to the given depth. |
RemoteContainer |
setOwnerOnContainer(Container container,
ContainerDepth depth,
java.lang.String userid)
Set the owner of the given container to the given userid. |
RemoteFile |
setOwnerOnFile(File file,
java.lang.String userid)
Set the owner of the given file to the given userid. |
RemoteFile |
undoCheckout(File file)
Undo the check out of the file described by the given File. |
void |
updateContainerAccessControlList(AccessControlList acl,
AclRecurseBehavior recurseBehavior)
Apply the changes that have been made on the given AccessControlList on the server side. |
void |
updateFileAccessControlList(AccessControlList acl)
Apply the changes that have been made on the given AccessControlList on the server side. |
RemoteNode |
updateNode(NodeBean nodeBean)
Apply the changes that have been made on the given Node on the server side. |
Method Detail |
---|
RemoteNode getNode(NodeBean node) throws RemoteException, InvalidSessionException
RemoteNode
specified by the given NodeBean. The Node is looked up by
the id if the id is defined in the NodeBean, then by the path if the id isn't specified in
the bean.
node
-
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedboolean nodeExists(NodeBean node) throws RemoteException, InvalidSessionException
node
-
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteFile getFile(FileBean file) throws InvalidVersionException, InvalidTypeException, RemoteException, InvalidSessionException
File
described by the given FileBean. The file is looked up by
the id if the id is defined in the FileBean, then by the path if the id isn't specified in
the bean. getContents(File, OutputStream)
.
file
-
InvalidVersionException
- if the file exists, but the version doesn't
InvalidTypeException
- if the path is a container
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteContainer getContainer(ContainerBean container) throws InvalidTypeException, RemoteException, InvalidSessionException
Container
described by the given ContainerBean. The container is looked up by
the id if the id is defined in the ContainerBean, then by the path if the id isn't specified in
the bean.
container
-
InvalidTypeException
- if the node pointed to by the container bean is a file
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedjava.util.List getChildren(Container container) throws InvalidTypeException, InvalidNodeException, RemoteException, InvalidSessionException
container
- this can be either a ContainerBean
or a RemoteContainer
RemoteNode
objects
InvalidTypeException
- if the node at described by the container is a file
InvalidNodeException
- if container doesn't exist
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteNode moveNode(Node srcNode, Node destNode) throws InvalidNodeException, PermissionException, ContainmentException, NodeModifiedException, ValidationException, RemoteException, InvalidSessionException
srcNode
- Node describing the sourcedestNode
- Node describing the destination
InvalidNodeException
- srcNode doesn't exist, parent path at destination doesn't exist,
destination node already exists and is a file
PermissionException
- if the user doesn't have necessary permissions
ContainmentException
- if destination can't contain the type of the source
NodeModifiedException
- if either src or dest are RemoteNode objects and have been
modified since they have been retrieved
ValidationException
- if name of destination doesn't validate
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteNode renameNode(Node srcNode, java.lang.String newName) throws InvalidNodeException, PermissionException, NodeModifiedException, ValidationException, RemoteException, InvalidSessionException
srcNode
- newName
- new name of the source node, this doesn't include a path.
InvalidNodeException
- if node already exists with the new name or srcNode doesn't
exist
PermissionException
- if the user doesn't have necessary permissions
NodeModifiedException
- if src is a RemoteNode and has been
modified since they have been retrieved
ValidationException
- if name of destination doesn't validate
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteNode copyNode(Node srcNode, Node destNode) throws InvalidNodeException, PermissionException, ContainmentException, NodeModifiedException, ValidationException, RemoteException, InvalidSessionException
srcNode
- Node describing the sourcedestNode
- Node describing the destination
InvalidNodeException
- srcNode doesn't exist, parent path at destination doesn't exist,
destination node already exists and is a file
PermissionException
- if the user doesn't have necessary permissions
ContainmentException
- if destination can't contain the type of the source
NodeModifiedException
- if either src or dest are RemoteNode objects and have been
modified since they have been retrieved
ValidationException
- if name of destination doesn't validate
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteFile checkoutFile(File file) throws InvalidNodeException, PermissionException, java.lang.IllegalStateException, InvalidTypeException, RemoteException, InvalidSessionException
file
-
InvalidNodeException
- if file at specified path doesn't exist
PermissionException
- if user doesn't have permissions
java.lang.IllegalStateException
- file is already checked out by another user or file isn't
versioned
InvalidTypeException
- if file is a container
RemoteException
- if an error occurs in the transport
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteFile checkinFile(File file) throws InvalidNodeException, InvalidTypeException, java.lang.IllegalStateException, RemoteException, InvalidSessionException
file
-
InvalidNodeException
- if file doesn't exist
InvalidTypeException
- if file is a container
java.lang.IllegalStateException
- if isn't checked out or is checked out by another user
RemoteException
- if an error occurs in the transport
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteFile checkinFile(File file, java.lang.String comment) throws InvalidNodeException, InvalidTypeException, java.lang.IllegalStateException, RemoteException, InvalidSessionException
file
- comment
- comment to be associated with the new version of this file
InvalidNodeException
- if file doesn't exist
InvalidTypeException
- if file is a container
java.lang.IllegalStateException
- if isn't checked out or is checked out by another user
RemoteException
- if an error occurs in the transport
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteFile undoCheckout(File file) throws InvalidNodeException, InvalidTypeException, java.lang.IllegalStateException, RemoteException, InvalidSessionException
file
-
InvalidNodeException
- if file doesn't exist
InvalidTypeException
- if file is a container
java.lang.IllegalStateException
- if file isn't checked out
RemoteException
- if an error occurs in the transport
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteFile enableVersioning(File file) throws InvalidTypeException, PermissionException, InvalidNodeException, RemoteException, InvalidSessionException
file
-
InvalidTypeException
- if the file is a container
PermissionException
- if user doesn't have permissions
InvalidNodeException
- if file doesn't exist
RemoteException
- if an error occurs in the transport
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteNode updateNode(NodeBean nodeBean) throws InvalidNodeException, InvalidNodeBeanException, InvalidTypeException, NodeModifiedException, ValidationException, PermissionException, RemoteException, InvalidSessionException
nodeBean
-
InvalidNodeException
- node doesn't exist
InvalidNodeBeanException
- NodeBean is a FileBean whose contents have been set to a
local file that doesn't exist
InvalidTypeException
- if NodeBean is a ContainerBean and points to a file or vice versa
NodeModifiedException
- if the NodeBean was constructed with a RemoteNode and the
node has been modified since it was retrieved
ValidationException
- if any properties set on the node fail validation
PermissionException
- if user doesn't have required permissions
RemoteException
- if an error occurs in the transport
InvalidSessionException
- if the current session is expired or has been invalidatedvoid getContents(File file, java.io.OutputStream stream) throws InvalidNodeException, InvalidTypeException, java.io.IOException, RemoteException, InvalidSessionException
file
- stream
- stream to write the contents to
InvalidNodeException
- if file doesn't exist
InvalidTypeException
- if node is a container
java.io.IOException
- if an error occurs writing to the OutputStream
RemoteException
- if an error occurs in the transport
InvalidSessionException
- if the current session is expired or has been invalidatedvoid deleteNode(Node node) throws InvalidNodeException, PermissionException, RemoteException, InvalidSessionException
node
-
InvalidNodeException
- node doesn't exist
PermissionException
- user doesn't have permission to delete
InvalidSessionException
- if the current session is expired or has been invalidated
RemoteException
- if a server or transport error occursRemoteContainer createContainer(ContainerBean containerBean) throws PermissionException, InvalidNodeException, InvalidNodeBeanException, InvalidTypeException, ValidationException, ContainmentException, RemoteException, InvalidSessionException
containerBean
-
PermissionException
- user doesn't have permission
InvalidNodeException
- parent path doesn't exist, object already exists at the
given path, or parent path is a file
InvalidNodeBeanException
- ContainerBean doesn't have enough information to create
the Container or a NodeId is specified in the ContainerBean
InvalidTypeException
- if the type passed in doesn't exist or is a file type
ValidationException
- if the properties specified don't validate
ContainmentException
- if the type can't live here
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteFile createFile(FileBean fileBean) throws PermissionException, InvalidNodeException, InvalidNodeBeanException, InvalidTypeException, ValidationException, ContainmentException, RemoteException, InvalidSessionException
fileBean
-
PermissionException
- user doesn't have permission
InvalidNodeException
- parent path doesn't exist, object already exists at the
given path, or parent path is a file
InvalidNodeBeanException
- FileBean doesn't have enough information to create
the File or an NodeId or version is specified in the FileBean, or if java.io.File set
as the contents doesn't exist
InvalidTypeException
- if the type passed in doesn't exist or is a container type
ValidationException
- if the properties specified don't validate
ContainmentException
- if the type can't live here
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedAccessControlList getAccessControlList(Node node) throws InvalidNodeException, PermissionException, RemoteException, InvalidSessionException
AccessControlList
of the given node
node
-
InvalidNodeException
- node doesn't exist
PermissionException
- user doesn't have permissions
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedvoid updateFileAccessControlList(AccessControlList acl) throws InvalidNodeException, InvalidTypeException, java.lang.IllegalArgumentException, NodeModifiedException, PermissionException, RemoteException, InvalidSessionException
acl
-
InvalidNodeException
- path doesn't exist or node has been deleted
InvalidTypeException
- if the AccessControlEntry passes in points to a Container
java.lang.IllegalArgumentException
- if recurse isn't valid or a userid or groupname specified
in a new AccessControlEntry doesn't exist
NodeModifiedException
- object associated with this acl has been modified since the
ACL was retrieved
PermissionException
- user doesn't have permission
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedvoid updateContainerAccessControlList(AccessControlList acl, AclRecurseBehavior recurseBehavior) throws InvalidNodeException, InvalidTypeException, java.lang.IllegalArgumentException, NodeModifiedException, PermissionException, RemoteException, InvalidSessionException
acl
- recurseBehavior
-
InvalidNodeException
- path doesn't exist or node has been deleted
InvalidTypeException
- if the AccessControlEntry passes in points to a Container
java.lang.IllegalArgumentException
- if a userid or groupname specified
in a new AccessControlEntry doesn't exist
NodeModifiedException
- object associated with this acl has been modified since the
ACL was retrieved
PermissionException
- user doesn't have permission
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteFile setOwnerOnFile(File file, java.lang.String userid) throws InvalidNodeException, InvalidTypeException, java.lang.IllegalArgumentException, PermissionException, RemoteException, InvalidSessionException
file
- userid
-
InvalidNodeException
- file doesn't exist
InvalidTypeException
- path is a container
java.lang.IllegalArgumentException
- userid doesn't exist
PermissionException
- current user doesn't have required privileges
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteContainer setOwnerOnContainer(Container container, ContainerDepth depth, java.lang.String userid) throws InvalidNodeException, InvalidTypeException, java.lang.IllegalArgumentException, PermissionException, RemoteException, InvalidSessionException
container
- depth
- ContainerDepth.DEPTH_ZERO
, ContainerDepth.DEPTH_ONE
,
ContainerDepth.DEPTH_INFINITE
userid
-
InvalidNodeException
- container doesn't exist
InvalidTypeException
- path is a file
java.lang.IllegalArgumentException
- userid doesn't exist
PermissionException
- current user doesn't have required permissions
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidatedRemoteContainer setDefaultContainerVersioning(Container container, ContainerDepth depth, boolean onOff) throws InvalidNodeException, InvalidTypeException, java.lang.IllegalArgumentException, PermissionException, RemoteException, InvalidSessionException
container
- depth
- ContainerDepth.DEPTH_ZERO
or ContainerDepth.DEPTH_INFINITE
,
ContainerDepth.DEPTH_ONE
is not supported. Versioning on a container can only be set for the folder
(DEPTH_ZERO) or all subfolders (DEPTH_INFINITE)onOff
-
InvalidNodeException
- container doesn't exist
InvalidTypeException
- path is a file
java.lang.IllegalArgumentException
- userid doesn't exist or the depth isn't valid
PermissionException
- current user doesn't have required permissions
RemoteException
- if a server or transport error occurs
InvalidSessionException
- if the current session is expired or has been invalidated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |