@Override public TaskData newTaskData() { return new TaskDataImpl(); }
public TaskFluent setProcessId(String processId){ ((TaskDataImpl)task.getTaskData()).setProcessId(processId); return this; }
/** * Initializes the state of the TaskData, i.e. sets the <field>createdOn</field>, <field>activationTime</field> * and sets the state to <code>Status.Created</code>. * * @return returns the current state of the TaskData */ public Status initialize() { Date createdOn = getCreatedOn(); // set the CreatedOn date if it's not already set if (createdOn == null) { createdOn = new Date(); setCreatedOn(createdOn); } //@FIXME for now we activate on creation, unless date is supplied if (getActivationTime() == null) { setActivationTime(createdOn); } setStatus(Status.Created); return Status.Created; }
public Task getTask() { if(((TaskDataImpl)task.getTaskData()).getCreatedOn() == null){ ((TaskDataImpl)task.getTaskData()).setCreatedOn(new Date()); } return task; }
@Test public void testAllowDelegateStatusCompleted() { final long takId = 1; final TaskImpl task = new TaskImpl(); final TaskDataImpl taskData = new TaskDataImpl(); taskData.setStatus(Status.Completed); task.setTaskData(taskData); when(taskService.getTask(takId)).thenReturn(task); assertFalse(taskOperationsService.allowDelegate(takId, null, null)); }
taskData = new TaskDataImpl(); taskData.readExternal( in );
@Test public void testAllowDelegateActualOwner() { final long takId = 1; final String userId = "user"; final TaskImpl task = new TaskImpl(); final TaskDataImpl taskData = new TaskDataImpl(); taskData.setActualOwner(new UserImpl(userId)); task.setTaskData(taskData); final PeopleAssignmentsImpl peopleAssignments = new PeopleAssignmentsImpl(); task.setPeopleAssignments(peopleAssignments); when(taskService.getTask(takId)).thenReturn(task); assertTrue(taskOperationsService.allowDelegate(takId, userId, Collections.<String>emptySet())); }
public void setTaskInitiator(User taskInitiator) { this.taskInitiator = convertToUserImpl(taskInitiator); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + version; result = prime * result + priority; result = prime * result + archived.hashCode(); result = prime * result + ((taskType == null) ? 0 : taskType.hashCode()); result = prime * result + CollectionUtils.hashCode( descriptions ); result = prime * result + CollectionUtils.hashCode( names ); result = prime * result + CollectionUtils.hashCode( subjects ); result = prime * result + ((peopleAssignments == null) ? 0 : peopleAssignments.hashCode()); result = prime * result + ((delegation == null) ? 0 : delegation.hashCode()); result = prime * result + ((taskData == null) ? 0 : taskData.hashCode()); result = prime * result + ((deadlines == null) ? 0 : deadlines.hashCode()); return result; }
if ( taskData == null ) { if ( other.taskData != null ) return false; } else if ( !taskData.equals( other.taskData ) ) return false; return ( CollectionUtils.equals( descriptions, other.descriptions ) && CollectionUtils.equals( names, other.names ) && CollectionUtils.equals( subjects, other.subjects ));
taskData = new TaskDataImpl(); taskData.readExternal( in );
public void setAddedBy(User addedBy) { this.addedBy = convertToUserImpl(addedBy); }
public Task getTask() { if(((TaskDataImpl)task.getTaskData()).getCreatedOn() == null){ ((TaskDataImpl)task.getTaskData()).setCreatedOn(new Date()); } return task; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + version; result = prime * result + priority; result = prime * result + archived.hashCode(); result = prime * result + ((taskType == null) ? 0 : taskType.hashCode()); result = prime * result + CollectionUtils.hashCode( descriptions ); result = prime * result + CollectionUtils.hashCode( names ); result = prime * result + CollectionUtils.hashCode( subjects ); result = prime * result + ((peopleAssignments == null) ? 0 : peopleAssignments.hashCode()); result = prime * result + ((delegation == null) ? 0 : delegation.hashCode()); result = prime * result + ((taskData == null) ? 0 : taskData.hashCode()); result = prime * result + ((deadlines == null) ? 0 : deadlines.hashCode()); return result; }
if ( taskData == null ) { if ( other.taskData != null ) return false; } else if ( !taskData.equals( other.taskData ) ) return false; return ( CollectionUtils.equals( descriptions, other.descriptions ) && CollectionUtils.equals( names, other.names ) && CollectionUtils.equals( subjects, other.subjects ));
public TaskFluent() { if (task == null) { task = new TaskImpl(); task.setTaskData(new TaskDataImpl()); assignments = new PeopleAssignmentsImpl(); task.setPeopleAssignments(assignments); names = new ArrayList<I18NText>(); task.setNames(names); descriptions = new ArrayList<I18NText>(); task.setDescriptions(descriptions); subjects = new ArrayList<I18NText>(); task.setSubjects(subjects); } }
/** * Initializes the state of the TaskData, i.e. sets the <field>createdOn</field>, <field>activationTime</field> * and sets the state to <code>Status.Created</code>. * * @return returns the current state of the TaskData */ public Status initialize() { Date createdOn = getCreatedOn(); // set the CreatedOn date if it's not already set if (createdOn == null) { createdOn = new Date(); setCreatedOn(createdOn); } //@FIXME for now we activate on creation, unless date is supplied if (getActivationTime() == null) { setActivationTime(createdOn); } setStatus(Status.Created); return Status.Created; }
Task task = TaskFactory.evalTask(new StringReader(str)); String otherProcessId = "org.process.task.other"; ((TaskDataImpl) task.getTaskData()).setProcessId(otherProcessId);; taskService.addTask(task, new HashMap<String, Object>()); task = TaskFactory.evalTask(new StringReader(str)); String processId = "org.process.task.test"; ((TaskDataImpl) task.getTaskData()).setProcessId(processId); taskService.addTask(task, new HashMap<String, Object>());
public void setAttachedBy(User attachedBy) { this.attachedBy = convertToUserImpl(attachedBy); }
@Override public TaskData newTaskData() { return new TaskDataImpl(); }