View Javadoc
1   package fr.paris.lutece.plugins.workflow.modules.releaser.service;
2   
3   import java.util.Locale;
4   
5   import javax.inject.Inject;
6   import javax.servlet.http.HttpServletRequest;
7   
8   import org.apache.commons.lang.StringUtils;
9   
10  
11  import fr.paris.lutece.plugins.releaser.business.WorkflowReleaseContext;
12  import fr.paris.lutece.plugins.releaser.service.IWorkflowReleaseContextService;
13  import fr.paris.lutece.plugins.workflowcore.business.resource.ResourceHistory;
14  import fr.paris.lutece.plugins.workflowcore.service.resource.IResourceHistoryService;
15  import fr.paris.lutece.plugins.workflowcore.service.task.SimpleTask;
16  
17  /**
18   * 
19   * TaskGitCloneRepository
20   *
21   */
22  public class TaskReleasePrepareSite extends  SimpleTask {
23  
24  	@Inject
25      private IResourceHistoryService _resourceHistoryService;
26  	@Inject
27      private IWorkflowReleaseContextService _workflowReleaseContextService;
28  	
29      /**
30       * {@inheritDoc}
31       */
32      @Override
33      public void processTask( int nIdResourceHistory, HttpServletRequest request, Locale locale )
34      {
35          ResourceHistory resourceHistory = _resourceHistoryService.findByPrimaryKey( nIdResourceHistory );
36          WorkflowReleaseContext workflowReleaseContext=_workflowReleaseContextService.getWorkflowReleaseContext(resourceHistory.getIdResource());
37          _workflowReleaseContextService.releasePrepareSite( workflowReleaseContext, locale );
38      }
39  
40      /**
41      * {@inheritDoc}
42      */
43      @Override
44      public String getTitle( Locale locale )
45      {
46          return StringUtils.EMPTY;
47      }
48  	
49  	
50  
51  }