public SubTasksStrategy getSubTaskStrategy(long taskId) { Task task = persistenceContext.findTask(taskId); return ((InternalTask) task).getSubTaskStrategy(); }
if(((InternalTask) parentTask).getSubTaskStrategy() != null && ((InternalTask) parentTask).getSubTaskStrategy().equals(SubTasksStrategy.EndParentOnAllSubTasksEnd)){ List<TaskSummary> subTasks = queryService.getSubTasksByParent(parentTask.getId()); if (((InternalTask) task).getSubTaskStrategy() != null && ((InternalTask) task).getSubTaskStrategy().equals(SubTasksStrategy.SkipAllSubTasksOnParentSkip)){ List<TaskSummary> subTasks = queryService.getSubTasksByParent(task.getId()); for(TaskSummary taskSummary : subTasks){
public void initialize(Task task) { if( task == null ) { return; } this.id = task.getId(); this.priority = task.getPriority(); this.version = task.getVersion(); this.archived = task.isArchived(); this.subTasksStrategy = ((InternalTask) task).getSubTaskStrategy(); this.peopleAssignments = new JaxbPeopleAssignments(task.getPeopleAssignments()); this.names = convertListFromInterfaceToJaxbImpl(task.getNames(), I18NText.class, JaxbI18NText.class); this.name = ((InternalTask)task).getName(); this.subjects = convertListFromInterfaceToJaxbImpl(task.getSubjects(), I18NText.class, JaxbI18NText.class); this.subject = ((InternalTask)task).getSubject(); this.descriptions = convertListFromInterfaceToJaxbImpl(task.getDescriptions(), I18NText.class, JaxbI18NText.class); this.description = ((InternalTask)task).getDescription(); this.taskType = task.getTaskType(); this.formName = ((InternalTask)task).getFormName(); this.taskData = new JaxbTaskData(task.getTaskData()); }