public OperationDefinition(int id, String name, String resourceVersionRange, String description, Integer timeout, String displayName) { this(name, resourceVersionRange, description); setId(id); setTimeout(timeout); setDisplayName(displayName); }
public void addFilterJobId(JobId filterJobId) { this.filterJobName = filterJobId.getJobName(); this.filterJobGroup = filterJobId.getJobGroup(); }
/** * Returns the single string that contains the unique job ID which identifies a particular invocation of a * particular job. This string is used to determine this object's hash code and for equality checks. Note that * {@link HistoryJobId} objects are only ever equal to other {@link HistoryJobId} objects (they are never equal to * concrete instances of {@link JobId}). * * @see java.lang.Object#toString() */ public String toString() { return joinPartsIntoJobIdString(super.toString(), Long.toString(createdTime)); } }
/** * The single job ID which identifies this specific schedule. It can later be parsed via * {@link ScheduleJobId#ScheduleJobId(String)}. * * @return job ID */ public JobId getJobId() { return new ScheduleJobId(this.jobName, this.jobGroup); }
public OperationScheduleComposite(int id, String jobName, String jobGroup, String operationName, long operationNextFireTime) { this.id = id; this.jobId = new JobId(jobName, jobGroup); this.operationName = operationName; this.operationNextFireTime = operationNextFireTime; }
/** * The single job ID which identifies this specific history item. It can later be parsed via * {@link HistoryJobId#HistoryJobId(String)}. * * @return job ID */ public HistoryJobId getJobId() { return new HistoryJobId(this.jobName, this.jobGroup, this.createdTime); }
/** * Calling this method with a non-<code>null</code> error message implies that the request's status is * {@link OperationRequestStatus#FAILURE}. The inverse is <i>not</i> true - that is, if you set the error message to * <code>null</code>, the status is left as-is; it will not assume that a <code>null</code> error message means the * status is successful. * * @param errorMessage */ public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; if (this.errorMessage != null) { setStatus(OperationRequestStatus.FAILURE); } }
private void ensureControlPermission(Subject subject, OperationHistory history) throws PermissionException { if (history instanceof GroupOperationHistory) { ResourceGroup group = ((GroupOperationHistory) history).getGroup(); ensureControlPermission(subject, group); } else { Resource resource = ((ResourceOperationHistory) history).getResource(); ensureControlPermission(subject, resource); } }
public GroupOperationHistory(String jobName, String jobGroup, String subjectName, OperationDefinition operationDefinition, Configuration parameters, ResourceGroup group) { super(jobName, jobGroup, subjectName, operationDefinition, parameters); this.group = group; setStartedTime(); // group operation histories are started implicitly }
@Override public void setJobGroup(String jobGroup) { super.setJobGroup(jobGroup); } }
public void setGroupOperationHistory(GroupOperationHistory groupOperationHistory) { this.groupOperationHistory = groupOperationHistory; if (this.groupOperationHistory != null) { groupOperationHistory.addResourceOperationHistory(this); } }
/** * Returns the single string that identifies the unique job ID. * * @see java.lang.Object#toString() */ @Override public String toString() { return joinPartsIntoJobIdString(jobName, jobGroup); }
public ResourceOperationHistory(String jobName, String jobGroup, String subjectName, OperationDefinition operationDefinition, Configuration parameters, Resource resource, GroupOperationHistory groupHistory) { super(jobName, jobGroup, subjectName, operationDefinition, parameters); this.resource = resource; setGroupOperationHistory(groupHistory); }
public JobId(String jobIdString) { this(splitJobIdStringIntoParts(jobIdString)); }
public HistoryJobId(String jobIdString) { this(splitJobIdStringIntoParts(jobIdString)); }
@Override public void setJobName(String jobName) { super.setJobName(jobName); }