com.adobe.repository.bindings
Interface ResourceRepository

All Known Subinterfaces:
ResourceRepositoryDelegate
All Known Implementing Classes:
ResourceRepositoryClient

public interface ResourceRepository

This interface is used for managing resources within the Repository.

Since:
8.0

Method Summary
 void copyResource(java.lang.String sourceResourcePath, java.lang.String targetResourceCollectionPath, short depth)
          Copies the resource at sourceResourcePath into the ResourceCollection at targetResourceCollectionPath.
 void createPendingRelationship(java.lang.String sourceResourceUri, java.lang.String targetResourcePath, int relationshipType)
          Creates a PendingRelation of type relationshipType between the source and target resources.
 void createRelationship(java.lang.String sourceResourceUri, java.lang.String targetResourceUri, int relationshipType, boolean trackHead)
          Creates a Relation of type relationshipType between the source and target resources.
 void deleteResource(java.lang.String resourceUri)
          Permanently removes the Resource identified by resourceUri from the repository.
 void deleteResources(java.lang.String[] resourceUris)
          Permanently removes the Resource objects identified by resourceUris from the repository.
 int getCount(java.lang.String resourceUri, int relationshipType, Query query, java.lang.String appFilterName)
          Retrieves a number of resources related to the resource identified by resourceUri by a relation of type relationshipType and which also match the supplied criteria found in the Query object.
 java.util.List getHistory(java.lang.String resourceUri)
          Retrieves all versions of the logical resource identified by the resourceUri.
 RepositoryImplementationType getImplementationType()
          Describes the backing Repository implementation.
 java.util.List getLocks(java.lang.String resourceUri)
          Retrieves a java.util.List containing all Lock objects on a specific resource identified by the given resourceUri.
 java.util.List getRelated(java.lang.String resourceUri, boolean isSource, int relationshipType)
          Retrieves a java.util.List containing all resources related to a specific resource by relation instances of type relationshipType.
 java.util.List getRelated(java.lang.String resourceUri, boolean isSource, int[] relationshipTypes)
          Retrieves a java.util.List containing all resources related to a specific resource by relation instances of types contained in relationshipTypes.
 java.util.List getRelated(java.lang.String resourceUri, boolean isSource, int[] relationshipTypes, boolean returnDeprecatedResources, boolean isHead)
          Retrieves a java.util.List containing all resources related to a specific resource by relation instances of types contained in relationshipTypes.
 java.util.List getRelated(java.lang.String resourceUri, boolean isSource, int relationshipType, boolean returnDeprecatedResources, boolean isHead)
          Retrieves a java.util.List containing all resources related to a specific resource by relation instances of type relationshipType.
 java.util.List listMembers(java.lang.String resourceCollectionUri)
          Retrieves the contents of the ResourceCollection.
 java.util.List listMembersWithoutContent(java.lang.String resourceCollectionUri)
          this method is for performance improvement for those methods who dont want to retrive TLO contents
 java.lang.String lockResource(java.lang.String resourceUri, short lockScope, short lockDepth)
          Locks the logical Resource identified by resourceUri.
 java.lang.String lockResource(java.lang.String resourceUri, short lockScope, short lockDepth, int expireSecondsFromNow)
          Locks the logical Resource identified by the resourceUri, and sets an expiration date on the lock.
 void moveResource(java.lang.String sourceResourcePath, java.lang.String targetResourceCollectionPath)
          Moves all versions of the logical resource at sourceResourcePath to targetResourceCollectionPath.
 AccessControlList readAccessControlList(java.lang.String resourceUri)
          Reads an access control list for the resource identified by resourceUri.
 ResourceProperty[][] readProperties(java.lang.String[] resourceUris, ResourceProperty[] propertyNames)
          Retrieves an array of property instances for the requested properties.
 Resource readResource(java.lang.String resourceUri)
          Retrieves the Resource identified by resourceUri from the Repository.
 Document readResourceContent(java.lang.String resourceUri)
          Retrieves the content of the Resource object identified by resourceUri from the Repository.
 java.util.List readResources(java.lang.String[] resourceUris)
          Retrieves the Resource objects identified by resourceUris from the Repository.
 java.util.List readResourcesWithoutContent(java.lang.String[] resourceUris)
          Retrieves the Resource objects identified by resourceUris from the Repository without resource contents
 Resource readResourceWithoutContent(java.lang.String resourceUri)
          Retrieves the Resource identified by resourceUri from the Repository.
 void registerListener(ResourceRepositoryListenerEvent event, java.lang.String listenerName, ResourceRepositoryListener listener)
          Registers a listener to get notified about specified events in the Repository
 void removeProperties(java.lang.String resourceUri, ResourceProperty[] properties, boolean revMajorVersion)
          Removes properties from a resource and creates a new version from the result.
 void removeRelationship(java.lang.String sourceResourceUri, java.lang.String targetResourceUri, int relationshipType)
          Removes a Relation of type relationshipType between the source and target resources.
 boolean resourceExists(java.lang.String resourceUri)
          Determines whether a Resource is identified by resourceUri in the Repository.
 boolean[] resourcesExist(java.lang.String[] resourceUris)
          Determines whether Resource objects identified by resourceUris exist in the Repository.
 java.util.List searchProperties(java.lang.String basePath, Query queryString, int depth, int start, int maxResults, SortOrder sortOrder)
          Executes a properties search against the resources contained within the Repository.
 java.util.List searchRelated(java.lang.String resourceUri, int relationshipType, int depth, Query query, int start, int maxResults, SortOrder sortOrder)
          Retrieves a list of resources related to the resource identified by resourceUri by a relation of type relationshipType and which also match the supplied criteria found in the Query object.
 java.util.List searchRelatedFilter(java.lang.String resourceUri, int relationshipType, int depth, Query query, int start, int maxResults, SortOrder sortOrder, java.lang.String appFilterName)
          Retrieves a list of resources related to the resource identified by resourceUri by a relation of type relationshipType and which also match the supplied criteria found in the Query object.
 void selectVersion(java.lang.String sourceResourceUri, java.lang.String targetResourceUri, int relationshipType, java.lang.String newVersionUri, boolean applyToSource, boolean trackHead)
          Changes the version of a resource involved in a relationship to the version identified by newVersionUri.
 java.lang.String unlockResource(java.lang.String resourceUri)
          Unlocks the locked resources identified by the resourceUri.
 void unregisterListener(ResourceRepositoryListenerEvent event, java.lang.String listenerName)
          Deletes a listener already registered to get notified about specified events in the Repository
 void updateCustomStatus(java.lang.String resourceUri, java.lang.String customStatus)
          Updates the custom status of a resource.
 void updateDeploymentStatus(java.lang.String resourceUri, int deploymentStatus)
          Updates the deployment status of a resource.
 void updateObjectStatus(java.lang.String resourceUri, int objectStatus)
          Updates the object status of a resource.
 void updateProperties(java.lang.String[] resourceUris, ResourceProperty[] properties)
          Adds and updates the properties of the resources.
 void updateProperties(java.lang.String resourceUri, ResourceProperty[] properties)
          Adds and updates the properties of a resource.
 Resource updateResource(java.lang.String resourceUri, Resource resource, boolean revMajorVersion)
          Updates the resource identified by resourceUri with the data in resource.
 Resource updateResourceWithId(java.lang.String resourceUri, java.lang.String resourceVersionId, boolean revMajorVersion)
          The purpose of this method is to allow a resource to be updated using content from a previous revision of the same logical resource.
 void writeAccessControlList(java.lang.String resourceUri, AccessControlList accessControlList, boolean propagate)
          Sets or updates the access control list (ACL) contained in accessControlList on the resources identified by the resourceUri.
 void writeAccessControlList(java.lang.String resourceUri, AccessControlList accessControlList, short propagationMode)
          Sets or updates the access control list (ACL) contained in accessControlList on the resources identified by the resourceUri.
 Resource writeResource(java.lang.String parentResourcePath, Resource resource)
          Writes a new resource into the Repository.
 

Method Detail

copyResource

void copyResource(java.lang.String sourceResourcePath,
                  java.lang.String targetResourceCollectionPath,
                  short depth)
                  throws RepositoryException
Copies the resource at sourceResourcePath into the ResourceCollection at targetResourceCollectionPath. If sourceResourcePath is a ResourceCollection, the depth parameter indicates whether the operation is recursive, and if so, to what degree. Only the head versions of Resource objects are copied. Overwriting does not occur.

Pre-conditions:

Post-conditions:

Parameters:
sourceResourcePath - A path-based identifier that identifies a Resource.
targetResourceCollectionPath - A path-based identifier that identifies the ResourceCollection where the resource identified by sourceResourcePath will be copied.
depth - One of Resource.DEPTH_ZERO, ResourceCollection.DEPTH_ONE, or ResourceCollection.DEPTH_INFINITE.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000depth is not one of the allowed values
ALC-REP-015-000A resource exists at targetResourceCollectionPath + "/" + source.getName()
ALC-REP-016-000The resource collection identified by targetResourceCollectionPath is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource collection identified by targetResourceCollectionPath is locked
ALC-REP-018-000The resource identified by sourceResourcePath or targetResourceCollectionPath does not exist or is not accessible
ALC-REP-050-000sourceResourcePath is not a path-based identifier
ALC-REP-054-000depth is not one of the allowed values
ALC-REP-055-000targetResourceCollectionPath does not identify a ResourceCollection

createRelationship

void createRelationship(java.lang.String sourceResourceUri,
                        java.lang.String targetResourceUri,
                        int relationshipType,
                        boolean trackHead)
                        throws RepositoryException
Creates a Relation of type relationshipType between the source and target resources. Relationships of type Relation.TYPE_MEMBER_OF must be created with writeResource().

When the logical resource identified by targetResourceUri is updated:

Pre-conditions:

Post-conditions:

Parameters:
sourceResourceUri - The source of the relationship.
targetResourceUri - The target of the relationship.
relationshipType - The type of relationship, chosen among the Relation.TYPE_* constants, or a user-defined value greater or equal to 1024.
trackHead - Determines whether the new relationship should always refer to the latest version of the resource identified by targetResourceUri.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-016-000The resource identified by sourceResourceUri or targetResourceUri is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by sourceResourceUri or targetResourceUri is locked
ALC-REP-018-000The resource identified by sourceResourceUri or targetResourceUri does not exist or is not accessible
ALC-REP-013-000relationshipType is less than one
ALC-REP-024-000relationshipType is equal to Relation.TYPE_MEMBER_OF
ALC-REP-030-000relationshipType is a reserved value. For example, it is positive, not a constant, and is less than 1024.

createPendingRelationship

void createPendingRelationship(java.lang.String sourceResourceUri,
                               java.lang.String targetResourcePath,
                               int relationshipType)
                               throws RepositoryException
Creates a PendingRelation of type relationshipType between the source and target resources.

Pre-conditions:

Post-conditions:

Parameters:
sourceResourceUri - The source of the relationship.
targetResourcePath - The target of the relationship.
relationshipType - The type of relationship, chosen among the Relation.TYPE_* constants, or a user-defined value greater or equal to 1024.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-016-000The resource identified by sourceResourceUri is locked by another user
ALC-REP-018-000The resource identified by sourceResourceUri does not exist or is not accessible
ALC-REP-013-000relationshipType is less than one
ALC-REP-024-000relationshipType is equal to Relation.TYPE_MEMBER_OF
ALC-REP-030-000relationshipType is a reserved value. For example, it is positive, not a constant, and is less than 1024.

deleteResource

void deleteResource(java.lang.String resourceUri)
                    throws RepositoryException
Permanently removes the Resource identified by resourceUri from the repository. Deleting a ResourceCollection also deletes its members. If a head version is deleted, the previous version becomes the head version. If a deleted version was the active version, the head version becomes the active version.

Post-conditions:

Parameters:
resourceUri - The Resource to be deleted.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-016-000The resource identified by resourceUri is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by resourceUri is locked
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible
ALC-REP-051-000resourceUri is a system path of /

deleteResources

void deleteResources(java.lang.String[] resourceUris)
                     throws RepositoryException
Permanently removes the Resource objects identified by resourceUris from the repository. Deleting a ResourceCollection also deletes its members. If the head version is deleted, the previous version becomes the head version.

Duplicate URIs are silently ignored. To improve performance, clients should avoid submitting URIs that are known duplicates.

URIs that specify a subset of other URIs provided in the same request will be silently ignored. For example, a request to delete URIs {/a, /a/b} will succeed without warnings about /a/b being a subfolder of /a. To improve performance, clients should avoid submitting URIs that are known to be subsets of other URIs.

Post-conditions:

Parameters:
resourceUris - An array of Resource objects to be deleted.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-016-000A resource identified by one of the elements of resourceUris is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. A resource identified by one of the elements of resourceUris is locked
ALC-REP-018-000A resource identified by one of the elements of resourceUris does not exist or is not accessible
ALC-REP-051-000A resource identified by one of the elements of resourceUris is a system path of /

getHistory

java.util.List getHistory(java.lang.String resourceUri)
                          throws RepositoryException
Retrieves all versions of the logical resource identified by the resourceUri. Clients should use Lid-based or path-based identifiers for best performance. If a version of the resource identified by resourceUri is not accessible, the version is silently excluded from the results.

Parameters:
resourceUri - A Resource for which to retrieve its version history.
Returns:
A java.util.List of Resource instances, each representing a version of the logical resource.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-018-000The version of the resource identified by resourceUri does not exist or is not accessible

getImplementationType

RepositoryImplementationType getImplementationType()
                                                   throws RepositoryException
Describes the backing Repository implementation.

Returns:
An object detailing the implementation type.
Throws:
RepositoryException

getLocks

java.util.List getLocks(java.lang.String resourceUri)
                        throws RepositoryException
Retrieves a java.util.List containing all Lock objects on a specific resource identified by the given resourceUri.

Parameters:
resourceUri - A Resource for which to retrieve locks.
Returns:
A java.util.List of Lock instances on the Resource.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible

getRelated

java.util.List getRelated(java.lang.String resourceUri,
                          boolean isSource,
                          int relationshipType)
                          throws RepositoryException
Retrieves a java.util.List containing all resources related to a specific resource by relation instances of type relationshipType. If isSource is true, this method returns all the Resource objects that are targets of relations of type relationshipType and for which resourceUri is the source. If isSource is false, this method returns all the Resource objects that are sources of relations of type relationshipType and for which resourceUri is the target.

Pre-conditions:

relationshipType must be positive and not within the reserved values list.

Parameters:
resourceUri - The Resource for which to get related resources.
isSource - true if the resourceUri is the source of the relationship and therefore the target resources should be returned. Otherwise, the resourceUri is the target of the relation and source resources should be returned.
relationshipType - The type of relationship, chosen among the Relation.TYPE_* constants, or a user-defined value greater or equal to 1024.
Returns:
A java.util.List of Resource objects related to resourceUri.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000relationshipType is less than one
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible
ALC-REP-030-000relationshipType is a reserved value. For example, it is positive, not a constant, and is less than 1024.

getRelated

java.util.List getRelated(java.lang.String resourceUri,
                          boolean isSource,
                          int[] relationshipTypes)
                          throws RepositoryException
Retrieves a java.util.List containing all resources related to a specific resource by relation instances of types contained in relationshipTypes. If isSource is true, this method returns all the Resource objects that are targets of relations of type relationshipTypes and for which resourceUri is the source. If isSource is false, this method returns all the Resource objects that are sources of relations of type relationshipTypes and for which resourceUri is the target.

Pre-conditions:

Each element of relationshipTypes must be positive.

Parameters:
resourceUri - The Resource for which to get related resources.
isSource - true if the resourceUri is the source of the relationship and therefore the target resources should be returned. Otherwise, the resourceUri is the target of the relation and source resources should be returned.
relationshipTypes - The types of relationships to return, chosen among the Relation.TYPE_* constants, or a user-defined value greater or equal to 1024.
Returns:
A java.util.List of Resource objects related to resourceUri.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000An element of relationshipTypes is less than one
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible
ALC-REP-030-000An element of relationshipTypes is a reserved value. For example, it is positive, not a constant, and is less than 1024.

getRelated

java.util.List getRelated(java.lang.String resourceUri,
                          boolean isSource,
                          int relationshipType,
                          boolean returnDeprecatedResources,
                          boolean isHead)
                          throws RepositoryException
Retrieves a java.util.List containing all resources related to a specific resource by relation instances of type relationshipType. If isSource is true, this method returns all the Resource objects that are targets of relations of type relationshipType and for which resourceUri is the source. If isSource is false, this method returns all the Resource objects that are sources of relations of type relationshipType and for which resourceUri is the target.

Pre-conditions:

relationshipType must be positive and not within the reserved values list.

Parameters:
resourceUri - The Resource for which to get related resources.
isSource - true if the resourceUri is the source of the relationship and therefore the target resources should be returned. Otherwise, the resourceUri is the target of the relation and source resources should be returned.
relationshipType - The type of relationship, chosen among the Relation.TYPE_* constants, or a user-defined value greater or equal to 1024.
returnDeprecatedResources - If returnDeprecatedResources is false then only resources that are not deprecated will be returned. If returnDeprecatedResources is true all Resources will be returned.
isHead - If isHead is false then all related resources will be returned. If isHead is true only related Resources which are the head version will be returned.
Returns:
A java.util.List of Resource objects related to resourceUri.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000relationshipType is less than one
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible
ALC-REP-030-000relationshipType is a reserved value. For example, it is positive, not a constant, and is less than 1024.

getRelated

java.util.List getRelated(java.lang.String resourceUri,
                          boolean isSource,
                          int[] relationshipTypes,
                          boolean returnDeprecatedResources,
                          boolean isHead)
                          throws RepositoryException
Retrieves a java.util.List containing all resources related to a specific resource by relation instances of types contained in relationshipTypes. If isSource is true, this method returns all the Resource objects that are targets of relations of type relationshipTypes and for which resourceUri is the source. If isSource is false, this method returns all the Resource objects that are sources of relations of type relationshipTypes and for which resourceUri is the target.

Pre-conditions:

Each element of relationshipTypes must be positive.

Parameters:
resourceUri - The Resource for which to get related resources.
isSource - true if the resourceUri is the source of the relationship and therefore the target resources should be returned. Otherwise, the resourceUri is the target of the relation and source resources should be returned.
relationshipTypes - The types of relationships to return, chosen among the Relation.TYPE_* constants, or a user-defined value greater or equal to 1024.
returnDeprecatedResources - If returnDeprecatedResources is false then only resources that are not deprecated will be returned. If returnDeprecatedResources is true all Resources will be returned.
isHead - If isHead is false then all related resources will be returned. If isHead is true only related Resources which are the head version will be returned.
Returns:
A java.util.List of Resource objects related to resourceUri.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000An element of relationshipTypes is less than one
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible
ALC-REP-030-000An element of relationshipTypes is a reserved value. For example, it is positive, not a constant, and is less than 1024.

listMembers

java.util.List listMembers(java.lang.String resourceCollectionUri)
                           throws RepositoryException
Retrieves the contents of the ResourceCollection. Internal members are immediate children of a resource collection. If you call this method for anything other than a resource collection, no results are returned.

Parameters:
resourceCollectionUri - The resource collection identifier.
Returns:
A java.util.List of Resource objects that are the source of a Relation of type Relation.TYPE_MEMBER_OF and have resourceCollectionUri as the target.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-018-000The version of the resource identified by resourceCollectionUri does not exist or is not accessible

listMembersWithoutContent

java.util.List listMembersWithoutContent(java.lang.String resourceCollectionUri)
                                         throws RepositoryException
this method is for performance improvement for those methods who dont want to retrive TLO contents

Parameters:
resourceCollectionUri - The resource collection identifier.
Returns:
A java.util.List of Resource objects that are the source of a Relation of type Relation.TYPE_MEMBER_OF and have resourceCollectionUri as the target.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-018-000The version of the resource identified by resourceCollectionUri does not exist or is not accessible

lockResource

java.lang.String lockResource(java.lang.String resourceUri,
                              short lockScope,
                              short lockDepth)
                              throws RepositoryException
Locks the logical Resource identified by resourceUri. Id-based identifiers resolve to logical resources.

The lockDepth parameter only applies when resourceUri is a ResourceCollection. In this case, Lock.DEPTH_ZERO locks only the collection, Lock.DEPTH_ONE locks the collection and its internal members, and Lock.DEPTH_INFINITE locks the collection and all members.

Pre-conditions:

Post-conditions:

The resource identified by resourceUri is write-locked with a lock scope equal to lockScope.

Parameters:
resourceUri - The Resource identifier.
lockScope - Either Lock.SCOPE_EXCLUSIVE or Lock.SCOPE_SHARED.
lockDepth - One of Lock.DEPTH_ZERO, Lock.DEPTH_ONE, or Lock.DEPTH_INFINITE.
Returns:
It returns a lock token, but the token can be discarded as its use is deprecated.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-016-000The resource identified by resourceUri is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by resourceUri is locked
ALC-REP-018-000The version of the resource identified by resourceUri does not exist or is not accessible
ALC-REP-031-000lockScope is not an accepted value
ALC-REP-032-000lockDepth is not an accepted value

lockResource

java.lang.String lockResource(java.lang.String resourceUri,
                              short lockScope,
                              short lockDepth,
                              int expireSecondsFromNow)
                              throws RepositoryException
Locks the logical Resource identified by the resourceUri, and sets an expiration date on the lock. Id-based identifiers resolve to logical resources. The returned lock token is automatically added to the set of lock tokens inside the delegate.

The lockDepth parameter only applies when resourceUri is a ResourceCollection. In this case, Lock.DEPTH_ZERO locks only the collection, Lock.DEPTH_ONE locks the collection and its internal members, and Lock.DEPTH_INFINITE locks the collection and all members.

Pre-conditions:

Post-conditions:

The resource identified by resourceUri is write-locked with a lock scope equal to lockScope and will expire in expireSecondsFromNow.

Parameters:
resourceUri - The Resource identifier.
lockScope - Either Lock.SCOPE_EXCLUSIVE or Lock.SCOPE_SHARED.
lockDepth - One of Lock.DEPTH_ZERO, Lock.DEPTH_ONE, or Lock.DEPTH_INFINITE.
expireSecondsFromNow - A positive value indicating the number of seconds in which this lock will expire.
Returns:
The lock token.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000expireSecondsFromNow is not a positive value
ALC-REP-016-000The resource identified by resourceUri is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by resourceUri is locked
ALC-REP-018-000The version of the resource identified by resourceUri does not exist or is not accessible
ALC-REP-031-000lockScope is not an accepted value
ALC-REP-032-000lockDepth is not an accepted value
ALC-REP-042-000resourceUri is already share-locked, and cannot add an exclusive lock
ALC-REP-043-000resourceUri is already exclusively locked, and cannot add a shared lock

moveResource

void moveResource(java.lang.String sourceResourcePath,
                  java.lang.String targetResourceCollectionPath)
                  throws RepositoryException
Moves all versions of the logical resource at sourceResourcePath to targetResourceCollectionPath. A move operation should be approached with as much caution as a delete operation, because references embedded in user content will break once the resource is moved.

The operation is atomic; if a member of the targetResourcePath cannot be moved, the operation fails. This is in contrast with WEBDAV, in which the recommended approach is that a server should try to move as much of the sourceResourcePath as possible, and return a multi-status response indicating the failures that occurred.

Pre-conditions:

Post-conditions:

Parameters:
sourceResourcePath - The resource to move.
targetResourceCollectionPath - The destination ResourceCollection in which the source resource will be contained at the end of the operation.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-015-000A resource exists at path targetResourceCollectionPath + "/" + source.getName()
ALC-REP-016-000The resource identified by sourceResourcePath or targetResourceCollectionPath is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by sourceResourcePath or targetResourceCollectionPath is locked
ALC-REP-018-000The resource identified by sourceResourcePath or targetResourceCollectionPath does not exist or is not accessible
ALC-REP-050-000sourceResourcePath or targetResourceCollectionPath is not a path-based identifier

readAccessControlList

AccessControlList readAccessControlList(java.lang.String resourceUri)
                                        throws RepositoryException
Reads an access control list for the resource identified by resourceUri.

Parameters:
resourceUri - The Resource for which to retrieve its access control list.
Returns:
An access control list representing the permissions on this resource.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible

readProperties

ResourceProperty[][] readProperties(java.lang.String[] resourceUris,
                                    ResourceProperty[] propertyNames)
                                    throws RepositoryException
Retrieves an array of property instances for the requested properties. Properties are returned in the same order in which they were defined in propertyNames. The absence of a property on a resource is signaled in the results by a null object at the non-existent property's index.

Pre-conditions:

Post-conditions:

Property arrays are returned in the order in which their resourceUri counterparts were submitted.

Parameters:
resourceUris - An array of resource identifiers for which to return properties.
propertyNames - ResourceProperty instances having names and namespaces that identify which properties to return.
Returns:
A two-dimensional array of ResourceProperty instances. The first dimension contains a ResourceProperty[] for each element of resourceUris.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000A ResourceProperty in propertyNames has a null or empty name or namespace.
ALC-REP-018-000A resource identified by an element of resourceUris does not exist or is not accessible


readResource

Resource readResource(java.lang.String resourceUri)
                      throws RepositoryException
Retrieves the Resource identified by resourceUri from the Repository.

Parameters:
resourceUri - The resource to be retrieved.
Returns:
The Resource instance identified by resourceUri.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible

readResourceWithoutContent

Resource readResourceWithoutContent(java.lang.String resourceUri)
                                    throws RepositoryException
Retrieves the Resource identified by resourceUri from the Repository. without resource content

Parameters:
resourceUri - The resource to be retrieved.
Returns:
The Resource instance identified by resourceUri.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible

readResources

java.util.List readResources(java.lang.String[] resourceUris)
                             throws RepositoryException
Retrieves the Resource objects identified by resourceUris from the Repository.

Parameters:
resourceUris - The resources to be retrieved.
Returns:
A java.util.List of Resource instances identified by resourceUris.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-018-000A resource identified by an element of resourceUris does not exist or is not accessible

readResourcesWithoutContent

java.util.List readResourcesWithoutContent(java.lang.String[] resourceUris)
                                           throws RepositoryException
Retrieves the Resource objects identified by resourceUris from the Repository without resource contents

Parameters:
resourceUris - The resources to be retrieved.
Returns:
A java.util.List of Resource instances identified by resourceUris.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-018-000A resource identified by an element of resourceUris does not exist or is not accessible

resourcesExist

boolean[] resourcesExist(java.lang.String[] resourceUris)
                         throws RepositoryException
Determines whether Resource objects identified by resourceUris exist in the Repository.

Parameters:
resourceUris - The resources to check.
Returns:
An array of boolean values representing whether a Resource is identified by each item URI in resourceUris.
Throws:
RepositoryException

resourceExists

boolean resourceExists(java.lang.String resourceUri)
                       throws RepositoryException
Determines whether a Resource is identified by resourceUri in the Repository.

Parameters:
resourceUri - The resource to be checked.
Returns:
true if a Resource is identified by resourceUri.
Throws:
RepositoryException

readResourceContent

Document readResourceContent(java.lang.String resourceUri)
                             throws RepositoryException
Retrieves the content of the Resource object identified by resourceUri from the Repository. This method may return null, in which case the Resource may still have content associated with it, but is stored externally. See Resource.getContent() and ResourceContent.getContentUri().

Parameters:
resourceUri - The resource for which the content will be returned.
Returns:
A Document object representing the resource's content.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible

removeProperties

void removeProperties(java.lang.String resourceUri,
                      ResourceProperty[] properties,
                      boolean revMajorVersion)
                      throws RepositoryException
Removes properties from a resource and creates a new version from the result. This is effectively a resource update and, as such, this method follows the rules laid out in updateResource(). Reserved namespace properties that can be assigned null values, such as a resource description, may be supplied as arguments to this method, but will only be set to null and will not actually be removed as dynamic properties would.

Post-conditions:

A new version of the resource is created without the properties specified in propertyNames.

Parameters:
resourceUri - The resource from which to remove properties.
properties - The properties to remove. Only the namespace and name are required; the value is ignored.
revMajorVersion - true to increment the major version number and reset the minor version number to zero; false to increment the minor version number and to leave the major version number unchanged.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-016-000The resource identified by resourceUri is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by resourceUri is locked
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible
ALC-REP-019-000A property cannot be removed. For example, the identifier attribute is immutable.
ALC-REP-021-000Pre-condition 1 of updateResource() fails
ALC-REP-020-000Pre-condition 2 of updateResource() fails
ALC-REP-022-000The post-condition of updateResource() fails

removeRelationship

void removeRelationship(java.lang.String sourceResourceUri,
                        java.lang.String targetResourceUri,
                        int relationshipType)
                        throws RepositoryException
Removes a Relation of type relationshipType between the source and target resources. It is not an error to remove a non-existent relationship, since the post-condition is satisfied.

Pre-conditions:

relationshipType is one of the Relation.TYPE_* constants, or a user-defined type with a value greater than or equal to 1024.

Post-conditions:

A Relation of type relationshipType no longer exists between sourceResourceUri and targetResourceUri.

Parameters:
sourceResourceUri - The source of the relationship.
targetResourceUri - The target of the relationship.
relationshipType - The type of relationship, chosen from the Relation.TYPE_* constants, or a user-defined type with a value greater than or equal to 1024.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-016-000The resource identified by sourceResourceUri or targetResourceUri is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by sourceResourceUri or targetResourceUri is locked
ALC-REP-018-000The resource identified by sourceResourceUri or targetResourceUri does not exist or is not accessible
ALC-REP-030-000relationshipType is reserved. For example, it is positive, not a constant and less than 1024.
ALC-REP-013-000relationshipType is less than one

searchProperties

java.util.List searchProperties(java.lang.String basePath,
                                Query queryString,
                                int depth,
                                int start,
                                int maxResults,
                                SortOrder sortOrder)
                                throws RepositoryException
Executes a properties search against the resources contained within the Repository. A list of resources whose properties match the Query object filter are returned. Infinite-depth searches recursively traverse relations from target to source, effectively searching an entire resource collection's members.

This method supports results paging; the start parameter is zero-based.

Parameters:
basePath - The base path from which to execute the properties search.
queryString - An instance of Query consisting of logically related conditions on which to base the search.
depth - The depth of the search. Its possible values are ResourceCollection.DEPTH_ONE (to search the base path only) or ResourceCollection.DEPTH_INFINITE (to search the base path and all folders).
start - Indicates the first row from which to select the unpaged result set.
maxResults - The maximum number of resources returned per page, starting at index start of the entire result set.
sortOrder - An instance of SortOrder that defines the sort order of the unpaged result set.
Returns:
A list of resources matching the search filter.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000start is less than zero, maxResults is less than one, or depth is not equal to ResourceCollection.DEPTH_ONE or ResourceCollection.DEPTH_INFINITE
ALC-REP-018-000The resource identified resourceUri does not exist or is not accessible
See Also:
Query, SortOrder

searchRelated

java.util.List searchRelated(java.lang.String resourceUri,
                             int relationshipType,
                             int depth,
                             Query query,
                             int start,
                             int maxResults,
                             SortOrder sortOrder)
                             throws RepositoryException
Retrieves a list of resources related to the resource identified by resourceUri by a relation of type relationshipType and which also match the supplied criteria found in the Query object. The resource identified by resourceUri is taken to be the target of the relationships, and infinite-depth searches recursively traverse relations from target to source.

The implementation supports results paging; both the start and maxResults parameters are zero-based.

Parameters:
resourceUri - The Resource for which to retrieve related resources.
relationshipType - The type of relationship, chosen among the Relation.TYPE_* constants, or a user-defined value greater than or equal to 1024.
depth - The depth of the search. Its possible values are ResourceCollection.DEPTH_ONE (search the base path only) or ResourceCollection.DEPTH_INFINITE (search the base path and all subfolders).
query - An instance of Query describing a Repository query.
start - Indicates the first row to select from the unpaged result set.
maxResults - The maximum number of resources returned per page, starting at index start of the entire result set.
sortOrder - Format and type TBD
Returns:
A java.util.List of Resource objects related to resourceUri.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000start is less than zero, maxResults is less than one, or relationshipType is less than one
ALC-REP-018-000The resource identified resourceUri does not exist or is not accessible
ALC-REP-030-000relationshipType is reserved. For example, it is positive, not a constant and less than 1024.

See Also:
Query, SortOrder

selectVersion

void selectVersion(java.lang.String sourceResourceUri,
                   java.lang.String targetResourceUri,
                   int relationshipType,
                   java.lang.String newVersionUri,
                   boolean applyToSource,
                   boolean trackHead)
                   throws RepositoryException
Changes the version of a resource involved in a relationship to the version identified by newVersionUri. It is not an error to reselect the same target, as the post-condition is still satisfied.

Pre-conditions:

Post-conditions:

The target object attribute of the existing relation object between source and target resources is modified to point to the new target resource.

Parameters:
sourceResourceUri - Identifies the Resource that is the source of the relationship.
targetResourceUri - Identifies the Resource that is the target of the relationship.
relationshipType - The type of relationship, chosen among the Relation.TYPE_* constants, or a user-defined value greater than or equal to 1024.
newVersionUri - Identifies the version of the Resource that is to become the new source or target of the relationship. The applyToSource parameter determines the attribute (source or target) to which the new URI is applied.
applyToSource - If true, the newVersionUri is applied to the source of the relationship. Otherwise the resourceUri is applied to the target of the relation.
trackHead - If true, the relationship will automatically track new versions of the target Resource. If false, the relationship will not automatically change when the target Resource is updated.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000relationshipType is less than one
ALC-REP-016-000The resource identified by sourceResourceUri or targetResourceUri is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by sourceResourceUri or targetResourceUri is locked
ALC-REP-018-000The resource identified by sourceResourceUri or targetResourceUri does not exist or is not accessible
ALC-REP-030-000relationshipType is reserved. For example, it is positive, not a constant and less than 1024.
ALC-REP-040-000The relationship does not exist
ALC-REP-044-000 newResourceUri is not a version of sourceResourceUri (if applyToSource is true), or newResourceUri is not a version of targetResourceUri (if applyToSource is false)

unlockResource

java.lang.String unlockResource(java.lang.String resourceUri)
                                throws RepositoryException
Unlocks the locked resources identified by the resourceUri.

Post-conditions:

If the user has system write permission, all locks on the resource are removed.

Parameters:
resourceUri - The resource to unlock.
Returns:
The lock token used to unlock this resource. The token can be discarded as its use is deprecated.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-016-000The resource identified by resourceUri is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by resourceUri is locked
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible

updateCustomStatus

void updateCustomStatus(java.lang.String resourceUri,
                        java.lang.String customStatus)
                        throws RepositoryException
Updates the custom status of a resource.

Pre-conditions:

customStatus may be null.

Post-conditions:

Parameters:
resourceUri - The resource to update.
customStatus - The new custom status to set.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-016-000The resource identified by resourceUri is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by resourceUri is locked
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible

updateDeploymentStatus

void updateDeploymentStatus(java.lang.String resourceUri,
                            int deploymentStatus)
                            throws RepositoryException
Updates the deployment status of a resource.

Post-conditions:

Parameters:
resourceUri - The resource to update.
deploymentStatus - The new deployment status to set.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000deploymentStatus is less than one
ALC-REP-016-000The resource identified by resourceUri is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by resourceUri is locked
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible
ALC-REP-030-000deploymentStatus is reserved. For example, it is positive, not a constant and less than 1024.

updateObjectStatus

void updateObjectStatus(java.lang.String resourceUri,
                        int objectStatus)
                        throws RepositoryException
Updates the object status of a resource.

Pre-conditions:

The objectStatus parameter's lifecycle must be respected.

Post-conditions:

Parameters:
resourceUri - The resource to update.
objectStatus - The object status to set.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000objectStatus is less than one
ALC-REP-016-000The resource identified by resourceUri is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by resourceUri is locked
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible
ALC-REP-030-000objectStatus is reserved. For example, it is positive, not a constant and less than 1024.
ALC-REP-036-000The object status was changed from latest to updated
ALC-REP-037-000The object status was changed from other than latest to updated
ALC-REP-038-000The object status was changed from updated to latest
ALC-REP-039-000The object status was changed from other than updated to latest

updateProperties

void updateProperties(java.lang.String resourceUri,
                      ResourceProperty[] properties)
                      throws RepositoryException
Adds and updates the properties of a resource. This is effectively a resource update, and, as such, this method is subject to the rules laid out in updateResource().

Pre-conditions:

properties and its elements must not be null.

Post-conditions:

Parameters:
resourceUri - The resource to update.
properties - New or updated properties to set on the resource.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-016-000The resource identified by resourceUri is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by resourceUri is locked
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible
ALC-REP-019-000A property specified in properties is immutable

updateProperties

void updateProperties(java.lang.String[] resourceUris,
                      ResourceProperty[] properties)
                      throws RepositoryException
Adds and updates the properties of the resources.

Pre-conditions:

properties and its elements must not be null.

Post-conditions:

Parameters:
resourceUris - An array of resources to update with the given properties.
properties - New or updated properties to set on the resource.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-016-000The resource identified by an element of resourceUris is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by an element of resourceUris is locked
ALC-REP-018-000The resource identified by an element of resourceUris does not exist or is not accessible
ALC-REP-019-000A property specified in properties is immutable

updateResource

Resource updateResource(java.lang.String resourceUri,
                        Resource resource,
                        boolean revMajorVersion)
                        throws RepositoryException
Updates the resource identified by resourceUri with the data in resource. The Lid, major version, and minor version attributes on the supplied resource are ignored, and are read from the resource identified by resourceUri. It is important to be aware that changing the name of a resource will break all prior path-based references. For example, the resource will not be accessible by the old path.

Pre-conditions:

Post-conditions:

If the ownerVersion attribute is set on resource, ownerVersion must be unique across all versions of this logical resource.

Parameters:
resourceUri - The version of the resource being updated.
resource - The new resource version.
revMajorVersion - If true, the major version number is incrememted and the minor version number is reset to zero. If false, the minor version number is incremented and the major version number is unchanged.
Returns:
An instance of the newly created version. The returned instance is not the same instance as resource.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-016-000The resource identified by resourceUri is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by resourceUri is locked
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible
ALC-REP-020-000Pre-condition 2 failed
ALC-REP-021-000Pre-condition 1 failed
ALC-REP-022-000Pre-condition 1 failed

writeAccessControlList

void writeAccessControlList(java.lang.String resourceUri,
                            AccessControlList accessControlList,
                            boolean propagate)
                            throws RepositoryException
Sets or updates the access control list (ACL) contained in accessControlList on the resources identified by the resourceUri. If propagate is true and resourceUri identifies a ResourceCollection, the ACL will be applied to all members of the collection. Locking rules do not apply to the resource identified by resourceUri.

Post-conditions:

Parameters:
resourceUri - The URI of the resource to which the ACL must be applied.
accessControlList - The ACL to apply to the resource identified by resourceId.
propagate - When the resource is a ResourceCollection, this parameter determines whether the permissions should be propagated to all path-contained resources.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible
See Also:
AccessControlList

writeAccessControlList

void writeAccessControlList(java.lang.String resourceUri,
                            AccessControlList accessControlList,
                            short propagationMode)
                            throws RepositoryException
Sets or updates the access control list (ACL) contained in accessControlList on the resources identified by the resourceUri. If propagate is true and resourceUri identifies a ResourceCollection, the ACL will be applied to all members of the collection. Locking rules do not apply to the resource identified by resourceUri.

Post-conditions:

Parameters:
resourceUri - The URI of the resource to which the ACL must be applied.
accessControlList - The ACL to apply to the resource identified by resourceId.
propagationMode - When the resource is a ResourceCollection, this flag indicates whether to recursively write the ACL to all child Resources, or to all non ResourceCollection immediate children in the specified ResourceCollection or to not recursively write the ACL.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible
See Also:
AccessControlList

writeResource

Resource writeResource(java.lang.String parentResourcePath,
                       Resource resource)
                       throws RepositoryException
Writes a new resource into the Repository.

Pre-conditions:

If specified by the client:

Post-conditions:

Parameters:
parentResourcePath - The path to the ResourceCollection that will contain the new Resource.
resource - The new Resource to create.
Returns:
An instance of the newly created Resource. The returned instance is not the same instance as resource.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000parentResourcePath is not a path-based identifier
ALC-REP-016-000The resource identified by parentResourcePath is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by parentResourcePath is locked
ALC-REP-018-000The resource identified by parentResourcePath does not exist or is not accessible
ALC-REP-028-000The major/minor combination is invalid
ALC-REP-100-000The Id or Lid is already in use by other resources

updateResourceWithId

Resource updateResourceWithId(java.lang.String resourceUri,
                              java.lang.String resourceVersionId,
                              boolean revMajorVersion)
                              throws RepositoryException
The purpose of this method is to allow a resource to be updated using content from a previous revision of the same logical resource. The previous revision must be identified using the resourceVersionId parameter. For more information, see updateResource().

Parameters:
resourceUri - The version of the resource being updated.
resourceVersionId - The new resource version identifier.
revMajorVersion - If true, the major version number is incremented and the minor version number is reset to zero. If false, the minor version number is incremented and the major version number is unchanged.
Returns:
An instance of the newly created version.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-016-000The resource identified by resourceUri is locked by another user
ALC-REP-017-000This error code is deprecated because it will never occur. The resource identified by resourceUri is locked
ALC-REP-018-000The resource identified by resourceUri does not exist or is not accessible
ALC-REP-020-000Pre-condition 2 of updateResource() failed
ALC-REP-021-000Pre-condition 1 of updateResource() failed
ALC-REP-022-000Pre-condition 1 of updateResource() failed

registerListener

void registerListener(ResourceRepositoryListenerEvent event,
                      java.lang.String listenerName,
                      ResourceRepositoryListener listener)
                      throws RepositoryException
Registers a listener to get notified about specified events in the Repository

Parameters:
event - - The ResourceRepositoryListenerEvent event which needs to be notified
listenerName - - The listener name for the listener which will be registered for notifications of the specified Respository event
listener - - The specific listener which will be registered for notification of the specified Respository event
Throws:
RepositoryException

unregisterListener

void unregisterListener(ResourceRepositoryListenerEvent event,
                        java.lang.String listenerName)
                        throws RepositoryException
Deletes a listener already registered to get notified about specified events in the Repository

Parameters:
event - - The ResourceRepositoryListenerEvent event which needs to be notified
listenerName - - The listener name for the listener which will be registered for notifications of the specified Respository event
Throws:
RepositoryException

searchRelatedFilter

java.util.List searchRelatedFilter(java.lang.String resourceUri,
                                   int relationshipType,
                                   int depth,
                                   Query query,
                                   int start,
                                   int maxResults,
                                   SortOrder sortOrder,
                                   java.lang.String appFilterName)
                                   throws RepositoryException
Retrieves a list of resources related to the resource identified by resourceUri by a relation of type relationshipType and which also match the supplied criteria found in the Query object. The resource identified by resourceUri is taken to be the target of the relationships, and infinite-depth searches recursively traverse relations from target to source.

The implementation supports results paging; both the start and maxResults parameters are zero-based.

Parameters:
resourceUri - The Resource for which to retrieve related resources.
relationshipType - The type of relationship, chosen among the Relation.TYPE_* constants, or a user-defined value greater than or equal to 1024.
depth - The depth of the search. Its possible values are ResourceCollection.DEPTH_ONE (search the base path only) or ResourceCollection.DEPTH_INFINITE (search the base path and all subfolders).
query - An instance of Query describing a Repository query.
start - Indicates the first row to select from the unpaged result set.
maxResults - The maximum number of resources returned per page, starting at index start of the entire result set.
sortOrder - Format and type TBD
appFilterName - String on which result is to be filtered
Returns:
A java.util.List of Resource objects related to resourceUri.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000start is less than zero, maxResults is less than one, or relationshipType is less than one
ALC-REP-018-000The resource identified resourceUri does not exist or is not accessible
ALC-REP-030-000relationshipType is reserved. For example, it is positive, not a constant and less than 1024.

See Also:
Query, SortOrder

getCount

int getCount(java.lang.String resourceUri,
             int relationshipType,
             Query query,
             java.lang.String appFilterName)
             throws RepositoryException
Retrieves a number of resources related to the resource identified by resourceUri by a relation of type relationshipType and which also match the supplied criteria found in the Query object. The resource identified by resourceUri is taken to be the target of the relationships, and infinite-depth searches recursively traverse relations from target to source.

The implementation supports results paging; both the start and maxResults parameters are zero-based.

Parameters:
resourceUri - The Resource for which to retrieve related resources.
relationshipType - The type of relationship, chosen among the Relation.TYPE_* constants, or a user-defined value greater than or equal to 1024.
query - An instance of Query describing a Repository query.
appFilterName - String on which result is to be filtered
Returns:
A java.util.List of Resource objects related to resourceUri.
Throws:
RepositoryException - The following error codes indicate the error cause:

Error codeDescription
ALC-REP-013-000start is less than zero, maxResults is less than one, or relationshipType is less than one
ALC-REP-018-000The resource identified resourceUri does not exist or is not accessible
ALC-REP-030-000relationshipType is reserved. For example, it is positive, not a constant and less than 1024.

See Also:
Query, SortOrder