1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package fr.paris.lutece.plugins.workflow.modules.extendfeedback.web;
35
36 import java.util.HashMap;
37 import java.util.Locale;
38 import java.util.Map;
39
40 import javax.inject.Inject;
41 import javax.inject.Named;
42 import javax.servlet.http.HttpServletRequest;
43
44 import org.apache.commons.lang3.StringUtils;
45
46 import fr.paris.lutece.plugins.extend.modules.feedback.util.constants.StatusFeedbackEnum;
47 import fr.paris.lutece.plugins.workflow.modules.extendfeedback.util.WfExtendFeedbackConstants;
48 import fr.paris.lutece.plugins.workflow.web.task.NoFormTaskComponent;
49 import fr.paris.lutece.plugins.workflowcore.service.config.ITaskConfigService;
50 import fr.paris.lutece.plugins.workflowcore.service.task.ITask;
51 import fr.paris.lutece.portal.service.template.AppTemplateService;
52 import fr.paris.lutece.util.html.HtmlTemplate;
53
54
55
56
57
58
59 public class UpdateStatusFeedbackTaskComponent extends NoFormTaskComponent
60 {
61
62 private static final String TEMPLATE_CONFIG = "admin/plugins/workflow/modules/extendfeedback/update_status_task_config_form.html";
63
64 @Inject
65 @Named( WfExtendFeedbackConstants.BEAN_TASK_CONFIG_SERVICE )
66 private ITaskConfigService _taskConfigService;
67
68 @Override
69 public String getDisplayConfigForm( HttpServletRequest request, Locale locale, ITask task )
70 {
71 Map<String, Object> model = new HashMap<>( );
72
73 model.put( WfExtendFeedbackConstants.MARK_STATUS_LIST, StatusFeedbackEnum.getReferenceList( false ) );
74 model.put( WfExtendFeedbackConstants.MARK_CONFIG, _taskConfigService.findByPrimaryKey( task.getId( ) ) );
75
76 HtmlTemplate html = AppTemplateService.getTemplate( TEMPLATE_CONFIG, locale, model );
77
78 return html.getHtml( );
79 }
80
81 @Override
82 public String getDisplayTaskInformation( int nIdHistory, HttpServletRequest request, Locale locale, ITask task )
83 {
84 return StringUtils.EMPTY;
85 }
86
87 }