|
|||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
Container | Interface representing a Container object in SDD. |
File | Interface representing a file in SDD. |
Node | Interface representing an object in the SDD instance. |
RemoteContainer | Interface representing a container that lives in the server repository. |
RemoteFile | Interface representing a file that lives in the server repository. |
RemoteNode | Interface representing a node that lives in the server repository. |
RepositoryService | The RepositoryService is the entry point to the content of SDD. |
Class Summary | |
AclRecurseBehavior | Class representing the behavior of the
RepositoryService.updateContainerAccessControlList(AccessControlList, AclRecurseBehavior)
method. |
ContainerBean | Simple bean to represent a container. |
ContainerDepth | Simple class to obtain the container depth. |
FileBean | Simple bean to represent a file. |
FileVersion | Simple class representing a version of a File . |
NodeBean | Simple bean to represent a node. |
NodeId | Simple class representing an ID of an Node . |
Exception Summary | |
ContainmentException | A ContainmentException is thrown when a file or container is created within a container that can't contain that type of node because of the type containment rules. |
InvalidNodeBeanException | The InvalidNodeBeanException can be thrown when certain properties are left off of the
NodeBean that are needed to perform an operation. |
InvalidNodeException | The InvalidNodeException is thrown when an Node is passed into a RepositoryService
method, but the node doesn't exist. |
InvalidTypeException | The InvalidTypeException is thrown when a method call is expecting one type of Node, but receives another. |
InvalidVersionException | The InvalidVersionException is thrown when a FileBean is constructed pointing to a
version that doesn't exist, then passed to a RepositoryService method. |
NodeModifiedException | An NodeModifiedException is thrown when an node is attempted to be update, moved, or copied but has been modified since it was retrieved from the server. |
PermissionException | The PermissionException is thrown when a user attempts to perform a repository operation that they don't have permission to do, such as deleting a node. |
ValidationException | The ValidationException is thrown when a property is invalid for how it is defined in the type. |
Provides classes and interfaces for retrieving and writing content and metadata.
Use the RepositoryService
to access the content and metadata.
Node
vs NodeBean
vs RemoteNode
RepositoryService
work with a node object.
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. This is
useful, for instance, when you have gotten a list of RemoteNode objects using
RepositoryService.getChildren(Container)
and would like to
update the properties on one of the children.
// creating a container of type "folder"
ContainerBean createBean = new ContainerBean("/SDD/container1", new TypeBean("folder"));
createBean.setProperty("description", "This is a test container");
RemoteContainer container = repositoryService.createContainer(createBean);
// getting a file and it's contents to a local file
FileBean fileBean = new FileBean("/SDD/path/to/File.doc");
RemoteFile file = repositoryService.getFile(fileBean);
if (file != null) {
     repositoryService.getContents(file, new FileOutputStream("/some/local/File.doc");
}
// getting the contents of all versions of a file to local files
FileBean fileBean = new FileBean("/SDD/path/to/File.doc");
RemoteFile file = repositoryService.getFile(fileBean);
List versions = file.getVersions();
for (Iterator iter = versions.iterator(); iter.hasNext();) {
     FileVersion version = (FileVersion) iter.next();
     RemoteFile versionFile = repositoryService.getFile(file.getPath(), version);
     repositoryService.getContents(file, new FileOutputStream("/some/local/File_" + version + ".doc");
}
|
|||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |