2020import org .apache .commons .lang3 .StringUtils ;
2121import org .apache .logging .log4j .LogManager ;
2222import org .apache .logging .log4j .Logger ;
23+ import org .jetbrains .annotations .NotNull ;
2324import org .labkey .api .action .ConfirmAction ;
2425import org .labkey .api .action .SimpleRedirectAction ;
2526import org .labkey .api .action .SpringActionController ;
@@ -70,23 +71,27 @@ public ClusterController()
7071 }
7172
7273 @ RequiresPermission (AdminPermission .class )
73- public class RunTestPipelineAction extends ConfirmAction <Object >
74+ public static class RunTestPipelineAction extends ConfirmAction <Object >
7475 {
76+ @ Override
7577 public void validateCommand (Object form , Errors errors )
7678 {
7779
7880 }
7981
82+ @ Override
8083 public URLHelper getSuccessURL (Object form )
8184 {
8285 return getContainer ().getStartURL (getUser ());
8386 }
8487
88+ @ Override
8589 public ModelAndView getConfirmView (Object form , BindException errors ) throws Exception
8690 {
8791 return new HtmlView ("This will run a very simple test pipeline job against all configured cluster engines. This is designed to help make sure your site's configuration is functional. Do you want to continue?<br><br>" );
8892 }
8993
94+ @ Override
9095 public boolean handlePost (Object form , BindException errors ) throws Exception
9196 {
9297 for (RemoteExecutionEngine e : PipelineJobService .get ().getRemoteExecutionEngines ())
@@ -104,16 +109,19 @@ public boolean handlePost(Object form, BindException errors) throws Exception
104109 @ RequiresSiteAdmin
105110 public class ForcePipelineCancelAction extends ConfirmAction <JobIdsForm >
106111 {
112+ @ Override
107113 public void validateCommand (JobIdsForm form , Errors errors )
108114 {
109115
110116 }
111117
112- public URLHelper getSuccessURL (JobIdsForm form )
118+ @ Override
119+ public @ NotNull URLHelper getSuccessURL (JobIdsForm form )
113120 {
114121 return PageFlowUtil .urlProvider (PipelineStatusUrls .class ).urlBegin (getContainer ());
115122 }
116123
124+ @ Override
117125 public ModelAndView getConfirmView (JobIdsForm form , BindException errors ) throws Exception
118126 {
119127
@@ -122,6 +130,7 @@ public ModelAndView getConfirmView(JobIdsForm form, BindException errors) throws
122130 "<label>Enter Job ID(s): </label><input name=\" jobIds\" value = \" " + HtmlString .of (form .getJobIds ()) + "\" ><br>" ));
123131 }
124132
133+ @ Override
125134 public boolean handlePost (JobIdsForm form , BindException errors ) throws Exception
126135 {
127136 String jobIDs = StringUtils .trimToNull (form .getJobIds ());
@@ -206,16 +215,19 @@ public void setFilePath(String filePath)
206215 @ RequiresSiteAdmin
207216 public class ResetPipelineJobLogFileAction extends ConfirmAction <ResetPipelineJobLogFileForm >
208217 {
218+ @ Override
209219 public void validateCommand (ResetPipelineJobLogFileForm form , Errors errors )
210220 {
211221
212222 }
213223
224+ @ Override
214225 public URLHelper getSuccessURL (ResetPipelineJobLogFileForm form )
215226 {
216227 return PageFlowUtil .urlProvider (PipelineStatusUrls .class ).urlBegin (getContainer ());
217228 }
218229
230+ @ Override
219231 public ModelAndView getConfirmView (ResetPipelineJobLogFileForm form , BindException errors ) throws Exception
220232 {
221233 return new HtmlView (HtmlString .unsafe ("This will change the PipelineJob log file path for the selected job to the path below." +
@@ -266,25 +278,29 @@ public boolean handlePost(ResetPipelineJobLogFileForm form, BindException errors
266278 }
267279
268280 @ RequiresPermission (AdminPermission .class )
269- public class RecoverCompletedJobsAction extends ConfirmAction <JobIdsForm >
281+ public static class RecoverCompletedJobsAction extends ConfirmAction <JobIdsForm >
270282 {
283+ @ Override
271284 public void validateCommand (JobIdsForm form , Errors errors )
272285 {
273286
274287 }
275288
289+ @ Override
276290 public URLHelper getSuccessURL (JobIdsForm form )
277291 {
278292 return PageFlowUtil .urlProvider (PipelineStatusUrls .class ).urlBegin (getContainer ());
279293 }
280294
295+ @ Override
281296 public ModelAndView getConfirmView (JobIdsForm form , BindException errors ) throws Exception
282297 {
283298 return new HtmlView (HtmlString .unsafe ("This will attempt to re-queue existing pipeline jobs using their serialized JSON text files. It is intended as a workaround for the situation where a job has been marked complete." +
284299 "To continue, enter a comma-delimited list of Job IDs and hit submit:<br><br>" +
285300 "<label>Enter Job ID(s): </label><input name=\" jobIds\" value=\" " + HtmlString .of (form .getJobIds ()) + "\" ><br>" ));
286301 }
287302
303+ @ Override
288304 public boolean handlePost (JobIdsForm form , BindException errors ) throws Exception
289305 {
290306 String jobIDs = StringUtils .trimToNull (form .getJobIds ());
0 commit comments