|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.BasicItem<D> net.sf.basedb.core.OwnedItem<JobData> net.sf.basedb.core.Job
public class Job
This class represents the execution of a job. Normally a job is executed by
a plugin, but it can also be executed by an external program. To find the
type of the job check the getJobType()
method. Many of the methods
in this class only apply to jobs of one of the types. The following methods can
only be used on jobs that are executed by a plugin:
configure(GuiContext)
: Starts the configuration sequence of the job
execute(ProgressReporter, String)
: Starts executing the job
start(String, String)
: Tell the core that job has started
setProgress(int, String)
: Update the progress status of the job
doneOk(String)
: Tell the core that the job finished successfully
doneError(String)
: Thell the core that the job finished with an error
Nested Class Summary | |
---|---|
static class |
Job.ExecutionTime
A rough estimate of the execution time of a job. |
private class |
Job.JobSignalTransporter
Wrapper for the signal transporter that intercepts the ABORT signal and changes the job's status to ABORTING. |
(package private) static class |
Job.ProgressReporterImpl
Implements the ProgressReporter interface and stores the percentage completed for the current job. |
static class |
Job.Status
The status of a job. |
static class |
Job.Type
The type of job. |
Nested classes/interfaces inherited from interface net.sf.basedb.core.Transactional |
---|
Transactional.Action |
Field Summary | |
---|---|
static int |
MAX_SERVER_LENGTH
The maximum allowed length of the server name. |
static int |
MAX_STACK_TRACE_LENGTH
The maximum allowed length of the stack trace message. |
static int |
MAX_STATUS_MESSAGE_LENGTH
The maximum allowed length of the status message. |
private Job.JobSignalTransporter |
signalTransporter
|
static Item |
TYPE
The type of item represented by this class. |
Fields inherited from interface net.sf.basedb.core.Nameable |
---|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH |
Constructor Summary | |
---|---|
Job(JobData jobData)
|
Method Summary | |
---|---|
PluginConfigurationRequest |
configure(GuiContext context)
Start the configuration sequence for a job. |
(package private) void |
continueLater(String executeCommand,
boolean isShuttingDown)
This method is used to indicate that a job had to be aborted due to a system shutdown. |
void |
copyParametersFrom(Job copyFrom)
Copy all parameter values from another job. |
void |
doneError(String statusMessage)
Register the job as completed with an error. |
void |
doneError(String statusMessage,
Collection<? extends Throwable> errors)
Register the job as completed with an error. |
void |
doneOk(String statusMessage)
Register the job as successfully completed. |
PluginExecutionRequest |
execute(ProgressReporter progress,
String server)
Start the execution sequence for a job. |
PluginExecutionRequest |
execute(ProgressReporter progress,
String server,
JobAgentSettings settings)
Start the execution sequence for a job. |
int |
getActiveProjectId()
The ID of the project that should be made the active project while running this job. |
static Job |
getById(DbControl dc,
int id)
Get a Job item when you know the id. |
Date |
getCreated()
Get the date and time the job was registered in the database. |
String |
getDescription()
Get the description for the item. |
Date |
getEnded()
Get the date and time the job ended. |
Job.ExecutionTime |
getEstimatedExecutionTime()
Get the estimated execution time of the job. |
Experiment |
getExperiment()
Get the experiment this job is a part of. |
JobAgent |
getJobAgent()
Get the job agent this job should run on, is running on or was running on. |
Job.Type |
getJobType()
Get the type of job, ie. if it is a job executed by a plugin or not. |
GuiContext |
getLastGuiContext()
Get the gui-context that was active when this job was created. |
String |
getName()
Get the name of the item. |
static Job |
getNew(DbControl dc,
PluginDefinition plugin,
PluginConfiguration config)
Deprecated. Use getNew(DbControl, PluginDefinition, PluginConfiguration, Experiment)
instead |
static Job |
getNew(DbControl dc,
PluginDefinition plugin,
PluginConfiguration config,
Experiment experiment)
Create a new Job item. |
ParameterInfo |
getParameterInfo(String name)
Get extra information about a parameter. |
Set<String> |
getParameterNames()
Get the names of all parameters for the job. |
Object |
getParameterValue(String name)
Get the value of a named parameter. |
List<?> |
getParameterValues(String name)
Get the values of a named parameter. |
(package private) ParameterValuesImpl |
getParameterValuesImpl()
Get a write-protected ParameterValuesImpl object. |
int |
getParameterVersion()
Get the version number of the configuration parameters used for this job. |
int |
getPercentComplete()
An estimate of the percentage of the work currently completed by an executing job. |
PluginConfiguration |
getPluginConfiguration()
Get the PluginConfiguration defining the plugin this job should execute. |
PluginDefinition |
getPluginDefinition()
Get the PluginConfiguration defining the plugin this job should execute. |
String |
getPluginVersion()
Get the version of the plugin used to execute this job at the time the job was executed or registered. |
int |
getPriority()
Get the priority of the job. |
ProgressReporter |
getProgressReporter(ProgressReporter chained)
Get a progress reporter that reports progress by updating the information in the database. |
static ItemQuery<Job> |
getQuery()
Get a query configured to retrieve |
boolean |
getRemoveJobWhenFinished()
If the job should flagged for deletion after it's done successfully. |
Date |
getScheduled()
Get the date and time the job was scheduled to the job queue. |
boolean |
getSendMessage()
If a message should be sent to the owner once the job has finished or not. |
String |
getServer()
Get the name of the server where the job is executing. |
SignalTransporter |
getSignalTransporter()
Create and initialise a signal transporter object that can be used to send signal to the plug-in running this job. |
String |
getStackTrace()
Get the stack trace in case the job ended with an error |
Date |
getStarted()
Get the date and time the job was started. |
Job.Status |
getStatus()
Get the status of the job. |
String |
getStatusMessage()
Get a message about the current status of the job. |
Item |
getType()
Get the type of item represented by the object. |
Set<ItemProxy> |
getUsingItems()
Get the transformation and raw bioassays using this job. |
boolean |
hasContext()
Checks if this job has saved information about the context that was active when this job was created. |
boolean |
hasSignalTransporter()
Checks if a signal transporter has been registered for this job or not. |
(package private) void |
initPermissions(int granted,
int denied)
Grant read permission if the logged in user has read permission to the experiment the job belongs to. |
boolean |
isDryRun()
Check if the job should be/was executed as a dry-run job. |
boolean |
isRemoved()
Check if the removed flag is set for this item. |
boolean |
isUsed()
Return TRUE if the status is EXECUTING or: a transformation is linked to this job a raw bioassay is linked to this job an array design is linked to this job FALSE otherwise. |
(package private) void |
onAfterCommit(Transactional.Action action)
If the Signal.ABORT signal is waiting to be sent send it. |
(package private) void |
onBeforeCommit(Transactional.Action action)
Set's the project id to the currently active project. |
void |
retry(boolean useLatestConfiguration)
Deprecated. Use retry(boolean, boolean) instead |
void |
retry(boolean useLatestConfiguration,
boolean clearDryRun)
Retry a job which finished with an error or a successful dry-run job. |
private void |
sendMessage()
Send a message to the owner of the job when the job has finished |
void |
setDescription(String description)
Set the description for the item. |
(package private) void |
setExperiment(Experiment experiment)
Set the experiment this job is part of. |
void |
setJobAgent(JobAgent agent)
Set the job agent this job should run on. |
void |
setName(String name)
Set the name of the item. |
void |
setParameterValue(String name,
ParameterType<?> parameterType,
Object value)
Set the value of a configuration parameter. |
void |
setParameterValue(String name,
String label,
String description,
ParameterType<?> parameterType,
Object value)
Set the value of a configuration parameter. |
void |
setParameterValues(String name,
ParameterType<?> parameterType,
List<?> values)
Set the value of a configuration parameter. |
void |
setParameterValues(String name,
String label,
String description,
ParameterType<?> parameterType,
List<?> values)
Set the value of a configuration parameter. |
(package private) void |
setParameterValuesInternal(String name,
String label,
String description,
ParameterType<?> parameterType,
List<?> values,
boolean validate)
Set the values of a configuration parameter. |
private void |
setPluginConfiguration(PluginConfiguration pluginConfiguration)
Set the plugin configuration of this job. |
private void |
setPluginDefinition(PluginDefinition plugin)
Set the plugin configuration of this job. |
void |
setPrepared(String server)
Deprecated. Use setPrepared(String, JobAgent) instead |
void |
setPrepared(String server,
JobAgent agent)
Set the job's status to Job.Status.PREPARED . |
void |
setPriority(int priority)
Set the priority of the job. |
void |
setProgress(int percentComplete,
String statusMessage)
Set the progress of the job. |
void |
setRemoved(boolean removed)
Set the removed flag for this item. |
void |
setRemoveJobWhenFinished(boolean removeJobWhenFinished)
Set if the job should be deleted after it has finished successfully. |
void |
setSendMessage(boolean sendMessage)
Set if a message should be sent to owner when the job finishes. |
void |
setSignalTransporter(Class<? extends SignalTransporter> clazz,
String initParams)
Set information needed to create a signal transporter object that can be used to send signals to the plug-in that is currently executing this job. |
void |
start(String statusMessage,
String server)
Deprecated. Use start(String, String, JobAgent) instead |
void |
start(String statusMessage,
String server,
JobAgent agent)
Register the job as started. |
Methods inherited from class net.sf.basedb.core.OwnedItem |
---|
getOwner, isOwner, setOwner, takeOwnership, toTransferable |
Methods inherited from class net.sf.basedb.core.BasicItem |
---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterInsert, onRollback, setDbControl, setProjectDefaults, toString, toTransferable, validate |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.basedb.core.Identifiable |
---|
getId, getVersion |
Methods inherited from interface net.sf.basedb.core.AccessControlled |
---|
checkPermission, getPermissions, hasPermission |
Field Detail |
---|
public static final Item TYPE
Item.JOB
,
getType()
private Job.JobSignalTransporter signalTransporter
public static final int MAX_STATUS_MESSAGE_LENGTH
public static final int MAX_STACK_TRACE_LENGTH
public static final int MAX_SERVER_LENGTH
Constructor Detail |
---|
Job(JobData jobData)
Method Detail |
---|
public static Job getNew(DbControl dc, PluginDefinition plugin, PluginConfiguration config) throws InvalidDataException, BaseException
getNew(DbControl, PluginDefinition, PluginConfiguration, Experiment)
instead
InvalidDataException
BaseException
public static Job getNew(DbControl dc, PluginDefinition plugin, PluginConfiguration config, Experiment experiment) throws InvalidDataException, BaseException
Job
item.
dc
- The DbControl
which will be used for
permission checking and database access.plugin
- The plugin this job should use.config
- The plugin configuration this job should use
or null if the job is executed by an external programexperiment
- The experiment the job is a part of, or null
if the job is not part of an experiment
Job
item
InvalidDataException
- If the specified plugin requires a configuration but the
config parameter is null
BaseException
- If there is an errorpublic static Job getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
Job
item when you know the id.
dc
- The DbControl
which will be used for
permission checking and database access.id
- The id of the item to load
Job
item
ItemNotFoundException
- If an item with the specified
id is not found
PermissionDeniedException
- If the logged in user doesn't
have read permission to the item
BaseException
- If there is another errorpublic static ItemQuery<Job> getQuery()
ItemQuery
objectpublic Item getType()
Identifiable
Item
enumeration.
getType
in interface Identifiable
public String getName()
Nameable
getName
in interface Nameable
String
with the name of the itempublic void setName(String name) throws PermissionDeniedException, InvalidDataException
Nameable
Nameable.MAX_NAME_LENGTH
constant.
setName
in interface Nameable
name
- The new name for the item
PermissionDeniedException
- If the logged in user doesn't
have write permission
InvalidDataException
- If the name is null or longer
than specified by the Nameable.MAX_NAME_LENGTH
constantpublic String getDescription()
Nameable
getDescription
in interface Nameable
String
with a description of the itempublic void setDescription(String description) throws PermissionDeniedException, InvalidDataException
Nameable
Nameable.MAX_DESCRIPTION_LENGTH
constant.
setDescription
in interface Nameable
description
- The new description for the item
PermissionDeniedException
- If the logged in user doesn't
have write permission
InvalidDataException
- If the description longer
than specified by the Nameable.MAX_DESCRIPTION_LENGTH
constantpublic boolean isRemoved()
Removable
isRemoved
in interface Removable
public void setRemoved(boolean removed) throws PermissionDeniedException
Removable
setRemoved
in interface Removable
removed
- TRUE if the item should be flagged as removed,
FALSE otherwise
PermissionDeniedException
- If the logged in user doesn't
have Permission.DELETE
permission for setting the flag
to TRUE or Permission.WRITE
permission for setting the
flag to FALSEpublic boolean isUsed() throws BaseException
isUsed
in class BasicItem<JobData>
BaseException
- If not able to tell if item is used or not.BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
getUsingItems
in class BasicItem<JobData>
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
void onBeforeCommit(Transactional.Action action) throws NotLoggedInException, BaseException
onBeforeCommit
in class OwnedItem<JobData>
NotLoggedInException
- If no user is logged in
BaseException
- If there is another errorTransactional
,
Core API overview - Transaction handling,
Coding rules and guidelines for item classesvoid onAfterCommit(Transactional.Action action)
Signal.ABORT
signal is waiting to be sent send it.
onAfterCommit
in class BasicItem<JobData>
Transactional
,
Core API overview - Transaction handling,
Coding rules and guidelines for item classesvoid initPermissions(int granted, int denied)
initPermissions
in class OwnedItem<JobData>
granted
- Permissions that have been granted by the subclassdenied
- Permissions that have been denied by the subclasspublic Job.Type getJobType()
public PluginDefinition getPluginDefinition() throws PermissionDeniedException, BaseException
PluginConfiguration
defining the plugin this job should execute.
PluginConfiguration
item, or null if this job
isn't executed by a plugin
PermissionDeniedException
- If the logged in user doesn't have
read permission for the plugin configuration
BaseException
- If there is another errorprivate void setPluginDefinition(PluginDefinition plugin) throws PermissionDeniedException
PermissionDeniedException
- If the logged in user
doesn't have use permission for the plugin configurationpublic PluginConfiguration getPluginConfiguration() throws PermissionDeniedException, BaseException
PluginConfiguration
defining the plugin this job should execute.
PluginConfiguration
item, or null if this job
isn't executed by a plugin
PermissionDeniedException
- If the logged in user doesn't have
read permission for the plugin configuration
BaseException
- If there is another errorprivate void setPluginConfiguration(PluginConfiguration pluginConfiguration) throws PermissionDeniedException
PermissionDeniedException
- If the logged in user
doesn't have use permission for the plugin configurationpublic Experiment getExperiment()
Experiment
item, or null if this job
isn't part of an experimentvoid setExperiment(Experiment experiment)
public String getPluginVersion()
public int getParameterVersion()
public boolean getSendMessage()
public void setSendMessage(boolean sendMessage) throws PermissionDeniedException
sendMessage
- TRUE if a message should be sent, FALSE otherwise.
PermissionDeniedException
- If the logged in user doesn't have
write permissionpublic boolean getRemoveJobWhenFinished()
public void setRemoveJobWhenFinished(boolean removeJobWhenFinished)
removeJobWhenFinished
- TRUE if the job should be
flagged for deletion when finished, FALSE otherwise.
PermissionDeniedException
- If the logged in user doesn't have
write permissionpublic Job.ExecutionTime getEstimatedExecutionTime()
ExecutionTime
objectpublic Job.Status getStatus()
public boolean isDryRun()
public String getStatusMessage()
public String getStackTrace()
public int getPercentComplete()
public int getPriority()
public void setPriority(int priority) throws PermissionDeniedException, InvalidDataException
priority
- The priority to set.
PermissionDeniedException
- If the logged in user doesn't have
write permission or the job's status isn't WAITING
InvalidDataException
- If the priority isn't between 1 and 10public int getActiveProjectId()
public Date getCreated()
public Date getScheduled()
public Date getStarted()
start(String, String)
public String getServer()
public boolean hasContext()
configure(GuiContext)
,
getLastGuiContext()
public GuiContext getLastGuiContext()
public JobAgent getJobAgent()
public void setJobAgent(JobAgent agent)
NOTE! This method doesn't check that the specified job agent has actually been configured to run the plug-in used by this job. Setting this parameter to an incorrect value may result in the job never being executed.
agent
- The job agent, or null to let any job agent run
the job
PermissionDeniedException
- If the logged in user doesn't
have write permission on this job, or use permission on the
job agent or is lacking the Permission.SELECT_JOBAGENT
permissionpublic void setSignalTransporter(Class<? extends SignalTransporter> clazz, String initParams)
clazz
- The signal transporter classinitParams
- Initialisation parameters that will be passed
to SignalTransporter.init(String)
PermissionDeniedException
- If the user doesn't have write
permission for the jobpublic boolean hasSignalTransporter()
public SignalTransporter getSignalTransporter()
Note 1! Depending on the transport mechanism used, it is not certain that the created transporter can actually send the signal. For example, some transporters only work if the plug-in is running in the same virtual machine, while others supports sending signals to other JVM:s on the same or a different computer.
Note 2! The returned transporter will delay the Signal.ABORT
signal
until DbControl.commit()
is called and will only send the signal if
the transaction is completed succesfully. If the transaction fails or is rolled
back the signal is not sent. Other signals are sent immediately.
Note 3! This method always returns the same transporter instance if it is called multiple times.
PermissionDeniedException
- If the user doesn't have write
permission for the jobpublic Date getEnded()
public void setPrepared(String server) throws PermissionDeniedException
setPrepared(String, JobAgent)
instead
PermissionDeniedException
public void setPrepared(String server, JobAgent agent) throws PermissionDeniedException
Job.Status.PREPARED
. This status is
used to signal that a job is about to be executed, but the actual excecution
hasn't started yet. This status prevents two job agents from trying to
start the same job twice.
server
- Name of the server which this job will executed onagent
- The job agent that is going to execute the
job or null if it is executed by something else, eg. the
internal job queue
PermissionDeniedException
- If the logged in user doesn't have write permission.public void start(String statusMessage, String server) throws PermissionDeniedException, InvalidDataException
start(String, String, JobAgent)
instead
PermissionDeniedException
InvalidDataException
public void start(String statusMessage, String server, JobAgent agent) throws PermissionDeniedException, InvalidDataException
statusMessage
- A messageserver
- The name of the server where the job is startedagent
- The job agent that is going to execute the
job or null if it is executed by something else, eg. the
internal job queue
PermissionDeniedException
- If the logged in user doesn't have
write permission
InvalidDataException
- If the status message is too longpublic ProgressReporter getProgressReporter(ProgressReporter chained)
chained
- An optional chained progress reporter to which all
updates will be forwarded
public void setProgress(int percentComplete, String statusMessage) throws PermissionDeniedException, InvalidDataException
Job.Status.EXECUTING
or
Job.Status.PREPARED
status.
percentComplete
- The number of percent completedstatusMessage
- A message
PermissionDeniedException
- If the logged in user doesn't have
write permission of the job isn't in the EXECUTING
status
InvalidDataException
- If the status message is too long or the
percentage value isn't between 0 and 100public void doneOk(String statusMessage) throws PermissionDeniedException, InvalidDataException
statusMessage
- A message
PermissionDeniedException
- If the logged in user doesn't have
write permission
InvalidDataException
- If the status message is too longpublic void doneError(String statusMessage) throws PermissionDeniedException, InvalidDataException
statusMessage
- A message
PermissionDeniedException
- If the logged in user doesn't have
write permission
InvalidDataException
- If the status message is too longpublic void doneError(String statusMessage, Collection<? extends Throwable> errors)
statusMessage
- A short message describing the errorerrors
- A list of one or more errors that caused the job to fail, the
complete stack trace for those errors are stored in the getStackTrace()
property
PermissionDeniedException
- If the logged in user doesn't have
write permission
InvalidDataException
- If the status message is too longpublic void retry(boolean useLatestConfiguration) throws PermissionDeniedException
retry(boolean, boolean)
instead
useLatestConfiguration
- If the job should use the latest configuration
parameters in case these has changed since the job was created
PermissionDeniedException
- If the logged in user doesn't have write permissionpublic void retry(boolean useLatestConfiguration, boolean clearDryRun) throws PermissionDeniedException
useLatestConfiguration
- If the job should use the latest configuration
parameters in case these has changed since the job was createdclearDryRun
- If the job was a dry-run job, clear the dry-run flag
to indicate that it should be executed for real the next time
PermissionDeniedException
- If the logged in user doesn't have write permissionvoid continueLater(String executeCommand, boolean isShuttingDown)
This method will reset the job status to WAITING. The execute command parameter can be set to allow the plug-in to tell the difference between a first-time execution and resuming after a system shutdown.
executeCommand
- The command to send the next time the
job is started, if not given Request.COMMAND_EXECUTE
is usedisShuttingDown
- TRUE if the system is currently shutting down
(which means that the 'scheduled' data is not reset to allow the
job to be started first once the system is up and running)public PluginConfigurationRequest configure(GuiContext context) throws PermissionDeniedException, BaseException
DbControl.commit()
until the configuration sequence
is done. See PluginRequest
for more information. This method changes
the status of the job to Job.Status.WAITING
.
context
- GUI context from where the configuration is called.
PluginRequest
object
PermissionDeniedException
- If the logged in user doesn't have
write permission
BaseException
- If there is another errorpublic PluginExecutionRequest execute(ProgressReporter progress, String server) throws PermissionDeniedException, InvalidDataException, BaseException
DbControl.commit()
before calling PluginRequest.invoke()
.
See PluginRequest
for more information.
progress
- The ProgressReporter
where the plugin can report its progress. If
null
Job.ProgressReporterImpl
is usedserver
- The name of the server executing the plugin
Plugin.Request
object
PermissionDeniedException
- If the logged in user doesn't have
write permission or the job isn't in the Job.Status.WAITING
status
InvalidDataException
- If the server name is too long
BaseException
- If there is another errorpublic PluginExecutionRequest execute(ProgressReporter progress, String server, JobAgentSettings settings) throws PermissionDeniedException, InvalidDataException, BaseException
DbControl.commit()
before calling PluginRequest.invoke()
.
See PluginRequest
for more information.
progress
- The ProgressReporter
where the plugin can report its progress. If
null
Job.ProgressReporterImpl
is usedserver
- The name of the server executing the pluginsettings
- The job agent settings to use or null to use default settings
Plugin.Request
object
PermissionDeniedException
- If the logged in user doesn't have
write permission or the job isn't in the Job.Status.WAITING
status
InvalidDataException
- If the server name is too long
BaseException
- If there is another errorpublic Set<String> getParameterNames()
Set
containing the names of the parameters or an
empty set if no parameters has been definedpublic Object getParameterValue(String name) throws PermissionDeniedException, BaseException
name
- The name of the parameter
PermissionDeniedException
- If the parameter contain values that
the logged in user doesn't have read permission for
BaseException
- If there is another errorpublic List<?> getParameterValues(String name) throws PermissionDeniedException, BaseException
name
- The name of the parameter
PermissionDeniedException
- If the parameter contain values that
the logged in user doesn't have read permission for
BaseException
- If there is another errorpublic ParameterInfo getParameterInfo(String name) throws PermissionDeniedException, BaseException
name
- The name of the parameter
PermissionDeniedException
- If the parameter contain values that
the logged in user doesn't have read permission for
BaseException
- If there is another errorpublic void setParameterValue(String name, ParameterType<?> parameterType, Object value) throws InvalidDataException, PermissionDeniedException, BaseException
Job.Status.WAITING
.
name
- The name of the parameterparameterType
- The type of the parametervalue
- The value of the parameter
PermissionDeniedException
- If the logged in user doesn't
have write permission or if the job is executing
InvalidDataException
- If name is null or the new value doesn't
validate against the parameter type
BaseException
- If there is another errorpublic void setParameterValue(String name, String label, String description, ParameterType<?> parameterType, Object value) throws InvalidDataException, PermissionDeniedException, BaseException
Job.Status.WAITING
.
name
- The name of the parameterlabel
- The label of the parameter (optional)description
- A description of the parameter (optional)parameterType
- The type of the parametervalue
- The value of the parameter
PermissionDeniedException
- If the logged in user doesn't
have write permission or if the job is executing
InvalidDataException
- If name is null or the new value doesn't
validate against the parameter type
BaseException
- If there is another errorpublic void setParameterValues(String name, ParameterType<?> parameterType, List<?> values) throws InvalidDataException, PermissionDeniedException, BaseException
Job.Status.WAITING
.
name
- The name of the parameterparameterType
- The type of the parametervalues
- A list containing the values
PermissionDeniedException
- If the logged in user doesn't
have write permission or if the job is
executing
InvalidDataException
- If name is null or the new value doesn't
validate against the parameter type
BaseException
- If there is another errorpublic void setParameterValues(String name, String label, String description, ParameterType<?> parameterType, List<?> values) throws InvalidDataException, PermissionDeniedException, BaseException
Job.Status.WAITING
.
name
- The name of the parameterlabel
- The label of the parameter (optional)description
- A description of the parameter (optional)parameterType
- The type of the parametervalues
- A list containing the values
PermissionDeniedException
- If the logged in user doesn't
have write permission or if the job is
executing
InvalidDataException
- If name is null or the new value doesn't
validate against the parameter type
BaseException
- If there is another errorpublic void copyParametersFrom(Job copyFrom) throws InvalidDataException, PermissionDeniedException, BaseException
copyFrom
- The job to copy parameters from
InvalidDataException
- If the copyFrom parameter is null
PermissionDeniedException
- If the logged in user doesn't have write
permission for this configuration
BaseException
- If there is another errorvoid setParameterValuesInternal(String name, String label, String description, ParameterType<?> parameterType, List<?> values, boolean validate) throws InvalidDataException, PermissionDeniedException, BaseException
name
- The name of the configuration parameterlabel
- The label of the parameter (optional)description
- A description of the parameter (optional)parameterType
- The type of the parametervalues
- A list containing the new values, null or empty to remove the
configuration valuesvalidate
- If validation by ParameterType.validate(String, List)
is needed or not
PermissionDeniedException
- If the logged in user doesn't have
write permission
InvalidDataException
- If name is null or the new value doesn't
validate against the parameter type
BaseException
- If there is another errorParameterValuesImpl getParameterValuesImpl() throws BaseException
BaseException
private void sendMessage()
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |