Search in sources :

Example 1 with YOU_DO_NOT_HAVE_PERMISSION_TO_FINISH_THIS_TASK

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

the class SchedulerFrontend method finishInErrorTask.

/**
 * {@inheritDoc}
 */
@Override
@ImmediateService
public boolean finishInErrorTask(String jobId, String taskName) throws NotConnectedException, UnknownJobException, UnknownTaskException, PermissionException {
    // checking permissions
    String currentUser = frontendState.getCurrentUser();
    final JobId jobIdObject = JobIdImpl.makeJobId(jobId);
    frontendState.checkPermissions("finishInErrorTask", frontendState.getIdentifiedJob(jobIdObject), YOU_DO_NOT_HAVE_PERMISSION_TO_FINISH_THIS_TASK);
    logger.info("Request to finish in-error task " + taskName + " of job " + jobId + " received from " + currentUser);
    return schedulingService.finishInErrorTask(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