com.aspose.tasks

Interfaces

Classes

Exceptions

com.aspose.tasks

Class Task

  • All Implemented Interfaces:
    com.aspose.ms.System.IEquatable<Task>, Cloneable


    public class Task
    extends Object
    implements com.aspose.ms.System.IEquatable<Task>, Cloneable

    Represents a task in a project.

    • Method Detail

      • getAssignments

        public ResourceAssignmentCollection getAssignments()

        Returns a collection of resource assignments for this task.

        Returns:
        returns a collection of resource assignments for this object.
      • getBaselines

        public TaskBaselineCollection getBaselines()

        Returns a collection of baseline values of the task

        Returns:
        returns a collection of baseline values for this object.
      • setBaselines

        public void setBaselines(TaskBaselineCollection value)
        Sets a collection of baseline values for this task.
        Parameters:
        value - a collection of baseline values for this object.
      • getChildren

        public TaskCollection getChildren()

        Returns child task collection of this object. TaskCollection object which represents children tasks.

        Returns:
        returns child task collection of this object.
      • getExtendedAttributes

        public ExtendedAttributeCollection getExtendedAttributes()

        Returns ExtendedAttributeCollection object containing the values of an extended attribute. Read only ExtendedAttributeCollection instance. Two pieces of data are necessary - a pointer back to the extended attribute table which is specified either by the unique ID or the Field ID, and the value which is specified either with the value, or a pointer back to the value list.

        Returns:
        returns a collection of ExtendedAttribute values for this object.
      • getOutlineCodes

        public OutlineCodeCollection getOutlineCodes()

        Returns OutlineCodeCollection object. Two pieces of data are necessary - a pointer to the outline code table that is specified by the FieldID, and the value that is specified either by the ValueID or ValueGUID pointer to the value list.

        Returns:
        returns a collection of OutlineCode values for this object.
      • setOutlineCodes

        public void setOutlineCodes(OutlineCodeCollection value)

        Sets OutlineCodeCollection object.


        Two pieces of data are necessary - a pointer to the outline code table that is specified by the FieldID, and the value that is specified either by the ValueID or ValueGUID pointer to the value list.

        Parameters:
        value - collection of outline codes.
      • getParentProject

        public Project getParentProject()

        Returns the parent project of a task. Read/write Project.

        Returns:
        returns the parent project for this object.
      • getParentTask

        public Task getParentTask()

        Returns the parent task of a task. Read/write Task.

        Returns:
        returns a parent task for this object.
      • getPredecessors

        public TaskCollection getPredecessors()

        Returns a TaskCollection object which contains all predecessors of this Task object.

        Returns:
        Read-only instance of TaskCollection class.
      • getRecurringInfo

        public RecurringTaskInfo getRecurringInfo()

        Returns the instance of RecurringTaskInfo class for the task which is a recurring task; if the task is not a recurring one then returns null; The info for the instance of RecurringTaskInfo is present in mpp file format only.

        Returns:
        returns the instance of RecurringTaskInfo class for the task which is a recurring task.
      • getSplitParts

        public SplitPartCollection getSplitParts()

        Returns a SplitPart collection that represents the portions of a task. Read only Aspose.Tasks.SplitPartCollection.

        Returns:
        returns a collection of split parts for this task.
      • getSuccessors

        public TaskCollection getSuccessors()

        Gets a TaskCollection object which contains all successors of this Task object.

        Returns:
        Read-only instance of TaskCollection class.
      • getTimephasedData

        public TimephasedDataCollection getTimephasedData()

        Gets a TimephasedDataCollection object of this task. The time phased data block associated with a task. Read/write TimephasedDataCollection object.


        Reading supported for XML format only.

        Returns:
        TimephasedDataCollection object of this task.
      • setTimephasedData

        public void setTimephasedData(TimephasedDataCollection value)

        Sets a TimephasedDataCollection object of this task. The time phased data block associated with a task.


        Reading supported for XML format only.

        Parameters:
        value - TimephasedDataCollection object to set.
      • deepClone

        public Object deepClone()

        Creates full copy of a task without subtasks.

        Returns:
        Created copy of a task.
      • delete

        public void delete()

        Deletes a task from parent project tasks collection and all its assignments.

      • equals

        public boolean equals(Task other)

        Returns a value indicating whether this instance is equal to a specified task.

        Parameters:
        other - The specified task to compare with this instance.
        Returns:
        returns true if the specified task and this instance have equal unique ids.
      • equals

        public boolean equals(Object other)

        Returns a value indicating whether this instance is equal to a specified object.

        Specified by:
        equals in interface com.aspose.ms.System.IEquatable<Task>
        Overrides:
        equals in class Object
        Parameters:
        other - The specified object to compare with this instance.
        Returns:
        returns true if the specified task and this instance have equal unique ids.
      • get

        public <T> T get(Key<T,Integer> key)

        Returns the value to which the property is mapped in this container.

        Parameters:
        key - the specified property key. Tsk for getting the property key.

        T: the type of the mapped value.

        Returns:
        the value to which the property is mapped in this container.
      • getTimephasedData

        public TimephasedDataCollection getTimephasedData(Date start,
                                                          Date end,
                                                          int timephasedType)

        Returns TimephasedDataCollection object with TimephasedData values within given start and end dates of specified timephased data type.

        Parameters:
        start - The start date for the time phased data.
        end - The end date for the time phased data.
        timephasedType - The type of time phased data (Aspose.Tasks.TimephasedDataType).
        Returns:
        A TimephasedDataCollection object with TimephasedData values within given start and end dates of specified timephased data type.
      • getTimephasedData

        public TimephasedDataCollection getTimephasedData(Date start,
                                                          Date end)

        Returns TimephasedDataCollection object with TimephasedData values within given start and end dates of TaskTimeScaledData.TaskTimescaledWork type.

        Parameters:
        start - The start date for the time phased data.
        end - The end date for the time phased data.
        Returns:
        List of Aspose.Tasks.TimephasedData to be filled in.
      • hashCode

        public int hashCode()

        Returns a hash code value for this Task.

        Overrides:
        hashCode in class Object
        Returns:
        returns a hash code value for this object.
      • moveToSibling

        public void moveToSibling(int beforeTaskId)

        Move the specified task at the same Outline Level If ParentProject.CalculationMode is None user should invoke Project.Recalculate() after using this method (It will reschedule all project tasks (start/finish dates, sets early/late dates) and calculate the dependent fields such as slacks, work and cost fields, outline levels). If ParentProject.CalculationMode is Manual the method will calculate only task id, outline level and outline numbers automatically. If ParentProject.CalculationMode is Automatic the method reschedules all project's tasks automatically (start/finish dates, sets early/late dates, calculates slacks, work and cost fields, recalculates ids and outline levels).

        Parameters:
        beforeTaskId - the specified id of a task before which a new task will be inserted
      • outlineIndent

        public void outlineIndent()

        Indents a task in the outline.

      • outlineOutdent

        public void outlineOutdent()

        Promotes a task in the outline.

      • selectAllChildTasks

        public Iterable<Task> selectAllChildTasks()

        Recursively collects all child tasks of this task.

        Returns:
        A list of child tasks of this task.
      • set

        public <T> void set(Key<T,Integer> key,
                            T val)

        Maps the specified property to the specified value in this container.

        Parameters:
        key - the specified property key. Tsk for getting the property key.
        val - the value.

        T: the type of the mapped value.

      • toString

        public String toString()

        Returns short string representation of a task. The exact details of the representation are unspecified and subject to change.

        Overrides:
        toString in class Object
        Returns:
        short string which represents task object.