Search in sources :

Example 1 with YOU_DO_NOT_HAVE_PERMISSION_TO_RESTART_THIS_TASK

use of org.ow2.proactive.scheduler.core.SchedulerFrontendState.YOU_DO_NOT_HAVE_PERMISSION_TO_RESTART_THIS_TASK in project scheduling by ow2-proactive.

the class SchedulerFrontend method restartInErrorTask.

/**
 * {@inheritDoc}
 */
@Override
@ImmediateService
public boolean restartInErrorTask(String jobId, String taskName) throws NotConnectedException, UnknownJobException, UnknownTaskException, PermissionException {
    // checking permissions
    String currentUser = frontendState.getCurrentUser();
    final JobId jobIdObject = JobIdImpl.makeJobId(jobId);
    frontendState.checkPermissions("restartInErrorTask", frontendState.getIdentifiedJob(jobIdObject), YOU_DO_NOT_HAVE_PERMISSION_TO_RESTART_THIS_TASK);
    logger.info("Request to restart in-error task " + taskName + " of job " + jobId + " received from " + currentUser);
    return schedulingService.restartInErrorTask(jobIdObject, taskName);
}
Also used : JobId(org.ow2.proactive.scheduler.common.job.JobId) ImmediateService(org.objectweb.proactive.annotation.ImmediateService)

Aggregations

ImmediateService (org.objectweb.proactive.annotation.ImmediateService)1 JobId (org.ow2.proactive.scheduler.common.job.JobId)1