com.adobe.livecycle.rca
Interface ReviewZoneProvider


public interface ReviewZoneProvider

This interface defines set of abstract methods that any new custom implementation must implement. Any implementation of ReviewZoneProvider, must be deployed as LiveCycle Service and should adhere to the component specification of Default implementation of ReviewZoneProvider. ReviewZoneProvider provides an abstraction over conventional content store. Review Commenting and Approval provides a default implementation of ReviewZoneProvider, which can be replaced by a custom implementation. A space in review zone provider abstraction represents a folder or directory in the content store. A Content in review zone provider abstraction represents a file in the content store. A node represents a content or space in the content store. But at places term node has been used specifically for content.


Field Summary
static String DOCUMENT_DESCRIPTION
          Constant that denotes the description attribute that is set by ReviewZoneProvider Implementation while returning the document
static String DOCUMENT_NAME
          Constant that denotes the file name attribute that is set by ReviewZoneProvider Implementation while returning the document
 
Method Summary
 String createSpace(String spacePath)
          Create space and its sub-spaces (sub-directories) in the review zone.
 boolean deleteNode(String nodePath)
          Delete a content node or space from the review zone.
 List getSpaceContent(String spacePath)
          Returns all children of given space.
 void grantContributePermission(String nodePath, List usersWithContributePermission, Boolean applyToChild, Boolean inheritParent)
          Assign permissions to given node/space.
 void grantPermission(String nodePath, List usersWithReadPermission, List usersWithReadWritePermission, Boolean applyToChild, Boolean inheritParent)
          Assign permissions to given node/space.
 boolean nodeExists(String parentSpacePath, String nodeName)
          Checks whether content exists or not in the Review Zone
 com.adobe.livecycle.content.File retrieveContent(String nodePath)
          Retrieves the content node from Review Zone.
 void revokeContributePermission(String nodePath, List usersWithContributePermission, Boolean applyToChild)
          Revokes contributor permissions on given node/space from given list of users.
 void revokePermission(String nodePath, List usersWithReadPermission, List usersWithReadWritePermission, Boolean applyToChild)
          Revokes permissions on given node/space from given list of users.
 boolean spaceExists(String parentSpacePath, String spaceName)
          Checks whether the space exists or not in Review Zone.
 String storeContent(String spacePath, String nodeName, com.adobe.livecycle.content.File content, String contentType)
          Stores the given content to Review Zone.
 String storeContent(String spacePath, String nodeName, InputStream inputStream, String contentType)
           
 boolean supportsContributePermission()
          Should return true, if the review zone provider supports contributor role.
 

Field Detail

DOCUMENT_NAME

static final String DOCUMENT_NAME
Constant that denotes the file name attribute that is set by ReviewZoneProvider Implementation while returning the document

See Also:
Constant Field Values

DOCUMENT_DESCRIPTION

static final String DOCUMENT_DESCRIPTION
Constant that denotes the description attribute that is set by ReviewZoneProvider Implementation while returning the document

See Also:
Constant Field Values
Method Detail

spaceExists

boolean spaceExists(String parentSpacePath,
                    String spaceName)
                    throws PersistenceException
Checks whether the space exists or not in Review Zone. e.g. To check for space test3 in space test1/test2 spaceExists("test1/test2","test3); The implementation need not search in sub directories, only direct children of parent space path should be search for a match.

Parameters:
parentSpacePath - Parent Space Path
spaceName - Name of the space
Returns:
true if space exists and false if space does not exists
Throws:
PersistenceException

nodeExists

boolean nodeExists(String parentSpacePath,
                   String nodeName)
                   throws PersistenceException
Checks whether content exists or not in the Review Zone

Parameters:
parentSpacePath - Parent Space Path
nodeName - Name of the content node
Returns:
true if node exists and false if content node does not exists
Throws:
PersistenceException

createSpace

String createSpace(String spacePath)
                   throws PersistenceException
Create space and its sub-spaces (sub-directories) in the review zone. This operation should be a no-op if the space already exists. e.g. if spacePath=test1/test2/test3, then the operation must create test1 and its children test2 and test3

Parameters:
spacePath - path of the space to be created.
Returns:
WebDAV or Network share location of the path that was created.
Throws:
PersistenceException

deleteNode

boolean deleteNode(String nodePath)
                   throws PersistenceException
Delete a content node or space from the review zone.

Parameters:
nodePath - content node or space path
Returns:
true if the node is deleted, false if node is not deleted
Throws:
PersistenceException

grantPermission

void grantPermission(String nodePath,
                     List usersWithReadPermission,
                     List usersWithReadWritePermission,
                     Boolean applyToChild,
                     Boolean inheritParent)
                     throws PersistenceException,
                            UserNotFoundException
Assign permissions to given node/space. Then based on user lists of read and write permissions, appropriate permissions will be assigned to particular node. Any custom implementation of RZP, may choose not to implement this operation and in that case, this operation should act as a no-op.

Parameters:
nodePath - Path of the node like /home/rca/test.pdf or /home/rca.
usersWithReadPermission - List of users, who will be given read permissions. It is list of User's OID.
usersWithReadWritePermission - List of users, who will be given write permissions. It is list of User's OID.
applyToChild - If this flag is true then all the child of the node (represented by nodePath) are also given same permission. This would be only applicable if node represents a space. e.g if nodePath is /home/rca, then all the children under rca will also be given same permission as rca.
inheritParent - If this flag is true, then parent permission is inherited
Throws:
PersistenceException - If there is any error while assigning permission.
UserNotFoundException - If any user given in the user list if not found.

revokePermission

void revokePermission(String nodePath,
                      List usersWithReadPermission,
                      List usersWithReadWritePermission,
                      Boolean applyToChild)
                      throws PersistenceException,
                             UserNotFoundException
Revokes permissions on given node/space from given list of users. Any custom implementation of RZP, may choose not to implement this operation and in that case, this operation should act as a no-op.

Parameters:
nodePath - Path of the node like /home/rca/test.pdf or /home/rca
usersWithReadPermission - List of users, from whom read permission will be revoked. It is list of User's OID. e.g. if alex is in the usersWithReadPermission, then after execution of this. Alex should not have any read/write permission on this node or space.
usersWithReadWritePermission - List of users, from whom write permission will be revoked. It is list of User's OID. e.g. if alex is in the usersWithReadWritePermission, then after execution of this. Alex should not have any write permission on this node or space.
applyToChild - If this flag is true then revoke permission recursively apply to all children of the node ( represented by nodePath). This would be only applicable if node represents a space. e.g if nodePath is /home/rca, then revoke will apply to all the child nodes under rca.
Throws:
PersistenceException - If there is any error while assigning permission.
UserNotFoundException - If any user given in the user list if not found.

grantContributePermission

void grantContributePermission(String nodePath,
                               List usersWithContributePermission,
                               Boolean applyToChild,
                               Boolean inheritParent)
                               throws PersistenceException,
                                      UserNotFoundException
Assign permissions to given node/space. Then based on user lists of read and write permissions, appropriate permissions will be assigned to particular node. This method should be only implemented if implementation supports Contribute permission, else this method should be no-operation

Parameters:
nodePath - Path of the node like /home/rca/test.pdf or /home/rca
usersWithContributePermission - List of users, who will be given contribute permissions. It is list of User's OID. if RZP does not support, contribute permission, then this method should be no-op.
applyToChild - If this flag is true then all the child of the node (represented by nodePath) are also given same permission. This would be only applicable if node represents a space. e.g if nodePath is /home/rca, then all the children under rca will also be given same permission as rca.
inheritParent - If this flag is true, then parent permission is inherited
Throws:
PersistenceException - If there is any error while assigning permission.
UserNotFoundException - If any user given in the user list if not found.

revokeContributePermission

void revokeContributePermission(String nodePath,
                                List usersWithContributePermission,
                                Boolean applyToChild)
                                throws PersistenceException,
                                       UserNotFoundException
Revokes contributor permissions on given node/space from given list of users. This method should be only implemented if implementation supports Contribute permission, else this method should be no-operation

Parameters:
nodePath - Path of the node like /home/rca/test.pdf or /home/rca
usersWithContributePermission - List of users, from whom contribute permission will be revoked. It is list of User's OID. e.g. if alex is in the usersWithContributePermission, then after execution of this. Alex should not have any contribute permission on this node or space. If contribute permission is not supported then this should be ignored.
applyToChild - If this flag is true then revoke permission recursively apply to all children of the node ( represented by nodePath). This would be only applicable if node represents a space. e.g if nodePath is /home/rca, then revoke will apply to all the child nodes under rca.
Throws:
PersistenceException - If there is any error while assigning permission.
UserNotFoundException - If any user given in the user list if not found.

storeContent

String storeContent(String spacePath,
                    String nodeName,
                    com.adobe.livecycle.content.File content,
                    String contentType)
                    throws PersistenceException
Stores the given content to Review Zone. If the content node already exists it is overwritten.

Parameters:
spacePath - path of the space, where content should be stored.
nodeName - Name of the content
content - idp.Document that represent the content
contentType - content type of the content like applicaion/pdf
Returns:
WebDAV or Network share location of the path that was created.
Throws:
PersistenceException - if content is not stored

storeContent

String storeContent(String spacePath,
                    String nodeName,
                    InputStream inputStream,
                    String contentType)
                    throws PersistenceException
Throws:
PersistenceException

retrieveContent

com.adobe.livecycle.content.File retrieveContent(String nodePath)
                                                 throws PersistenceException
Retrieves the content node from Review Zone. Returned document object, should have wsfilename attribute set to name of the node.

Parameters:
nodePath - Absolute path to the content node in Review Zone like /Company Home/RCA/test.pdf
Returns:
com.adobe.idp.Document object representing the content
Throws:
PersistenceException - if content is not retrieved

getSpaceContent

List getSpaceContent(String spacePath)
                     throws PersistenceException
Returns all children of given space. It returns a list of com.adobe.idp.Document. e.g. if space test1 contains a space test2 and a content node test.pdf, then call to getSpaceContent("test", true) will return test.pdf.

Parameters:
spacePath - Absolute path to space.
Returns:
List of com.adobe.idp.Document.
Throws:
PersistenceException - if content is not retrieved.

supportsContributePermission

boolean supportsContributePermission()
                                     throws PersistenceException
Should return true, if the review zone provider supports contributor role. Contributor role, allows RCA engine to optimize file permission model and hence increase the through put. If there is no support for permission model then also this should return true. e.g. for a file system based rzp, where fine grained permission support is not available.

Returns:
true or false
Throws:
PersistenceException


[an error occurred while processing this directive] [an error occurred while processing this directive]