com.adobe.livecycle.rca.client
Class ReviewZoneProviderServiceClient

java.lang.Object
  extended by com.adobe.livecycle.rca.client.ReviewZoneProviderServiceClient
All Implemented Interfaces:
ReviewZoneProvider

public class ReviewZoneProviderServiceClient
extends Object
implements ReviewZoneProvider


Field Summary
 
Fields inherited from interface com.adobe.livecycle.rca.rzp.ReviewZoneProvider
DOCUMENT_DESCRIPTION, DOCUMENT_NAME
 
Constructor Summary
ReviewZoneProviderServiceClient()
           
ReviewZoneProviderServiceClient(com.adobe.idp.dsc.clientsdk.ServiceClientFactory serviceClientFactory)
           
 
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, Boolean getOnlyFiles)
          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.idp.Document 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.idp.Document content, String contentType)
          Stores the given content to Review Zone.
 boolean supportsContributePermission()
          Should return true, if the review zone provider supports contributor role.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReviewZoneProviderServiceClient

public ReviewZoneProviderServiceClient()

ReviewZoneProviderServiceClient

public ReviewZoneProviderServiceClient(com.adobe.idp.dsc.clientsdk.ServiceClientFactory serviceClientFactory)
Method Detail

createSpace

public String createSpace(String spacePath)
                   throws PersistenceException
Description copied from interface: ReviewZoneProvider
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

Specified by:
createSpace in interface ReviewZoneProvider
Parameters:
spacePath - path of the space to be created.
Returns:
WebDAV or Network share location of the path that was created.
Throws:
PersistenceException

deleteNode

public boolean deleteNode(String nodePath)
                   throws PersistenceException
Description copied from interface: ReviewZoneProvider
Delete a content node or space from the review zone.

Specified by:
deleteNode in interface ReviewZoneProvider
Parameters:
nodePath - content node or space path
Returns:
true if the node is deleted, false if node is not deleted
Throws:
PersistenceException

getSpaceContent

public List getSpaceContent(String spacePath,
                            Boolean getOnlyFiles)
                     throws PersistenceException
Description copied from interface: ReviewZoneProvider
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.

Specified by:
getSpaceContent in interface ReviewZoneProvider
Parameters:
spacePath - Absolute path to space.
getOnlyFiles - if this flag is true then only children of type File are only returned. Default value of this flag is true. This flag is kept for future use and can be ignored by assuming the default value.
Returns:
List of com.adobe.idp.Document.
Throws:
PersistenceException - if content is not retrieved.

grantPermission

public void grantPermission(String nodePath,
                            List usersWithReadPermission,
                            List usersWithReadWritePermission,
                            Boolean applyToChild,
                            Boolean inheritParent)
                     throws PersistenceException,
                            UserNotFoundException
Description copied from interface: ReviewZoneProvider
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.

Specified by:
grantPermission in interface ReviewZoneProvider
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.

grantContributePermission

public void grantContributePermission(String nodePath,
                                      List usersWithContributePermission,
                                      Boolean applyToChild,
                                      Boolean inheritParent)
                               throws PersistenceException,
                                      UserNotFoundException
Description copied from interface: ReviewZoneProvider
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

Specified by:
grantContributePermission in interface ReviewZoneProvider
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.

nodeExists

public boolean nodeExists(String parentSpacePath,
                          String nodeName)
                   throws PersistenceException
Description copied from interface: ReviewZoneProvider
Checks whether content exists or not in the Review Zone

Specified by:
nodeExists in interface ReviewZoneProvider
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

retrieveContent

public com.adobe.idp.Document retrieveContent(String nodePath)
                                       throws PersistenceException
Description copied from interface: ReviewZoneProvider
Retrieves the content node from Review Zone. Returned document object, should have wsfilename attribute set to name of the node.

Specified by:
retrieveContent in interface ReviewZoneProvider
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

revokePermission

public void revokePermission(String nodePath,
                             List usersWithReadPermission,
                             List usersWithReadWritePermission,
                             Boolean applyToChild)
                      throws PersistenceException,
                             UserNotFoundException
Description copied from interface: ReviewZoneProvider
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.

Specified by:
revokePermission in interface ReviewZoneProvider
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.

revokeContributePermission

public void revokeContributePermission(String nodePath,
                                       List usersWithContributePermission,
                                       Boolean applyToChild)
                                throws PersistenceException,
                                       UserNotFoundException
Description copied from interface: ReviewZoneProvider
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

Specified by:
revokeContributePermission in interface ReviewZoneProvider
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.

spaceExists

public boolean spaceExists(String parentSpacePath,
                           String spaceName)
                    throws PersistenceException
Description copied from interface: ReviewZoneProvider
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.

Specified by:
spaceExists in interface ReviewZoneProvider
Parameters:
parentSpacePath - Parent Space Path
spaceName - Name of the space
Returns:
true if space exists and false if space does not exists
Throws:
PersistenceException

storeContent

public String storeContent(String spacePath,
                           String nodeName,
                           com.adobe.idp.Document content,
                           String contentType)
                    throws PersistenceException
Description copied from interface: ReviewZoneProvider
Stores the given content to Review Zone. If the content node already exists it is overwritten.

Specified by:
storeContent in interface ReviewZoneProvider
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

supportsContributePermission

public boolean supportsContributePermission()
                                     throws PersistenceException
Description copied from interface: ReviewZoneProvider
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.

Specified by:
supportsContributePermission in interface ReviewZoneProvider
Returns:
true or false
Throws:
PersistenceException


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