public class WorkflowTasksComponent extends AbstractLogEnabled implements Component, ThreadSafe, Configurable, Serviceable
| Modifier and Type | Class and Description | 
|---|---|
class  | 
WorkflowTasksComponent.LastModifiedDateComparator
Compares two contents on the last modified date. 
 | 
class  | 
WorkflowTasksComponent.Task
Class representing a task. 
 | 
class  | 
WorkflowTasksComponent.TaskStep
Class representing a task step. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
protected boolean | 
_allowUserQuery
Allow user querying ? 
 | 
protected ContentHelper | 
_contentHelper
The content helper 
 | 
protected ContentTypesHelper | 
_contentTypesHelper
Helper for content types 
 | 
protected ContentTypeExtensionPoint | 
_cTypeEP
The content type extension point. 
 | 
protected LanguagesManager | 
_languagesManager
The languages manager 
 | 
protected AmetysObjectResolver | 
_objectResolver
The ametys object resolver. 
 | 
protected RightManager | 
_rightManager
The rights manager. 
 | 
protected Map<String,WorkflowTasksComponent.Task> | 
_tasks
The configured task map, indexed by id. 
 | 
protected UserManager | 
_userManager
The users manager. 
 | 
protected WorkflowProvider | 
_workflowProvider
The  
WorkflowProvider | 
static String | 
ROLE
The avalon role. 
 | 
| Constructor and Description | 
|---|
WorkflowTasksComponent()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected Set<Integer> | 
_configureStepIds(Configuration stepConf)
Configure the step IDs. 
 | 
protected Map<String,WorkflowTasksComponent.Task> | 
_configureTasks(Configuration tasksConf)
Configure the tasks. 
 | 
protected AmetysObjectIterable<Content> | 
_getContents(WorkflowTasksComponent.TaskStep step,
            User user)
Get the contents for a step. 
 | 
protected Map<WorkflowTasksComponent.Task,Collection<Content>> | 
_getCorrespondingWorkflows(User user)
Get the workflows for a user. 
 | 
protected Collection<Content> | 
_getTaskContents(User user,
                WorkflowTasksComponent.Task task)
Get a task's contents. 
 | 
protected Collection<Content> | 
_getTaskContents(User user,
                WorkflowTasksComponent.Task task,
                int limit)
Get a task's contents. 
 | 
protected void | 
_saxAdditionalAttributes(Content content,
                        AttributesImpl attrs)
SAX additional attributes 
 | 
protected void | 
_saxAdditionalAttributes(WorkflowTasksComponent.Task task,
                        AttributesImpl attrs)
SAX additional attributes 
 | 
protected void | 
_saxContent(ContentHandler ch,
           Content content)
SAX a content. 
 | 
protected void | 
_saxContentCurrentState(ContentHandler ch,
                       WorkflowAwareContent content)
SAX workflow current step of a  
Content | 
protected void | 
_saxTask(ContentHandler ch,
        WorkflowTasksComponent.Task task,
        Collection<Content> contents)
SAX a task 
 | 
protected boolean | 
_testContent(Content content,
            UserIdentity user,
            Set<String> rights)
Test if the content is valid. 
 | 
boolean | 
allowUserQuery()
Allow user query ? 
 | 
void | 
configure(Configuration configuration)
Configure the tasks and steps handled by this component. 
Need the following configuration: <tasks> <task label="i18n-label"> <step id="3" rights="proposal,validation"> <step id="4" rights="validation"> ... </task> ... </tasks>  | 
Collection<Content> | 
getContents(User user,
           String taskId,
           int limit)
Get the list of contents for a given user and task. 
 | 
Map<String,WorkflowTasksComponent.Task> | 
getTasks()
Get the list of tasks managed by this component. 
 | 
void | 
service(ServiceManager manager)  | 
void | 
toSAX(ContentHandler ch,
     User user)
SAX the contents for given user 
 | 
void | 
toSAX(ContentHandler ch,
     User user,
     String taskId)
SAX the contents for given user and task 
 | 
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected AmetysObjectResolver _objectResolver
protected RightManager _rightManager
protected UserManager _userManager
protected ContentTypeExtensionPoint _cTypeEP
protected ContentTypesHelper _contentTypesHelper
protected WorkflowProvider _workflowProvider
WorkflowProviderprotected ContentHelper _contentHelper
protected LanguagesManager _languagesManager
protected Map<String,WorkflowTasksComponent.Task> _tasks
protected boolean _allowUserQuery
public WorkflowTasksComponent()
public void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void configure(Configuration configuration) throws ConfigurationException
configure in interface Configurableconfiguration - The configuration as described above.ConfigurationException - If the configuration is invalid.public boolean allowUserQuery()
public void toSAX(ContentHandler ch, User user) throws SAXException
ch - the content handler to SAX intouser - the userSAXException - If an error occurredpublic void toSAX(ContentHandler ch, User user, String taskId) throws SAXException
ch - the content handler to SAX intouser - the usertaskId - the task idSAXException - If an error occurredpublic Map<String,WorkflowTasksComponent.Task> getTasks()
public Collection<Content> getContents(User user, String taskId, int limit) throws AmetysRepositoryException
user - the user.taskId - the task ID.limit - the maximum number of results, 0 for all.AmetysRepositoryException - If an error occurredprotected void _saxTask(ContentHandler ch, WorkflowTasksComponent.Task task, Collection<Content> contents) throws SAXException
ch - the content handler to SAX intotask - the task to SAXcontents - the contentsSAXException - if an error occurred while SAXingprotected void _saxAdditionalAttributes(WorkflowTasksComponent.Task task, AttributesImpl attrs) throws SAXException
task - the taskattrs - the attributesSAXException - If an error occurredprotected void _saxContent(ContentHandler ch, Content content) throws SAXException, RepositoryException
ch - the content handler.content - the content to sax.SAXException - If an error occurredRepositoryException - If an error occurredprotected void _saxAdditionalAttributes(Content content, AttributesImpl attrs) throws SAXException
content - the contentattrs - the attributesSAXException - If an error occurredprotected Map<WorkflowTasksComponent.Task,Collection<Content>> _getCorrespondingWorkflows(User user)
user - the user.protected Collection<Content> _getTaskContents(User user, WorkflowTasksComponent.Task task)
user - the user.task - the task.protected Collection<Content> _getTaskContents(User user, WorkflowTasksComponent.Task task, int limit)
user - the user.task - the task.limit - the maximum number of contents (0 to return all).protected AmetysObjectIterable<Content> _getContents(WorkflowTasksComponent.TaskStep step, User user)
step - the step.user - the user.protected boolean _testContent(Content content, UserIdentity user, Set<String> rights)
content - the content to test.user - the user.rights - the rights to test.protected Map<String,WorkflowTasksComponent.Task> _configureTasks(Configuration tasksConf) throws ConfigurationException
tasksConf - the tasks root configuration.ConfigurationException - if a configuration error occurs.protected Set<Integer> _configureStepIds(Configuration stepConf) throws ConfigurationException
stepConf - the step configuration.ConfigurationException - If an error occurredprotected void _saxContentCurrentState(ContentHandler ch, WorkflowAwareContent content) throws SAXException, RepositoryException
Contentch - the content handler.content - The contentSAXException - if an error occurs while SAXingRepositoryException - if an error occurs while retrieving current step