public class RnCUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ASSET_PATH |
static java.lang.String |
PROJECT_SUB_TYPE |
static java.lang.String |
PROJECT_TYPE |
static java.lang.String |
REVIEW_CONTAINER_NODE_NAME |
static java.lang.String |
REVIEW_DEADLINE |
static java.lang.String |
REVIEW_DESCRIPTION |
static java.lang.String |
REVIEW_GROUP |
static java.lang.String |
REVIEW_ID |
static java.lang.String |
REVIEW_INITIATOR |
static java.lang.String |
REVIEW_NAME |
static java.lang.String |
REVIEW_PROJECT_NAME |
static java.lang.String |
REVIEW_TASKS_PATH |
static java.lang.String |
REVIEWERS |
static java.lang.String |
TASK_DUE_DATE |
static java.lang.String |
UNDER_REVIEW |
Constructor and Description |
---|
RnCUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addUserToGroup(java.lang.String reviewer,
java.lang.String reviewGroupId,
ResourceResolver resourceResolver)
Adds the user as member of group.
|
static void |
checkAssetPathArgument(java.lang.String assetPath)
Checks whether the asset path passed as argument is valid or not.
|
static void |
checkCreateReviewArguments(java.lang.String reviewName,
java.lang.String[] reviewerList,
java.lang.String deadline,
ResourceResolver resourceResolver)
Checks whether the arguments passed for review creation are valid or not.
|
static Node |
checkNodeExistance(java.lang.String assetPath,
ResourceResolver resourceResolver)
Checks whether the node exist on asset path passed as argument or not.
|
static void |
checkReviewDeadlineArgument(java.lang.String deadline)
Checks whether the deadline argument passed for review updation is valid
or not.
|
static void |
checkUpdateReviewArguments(java.lang.String[] reviewerList,
java.lang.String deadline,
ResourceResolver bundleResourceResolver)
Checks whether the arguments passed for review updation are valid or not.
|
static Group |
createGroup(java.lang.String groupName,
java.lang.String relativePath,
ResourceResolver resourceResolver)
Creates a user group with the name provided.
|
static Task |
createProject(java.lang.String reviewName,
java.lang.String assetPath,
java.lang.String deadline,
java.lang.String assignee,
ResourceResolver bundleResourceResolver,
ResourceResolver resourceResolver)
Creates the Task of type Project
|
static Task |
createTask(java.lang.String reviewProjectName,
java.lang.String reviewName,
java.lang.String deadline,
java.lang.String reviewer,
java.lang.String assetPath,
java.lang.String reviewDescription,
ResourceResolver bundleResourceResolver,
ResourceResolver resourceResolver)
Creates a Task with given attribute
|
static java.util.List<java.lang.String> |
getGroupMembers(java.lang.String groupId,
ResourceResolver resourceResolver)
Returns the members of the specified group.
|
static Node |
getNode(java.lang.String assetPath,
ResourceResolver resourceResolver)
Returns the node for the given repository path.
|
static java.util.List<Task> |
getProjectSubTasks(java.lang.String reviewProjectName,
ResourceResolver resourceResolver)
Returns the project sub tasks.
|
static ResourceResolver |
getResourceResolver(Session session,
ResourceResolverFactory resourceResolverFactory)
Returns the resource resolver for the session.
|
static boolean |
isInArray(java.lang.String searchId,
java.lang.String[] idArray)
Checks whether the given id is in the given array.
|
static java.lang.Boolean |
isMemberOfGroup(java.lang.String groupId,
java.lang.String userId,
ResourceResolver resourceResolver)
Checks whether the user is member of group or not.
|
static boolean |
isTaskEligibleForUpdate(Status status)
Decides whether the task status passed, makes the task eligible for
update or not.
|
static void |
removeGroup(java.lang.String groupName,
ResourceResolver resourceResolver)
Removes the user group whose ID is given.
|
static void |
removeUserFromGroup(java.lang.String reviewer,
java.lang.String reviewGroupId,
ResourceResolver resourceResolver)
Removes the member from group.
|
static void |
terminateProjectActiveTasks(java.lang.String reviewProjectName,
ResourceResolver resourceResolver)
Completes the Project if its Active.
|
static void |
updateProjectDeadline(java.lang.String reviewProjectName,
java.lang.String deadline,
ResourceResolver resourceResolver)
Updates the deadline of Project if its not already completed.
|
static void |
updateProjectDescription(java.lang.String reviewProjectName,
java.lang.String description,
ResourceResolver resourceResolver)
Updates the description of Project if its not already completed.
|
public static final java.lang.String PROJECT_TYPE
public static final java.lang.String PROJECT_SUB_TYPE
public static final java.lang.String TASK_DUE_DATE
public static final java.lang.String ASSET_PATH
public static final java.lang.String REVIEWERS
public static final java.lang.String REVIEW_NAME
public static final java.lang.String REVIEW_ID
public static final java.lang.String REVIEW_INITIATOR
public static final java.lang.String REVIEW_DESCRIPTION
public static final java.lang.String REVIEW_PROJECT_NAME
public static final java.lang.String REVIEW_GROUP
public static final java.lang.String REVIEW_DEADLINE
public static final java.lang.String UNDER_REVIEW
public static final java.lang.String REVIEW_CONTAINER_NODE_NAME
public static final java.lang.String REVIEW_TASKS_PATH
public static boolean isTaskEligibleForUpdate(Status status)
status
- task statuspublic static java.lang.Boolean isMemberOfGroup(java.lang.String groupId, java.lang.String userId, ResourceResolver resourceResolver) throws FormsNDocumentsException, RepositoryException
groupId
- userId
- resourceResolver
- FormsNDocumentsException
RepositoryException
public static java.util.List<java.lang.String> getGroupMembers(java.lang.String groupId, ResourceResolver resourceResolver) throws FormsNDocumentsException, RepositoryException
groupId
- resourceResolver
- FormsNDocumentsException
RepositoryException
public static java.util.List<Task> getProjectSubTasks(java.lang.String reviewProjectName, ResourceResolver resourceResolver) throws FormsNDocumentsException, TaskManagerException
reviewProjectName
- resourceResolver
- FormsNDocumentsException
TaskManagerException
public static ResourceResolver getResourceResolver(Session session, ResourceResolverFactory resourceResolverFactory) throws LoginException
session
- resourceResolverFactory
- LoginException
public static Node getNode(java.lang.String assetPath, ResourceResolver resourceResolver) throws FormsNDocumentsException
assetPath
- resourceResolver
- FormsNDocumentsException
public static void removeGroup(java.lang.String groupName, ResourceResolver resourceResolver) throws FormsNDocumentsException, RepositoryException
groupName
- resourceResolver
- FormsNDocumentsException
RepositoryException
public static Group createGroup(java.lang.String groupName, java.lang.String relativePath, ResourceResolver resourceResolver) throws FormsNDocumentsException, RepositoryException
groupName
- resourceResolver
- FormsNDocumentsException
RepositoryException
public static void addUserToGroup(java.lang.String reviewer, java.lang.String reviewGroupId, ResourceResolver resourceResolver) throws FormsNDocumentsException, RepositoryException
reviewer
- reviewGroupId
- resourceResolver
- FormsNDocumentsException
RepositoryException
public static void removeUserFromGroup(java.lang.String reviewer, java.lang.String reviewGroupId, ResourceResolver resourceResolver) throws FormsNDocumentsException, RepositoryException
reviewer
- reviewGroupId
- resourceResolver
- FormsNDocumentsException
RepositoryException
public static Task createProject(java.lang.String reviewName, java.lang.String assetPath, java.lang.String deadline, java.lang.String assignee, ResourceResolver bundleResourceResolver, ResourceResolver resourceResolver) throws FormsNDocumentsException, TaskManagerException
reviewName
- assetPath
- deadline
- assignee
- bundleResourceResolver
- resourceResolver
- FormsNDocumentsException
TaskManagerException
public static void terminateProjectActiveTasks(java.lang.String reviewProjectName, ResourceResolver resourceResolver) throws FormsNDocumentsException, TaskManagerException
reviewProjectName
- resourceResolver
- FormsNDocumentsException
TaskManagerException
public static void updateProjectDeadline(java.lang.String reviewProjectName, java.lang.String deadline, ResourceResolver resourceResolver) throws FormsNDocumentsException, TaskManagerException
reviewProjectName
- deadline
- resourceResolver
- FormsNDocumentsException
TaskManagerException
public static void updateProjectDescription(java.lang.String reviewProjectName, java.lang.String description, ResourceResolver resourceResolver) throws TaskManagerException
reviewProjectName
- description
- resourceResolver
- TaskManagerException
public static Task createTask(java.lang.String reviewProjectName, java.lang.String reviewName, java.lang.String deadline, java.lang.String reviewer, java.lang.String assetPath, java.lang.String reviewDescription, ResourceResolver bundleResourceResolver, ResourceResolver resourceResolver) throws FormsNDocumentsException, TaskManagerException
reviewProjectName
- reviewName
- deadline
- reviewer
- assetPath
- reviewDescription
- bundleResourceResolver
- resourceResolver
- FormsNDocumentsException
TaskManagerException
public static boolean isInArray(java.lang.String searchId, java.lang.String[] idArray)
searchId
- idArray
- public static void checkCreateReviewArguments(java.lang.String reviewName, java.lang.String[] reviewerList, java.lang.String deadline, ResourceResolver resourceResolver) throws FormsNDocumentsException
reviewName
- reviewerList
- deadline
- resourceResolver
- FormsNDocumentsException
public static void checkUpdateReviewArguments(java.lang.String[] reviewerList, java.lang.String deadline, ResourceResolver bundleResourceResolver) throws FormsNDocumentsException
reviewerList
- deadline
- bundleResourceResolver
- fnd-service system user resource resolverFormsNDocumentsException
public static void checkReviewDeadlineArgument(java.lang.String deadline) throws FormsNDocumentsException
deadline
- FormsNDocumentsException
public static void checkAssetPathArgument(java.lang.String assetPath) throws FormsNDocumentsException
assetPath
- FormsNDocumentsException
public static Node checkNodeExistance(java.lang.String assetPath, ResourceResolver resourceResolver) throws FormsNDocumentsException
assetPath
- resourceResolver
- FormsNDocumentsException
Copyright © 2010 - 2020 Adobe. All Rights Reserved