public class WorkspaceTaskDAO extends JCRTasksDAO implements PluginAware, Contextualizable
JCRTasksDAO.TaskListResult| Modifier and Type | Field and Description |
|---|---|
private Context |
_context |
private HTMLTransformer |
_htmlTransformer |
private WorkspaceModuleExtensionPoint |
_moduleEP |
private String |
_pluginName |
private ProjectManager |
_projectManager |
private SourceResolver |
_sourceResolver |
static String |
ROLE
The Avalon role
|
_currentUserProvider, _explorerResourcesDAO, _observationManager, _resolver, _rightManager, _userHelper, _userManager, RIGHTS_ADD_TASK, RIGHTS_DELETE_ALL_TASK, RIGHTS_DELETE_TASK, RIGHTS_EDIT_TASK, RIGHTS_VIEW_TASKS| Constructor and Description |
|---|
WorkspaceTaskDAO() |
| Modifier and Type | Method and Description |
|---|---|
private String |
_getProjectFromRequest() |
protected Map<String,String> |
_projectToJson(Project project)
Retrieve the project JSON data
|
private List<String> |
_projectToTaskList(List<String> projectNames)
Retrieves the list of
TasksList |
Map<String,Object> |
addTask(Map<String,Object> parameters)
Add a new task to the current project
|
void |
contextualize(Context context) |
protected Project |
getParentProject(Task task)
Get the parent project of a task
|
JCRTasksDAO.TaskListResult |
getProjectTaskList(List<String> projectNames,
boolean assignedToUser,
boolean userSubscribed,
Integer offset,
Integer limit,
String filter,
String orderBy,
Boolean orderAsc)
Get the list of tasks
|
Map<String,Object> |
getProjectTasks(boolean assignedToUser,
boolean userSubscribed,
Integer offset,
Integer limit,
String filter,
String orderBy,
Boolean orderAsc)
Get the tasks of the current project
|
Map<String,Object> |
getProjectTasks(List<String> projectNames,
boolean assignedToUser,
boolean userSubscribed,
Integer offset,
Integer limit,
String filter,
String orderBy,
Boolean orderAsc)
Get the list of tasks
|
protected Map<String,Object> |
getTask(Task task,
boolean isEdition)
Transform a task to JSON data
|
protected String |
getTaskDescription(Task task)
Get the description of a task as a String
|
protected String |
getTaskDescriptionForEdition(Task task)
Get the description of a task to edit as a String
|
void |
service(ServiceManager manager) |
void |
setPluginInfo(String pluginName,
String featureName,
String id)
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level. |
protected void |
setTaskDescription(ModifiableTask task,
String description)
Update the description of a task
|
_assignmentToJSON, _setTaskParameters, _subscribersToJSON, addTask, assignTasks, deleteTasks, editTask, getTask, getTaskList, getTasks, getTasksXpathQuery, setTasksProgress, setTasksStatusgetLogger, setLoggerprivate HTMLTransformer _htmlTransformer
private SourceResolver _sourceResolver
private ProjectManager _projectManager
private String _pluginName
private WorkspaceModuleExtensionPoint _moduleEP
public WorkspaceTaskDAO()
public void service(ServiceManager manager) throws ServiceException
service in interface Serviceableservice in class JCRTasksDAOServiceExceptionpublic void setPluginInfo(String pluginName, String featureName, String id)
PluginAwaresetPluginInfo in interface PluginAwarepluginName - Unique identifier for the plugin hosting the extensionfeatureName - Unique feature identifier (unique for a given pluginName)id - Unique identifier of this componentpublic void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic Map<String,Object> addTask(Map<String,Object> parameters) throws IllegalAccessException
parameters - The task parametersIllegalAccessException - If an error occurspublic JCRTasksDAO.TaskListResult getProjectTaskList(List<String> projectNames, boolean assignedToUser, boolean userSubscribed, Integer offset, Integer limit, String filter, String orderBy, Boolean orderAsc) throws ProcessingException
projectNames - The project that contain the tasks. Can be null to search in all project.assignedToUser - Filter only the tasks assigned to the current useruserSubscribed - Filter only the tasks for which current user subscribedoffset - Offset the list of resultslimit - The maximum number of results to returnfilter - Return only tasks matching the filterorderBy - Order the list by this property. Default to the creation dateorderAsc - Sort the list by order ascendant or descendant. Default to ascendant.JCRTasksDAO.TaskListResult objectProcessingException - If an error occurredpublic Map<String,Object> getProjectTasks(List<String> projectNames, boolean assignedToUser, boolean userSubscribed, Integer offset, Integer limit, String filter, String orderBy, Boolean orderAsc) throws ProcessingException
projectNames - The project that contain the tasks. Can be null to search in all project.assignedToUser - Filter only the tasks assigned to the current useruserSubscribed - Filter only the tasks for which current user subscribedoffset - Offset the list of resultslimit - The maximum number of results to returnfilter - Return only tasks matching the filterorderBy - Order the list by this property. Default to the creation dateorderAsc - Sort the list by order ascendant or descendant. Default to ascendant.ProcessingException - If an error occurredprivate List<String> _projectToTaskList(List<String> projectNames)
TasksListprojectNames - The project namespublic Map<String,Object> getProjectTasks(boolean assignedToUser, boolean userSubscribed, Integer offset, Integer limit, String filter, String orderBy, Boolean orderAsc) throws IllegalAccessException, ProcessingException
assignedToUser - True to filter only the tasks assigned to the current useruserSubscribed - Filter only the tasks for which current user subscribedoffset - Start the list of tasks at the Nth task, used for paginationlimit - Only return a maximum of N tasks, used for paginationfilter - Return only tasks matching the filterorderBy - Order the list by this property. Default to the creation dateorderAsc - Sort the list by order ascendant or descendant. Default to ascendant.IllegalAccessException - If the user is not authorizedProcessingException - If an error occurredprotected void setTaskDescription(ModifiableTask task, String description)
JCRTasksDAOsetTaskDescription in class JCRTasksDAOtask - The task to updatedescription - The description as stringprotected String getTaskDescription(Task task) throws AmetysRepositoryException
JCRTasksDAOgetTaskDescription in class JCRTasksDAOtask - the taskAmetysRepositoryException - if failed to parse descriptionprotected String getTaskDescriptionForEdition(Task task) throws AmetysRepositoryException
JCRTasksDAOgetTaskDescriptionForEdition in class JCRTasksDAOtask - the taskAmetysRepositoryException - if failed to parse descriptionprotected Map<String,Object> getTask(Task task, boolean isEdition)
JCRTasksDAOgetTask in class JCRTasksDAOtask - The taskisEdition - true to get the task in edit modeprotected Project getParentProject(Task task)
task - The tasknull if not foundprotected Map<String,String> _projectToJson(Project project)
project - The projectprivate String _getProjectFromRequest()