Class ListJobsCommand
- java.lang.Object
-
- com.sun.enterprise.v3.admin.commands.ListJobsCommand
-
- All Implemented Interfaces:
AdminCommand,AdminCommandSecurity.AccessCheckProvider
@Service(name="list-jobs") @PerLookup public class ListJobsCommand extends Object implements AdminCommand, AdminCommandSecurity.AccessCheckProvider
This command will list the jobs related information Currently it prints the jobId, name, time of execution,user and the state- Author:
- Bhakti Mehta
-
-
Field Summary
Fields Modifier and Type Field Description static StringCODEstatic StringCOMPLETION_DATEstatic StringDATEstatic StringIDstatic StringMESSAGEstatic StringNAMEstatic StringSTATEprotected static StringTITLE_EXITCODEprotected static StringTITLE_JOBIDprotected static StringTITLE_NAMEprotected static StringTITLE_NONEprotected static StringTITLE_STATEprotected static StringTITLE_TIMEprotected static StringTITLE_USERstatic StringUSER
-
Constructor Summary
Constructors Constructor Description ListJobsCommand()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckScope(Job job)voiddisplay(Collection<JobInfo> jobInfoList, AdminCommandContext context)voidexecute(AdminCommandContext context)Executes the command with the command parameters passed as Properties where the keys are the parameter names and the values are the parameter valuesCollection<? extends AccessRequired.AccessCheck>getAccessChecks()Returns theAccessChecks the command has computed at runtime which should be included in the authorization, added to checks that secure admin infers from the command's CRUD or RestEndpoint characteristics orAccessRequiredannotations.protected JobInfogetCompletedJobForId(String jobID)protected JobInfosgetCompletedJobs()protected booleanisJobEligible(Job job)protected booleanisSingleJobOK(Job singleJob)static booleanskipJob(String name)
-
-
-
Field Detail
-
TITLE_NAME
protected static final String TITLE_NAME
- See Also:
- Constant Field Values
-
TITLE_JOBID
protected static final String TITLE_JOBID
- See Also:
- Constant Field Values
-
TITLE_TIME
protected static final String TITLE_TIME
- See Also:
- Constant Field Values
-
TITLE_STATE
protected static final String TITLE_STATE
- See Also:
- Constant Field Values
-
TITLE_EXITCODE
protected static final String TITLE_EXITCODE
- See Also:
- Constant Field Values
-
TITLE_USER
protected static final String TITLE_USER
- See Also:
- Constant Field Values
-
TITLE_NONE
protected static final String TITLE_NONE
- See Also:
- Constant Field Values
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
DATE
public static final String DATE
- See Also:
- Constant Field Values
-
CODE
public static final String CODE
- See Also:
- Constant Field Values
-
USER
public static final String USER
- See Also:
- Constant Field Values
-
STATE
public static final String STATE
- See Also:
- Constant Field Values
-
MESSAGE
public static final String MESSAGE
- See Also:
- Constant Field Values
-
COMPLETION_DATE
public static final String COMPLETION_DATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCompletedJobs
protected JobInfos getCompletedJobs()
-
isSingleJobOK
protected boolean isSingleJobOK(Job singleJob)
-
isJobEligible
protected boolean isJobEligible(Job job)
-
checkScope
protected boolean checkScope(Job job)
-
execute
public void execute(AdminCommandContext context)
Description copied from interface:AdminCommandExecutes the command with the command parameters passed as Properties where the keys are the parameter names and the values are the parameter values- Specified by:
executein interfaceAdminCommand- Parameters:
context- information
-
skipJob
public static boolean skipJob(String name)
-
getAccessChecks
public Collection<? extends AccessRequired.AccessCheck> getAccessChecks()
Description copied from interface:AdminCommandSecurity.AccessCheckProviderReturns theAccessChecks the command has computed at runtime which should be included in the authorization, added to checks that secure admin infers from the command's CRUD or RestEndpoint characteristics orAccessRequiredannotations.- Specified by:
getAccessChecksin interfaceAdminCommandSecurity.AccessCheckProvider- Returns:
- the
AccessChecks
-
display
public void display(Collection<JobInfo> jobInfoList, AdminCommandContext context)
-
-