View Javadoc
1   package fr.paris.lutece.plugins.workflow.modules.state.service;
2   
3   import java.util.List;
4   
5   import fr.paris.lutece.plugins.workflow.modules.state.business.config.ChooseStateTaskConfig;
6   import fr.paris.lutece.plugins.workflow.modules.state.util.IResourceController;
7   import fr.paris.lutece.plugins.workflowcore.business.resource.ResourceWorkflow;
8   import fr.paris.lutece.plugins.workflowcore.service.task.ITask;
9   import fr.paris.lutece.util.ReferenceList;
10  
11  /**
12   * Service for IChooseStateTask
13   */
14  public interface IChooseStateTaskService
15  {
16  
17      /**
18       * Get the list of states
19       * 
20       * @param nIdAction
21       *            the id action
22       * @return a ReferenceList
23       */
24      ReferenceList getListStates( int nIdAction );
25  
26      /**
27       * Get the list of implemented {@link IResourceController}
28       * 
29       * @return
30       */
31      List<IResourceController> getControllerList( );
32  
33      /**
34       * Load config of task.
35       * 
36       * @param task
37       * @return
38       */
39      ChooseStateTaskConfig loadConfig( ITask task );
40  
41      /**
42       * Get the controller defined in the config.
43       * 
44       * @return
45       */
46      IResourceController getController( ChooseStateTaskConfig config );
47  
48      /**
49       * Change resource state.
50       * 
51       * @param task
52       * @param nIdResource
53       * @param strResourceType
54       * @param nIdWorkflow
55       * @param newState
56       */
57      void doChangeState( ITask task, int nIdResource, String strResourceType, int nIdWorkflow, int newState );
58  
59      ResourceWorkflow getResourceByHistory( int nIdHistory, int nIdWorkflow );
60  }