com.aspose.tasks

Interfaces

Classes

Exceptions

com.aspose.tasks

Class Resource

  • All Implemented Interfaces:
    com.aspose.ms.System.IEquatable<Resource>


    public class Resource
    extends Object
    implements com.aspose.ms.System.IEquatable<Resource>

    Represents a resource in a project.

    • Method Detail

      • getParentProject

        public Project getParentProject()

        Returns parent project for this container.

        Returns:
        Project instance.
      • getExtendedAttributes

        public ExtendedAttributeCollection getExtendedAttributes()

        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.
      • getBaselines

        public BaselineCollection getBaselines()

        Returns BaselineCollection instance for this object. The baseline values for a resource. Read only BaselineCollection object.

        Returns:
        returns a collection of Baseline objects for this resource.
      • getOutlineCode

        public OutlineCodeCollection getOutlineCode()

        Returns OutlineCodeCollection object. The value of an outline code. Read only OutlineCodeCollection instance. 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 resource.
      • getAvailabilityPeriods

        public AvailabilityPeriodCollection getAvailabilityPeriods()

        Returns AvailabilityPeriodCollection object. The collection of periods during which a resource is available. Read only AvailabilityPeriodCollection instance.

        Returns:
        returns a collection of AvailabilityPeriod instances for this resource.
      • getRates

        public RateCollection getRates()

        Returns the instance of the RateCollection class for this object. The collection of periods and rates associated with each one. Read-only RateCollection instance.

        Returns:
        a collection of Rate values for this resource.
      • getAssignments

        public ResourceAssignmentCollection getAssignments()

        Returns a collection of resource assignments for this object.

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

        public TimephasedDataCollection getTimephasedData()

        Returns an instance of TimephasedDataCollection class for this object. Read/write TimephasedDataCollection object. Reading supported for XML format only.

        Returns:
        a collection of TimephasedData values for this resource.
      • setTimephasedData

        public void setTimephasedData(TimephasedDataCollection value)
        Sets a collection of TimephasedData values for this resource.
        Parameters:
        value - a collection of TimephasedData values for this object.
      • equals

        public boolean equals(Resource other)

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

        Parameters:
        other - The Resource instance to compare with this instance.
        Returns:
        <b>True</b> if the specified Resource instance has the same UID value as this instance; otherwise, <b>false</b>.
      • equals

        public boolean equals(Object obj)

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

        Specified by:
        equals in interface com.aspose.ms.System.IEquatable<Resource>
        Overrides:
        equals in class Object
        Parameters:
        obj - The object to compare with this instance.
        Returns:
        <b>True</b> if obj is a Resource that has the same UID value as this instance; otherwise, <b>false</b>.
      • hashCode

        public int hashCode()
        Returns a hash code for this Resource.
        Overrides:
        hashCode in class Object
        Returns:
        a hash code value for this object.
      • toString

        public String toString()

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

        Overrides:
        toString in class Object
        Returns:
        short string which represents resource object.
      • 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. Rsc for getting the property key.

        T: the type of the mapped value.

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

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

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

        Type Parameters:
        T - the type of the mapped value.
        Parameters:
        key - the specified property key. Rsc for getting the property key.
        val - the value.
      • delete

        public void delete()

        Deletes a resource and its assignments from project.

      • getTimephasedData

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

        Returns an instance of the TimephasedDataCollection class for this object with the TimephasedData values within given start and end dates of specified timephasedDataType.

        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:
        List of TimephasedData.
      • getTimephasedData

        public TimephasedDataCollection getTimephasedData(Date start,
                                                          Date end)
        /**

        Returns TimephasedDataCollection for this object with TimephasedDatavalues within given start and end dates.

        Parameters:
        start - The start date for the timephased data.
        end - The end date for the timephased data.
        Returns:
        List of TimephasedData.