Class ResourceAssignment
- java.lang.Object
-
- com.aspose.tasks.ResourceAssignment
-
- All Implemented Interfaces:
com.aspose.ms.System.IEquatable<ResourceAssignment>
public class ResourceAssignment extends Object implements com.aspose.ms.System.IEquatable<ResourceAssignment>
Represents a resource assignment in a project.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()Deletes resource assignment from project assignments collection.booleanequals(ResourceAssignment other)Returns a value indicating whether this instance is equal to a specified instance of theResourceAssignmentclass.booleanequals(Object obj)Returns a value indicating whether this instance is equal to a specified object.<T> Tget(Key<T,Integer> key)Returns the value to which the property is mapped in this container.AssignmentBaselineCollectiongetBaselines()Gets AssignmentBaselineCollection object.ExtendedAttributeCollectiongetExtendedAttributes()Gets an instance of the ExtendedAttributeCollection class for this object.UUIDgetGuid()Gets unique identifier for this assignment.com.aspose.ms.System.Collections.Generic.IGenericEnumerable<com.aspose.tasks.IExtendedAttributeParent>getItems()ProjectgetParentProject()Gets parent project for this assignment.TimephasedDataCollectiongetTimephasedData()Gets the instance ofTimephasedDataCollectionclass containing elements ofTimephasedData(getTimephasedData()/setTimephasedData(TimephasedDataCollection)) class.TimephasedDataCollectiongetTimephasedData(Date start, Date end)ReturnsTimephasedDataCollectionobject with the instances ofTimephasedData(getTimephasedData()/setTimephasedData(TimephasedDataCollection)) class within given start and end dates ofTimephasedDataType.AssignmentWork.TimephasedDataCollectiongetTimephasedData(Date start, Date end, int timephasedType)Returns the instanceTimephasedDataCollectionclass containing instances ofTimephasedData(getTimephasedData()/setTimephasedData(TimephasedDataCollection)) class within given start and end dates of specifiedTimephasedDataType.booleanhasChildren()Gets a value indicating that this resource assignment has children.inthashCode()Returns a hash code value for the instance of theResourceAssignmentclass.DatemakeTPs(Date start, double time, Calendar calendar, List<TimephasedData> list, boolean isWorking, int type)Generates a list of time phased data.<T> voidset(Key<T,Integer> key, T val)Maps the specified property to the specified value in this container.voidsetExtendedAttributes(ExtendedAttributeCollection value)Sets an instance of the ExtendedAttributeCollection class for this object.voidsetGuid(UUID value)Sets unique identifier for this assignment.voidsetTimephasedData(TimephasedDataCollection value)Sets the instance ofTimephasedDataCollectionclass containing elements ofTimephasedData(getTimephasedData()/setTimephasedData(TimephasedDataCollection)) class.voidsplitTask(Date start, Date finish, Calendar calendar)Splits task into two parts.voidtimephasedDataFromTaskDuration(Calendar calendar)Generates list of time phased data based on the task duration and the scheduled start date.StringtoString()Returns short string representation of the instance of theResourceAssignmentclass.
-
-
-
Method Detail
-
delete
public final void delete()
Deletes resource assignment from project assignments collection.
-
equals
public final boolean equals(ResourceAssignment other)
Returns a value indicating whether this instance is equal to a specified instance of the
ResourceAssignmentclass.- Parameters:
other- The specified instance of theResourceAssignmentclass to compare with this instance.- Returns:
<b>True</b>if the specified instance of theResourceAssignmentclass 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:
equalsin interfacecom.aspose.ms.System.IEquatable<ResourceAssignment>- Overrides:
equalsin classObject- Parameters:
obj- The object to compare with this instance.- Returns:
<b>True</b>if o is a ResourceAssignment that assign the same resource and task as this instance; otherwise,<b>false</b>.
-
get
public final <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.Asnfor getting the property key.T: the type of the mapped value.- Returns:
- the value to which the property is mapped in this container.
-
getBaselines
public final AssignmentBaselineCollection getBaselines()
Gets AssignmentBaselineCollection object. The collection of baseline values associated with an assignment.
- Returns:
- AssignmentBaselineCollection object.
-
getExtendedAttributes
public final ExtendedAttributeCollection getExtendedAttributes()
Gets an instance of the ExtendedAttributeCollection class for this object.
Reading supported for XML format only.- Returns:
- an instance of the ExtendedAttributeCollection class for this object.
-
setExtendedAttributes
public final void setExtendedAttributes(ExtendedAttributeCollection value)
Sets an instance of the ExtendedAttributeCollection class for this object.
Reading supported for XML format only.- Parameters:
value- an instance of the ExtendedAttributeCollection class for this object.
-
getGuid
public final UUID getGuid()
Gets unique identifier for this assignment.
- Returns:
- unique identifier for this assignment.
-
setGuid
public final void setGuid(UUID value)
Sets unique identifier for this assignment.
- Parameters:
value- unique identifier for this assignment.
-
getItems
public final com.aspose.ms.System.Collections.Generic.IGenericEnumerable<com.aspose.tasks.IExtendedAttributeParent> getItems()
- Returns:
-
getParentProject
public final Project getParentProject()
Gets parent project for this assignment.
- Returns:
- parent project for this assignment.
-
getTimephasedData
public final TimephasedDataCollection getTimephasedData()
Gets the instance of
TimephasedDataCollectionclass containing elements ofTimephasedData(getTimephasedData()/setTimephasedData(TimephasedDataCollection)) class.- Returns:
- the instance of
TimephasedDataCollectionclass containing elements ofTimephasedData(getTimephasedData()/setTimephasedData(TimephasedDataCollection)) class.
-
setTimephasedData
public final void setTimephasedData(TimephasedDataCollection value)
Sets the instance of
TimephasedDataCollectionclass containing elements ofTimephasedData(getTimephasedData()/setTimephasedData(TimephasedDataCollection)) class.- Parameters:
value- the instance ofTimephasedDataCollectionclass containing elements ofTimephasedData(getTimephasedData()/setTimephasedData(TimephasedDataCollection)) class.
-
getTimephasedData
public final TimephasedDataCollection getTimephasedData(Date start, Date end, int timephasedType)
Returns the instance
TimephasedDataCollectionclass containing instances ofTimephasedData(getTimephasedData()/setTimephasedData(TimephasedDataCollection)) class within given start and end dates of specifiedTimephasedDataType.- 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 (TimephasedDataType).- Returns:
- returns a list which contains instances of
TimephasedDataclass.
-
getTimephasedData
public final TimephasedDataCollection getTimephasedData(Date start, Date end)
Returns
TimephasedDataCollectionobject with the instances ofTimephasedData(getTimephasedData()/setTimephasedData(TimephasedDataCollection)) class within given start and end dates ofTimephasedDataType.AssignmentWork.- Parameters:
start- The start date for the time phased data.end- The end date for the time phased data.- Returns:
- returns a list containing instances of
TimephasedDataclass.
-
hasChildren
public final boolean hasChildren()
Gets a value indicating that this resource assignment has children.- Returns:
- Always false.
-
hashCode
public int hashCode()
Returns a hash code value for the instance of the
ResourceAssignmentclass.
-
makeTPs
public final Date makeTPs(Date start, double time, Calendar calendar, List<TimephasedData> list, boolean isWorking, int type)
Generates a list of time phased data.
- Parameters:
start- The specified start date.time- The specified working time.calendar- The specified working calendar.list- The list of time phased data.isWorking- The specified flag which specifies whether time-phased data is working or not.type- The specified time-phased data type.- Returns:
- A maximum date from list or start date if list is empty.
-
set
public final <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.Asnfor getting the property key.val- the value.T: the type of the mapped value.
-
splitTask
public final void splitTask(Date start, Date finish, Calendar calendar)
Splits task into two parts.
- Parameters:
start- The beginning of work interruption to split based on.finish- The end of work interruption to split based on.calendar- The calendar to split based on.- Throws:
com.aspose.ms.System.ArgumentOutOfRangeException- Throws when start date is less than the assignment start date.com.aspose.ms.System.ArgumentOutOfRangeException- Throws when finish date is greater than the assignment finish date.
-
timephasedDataFromTaskDuration
public final void timephasedDataFromTaskDuration(Calendar calendar)
Generates list of time phased data based on the task duration and the scheduled start date.
- Parameters:
calendar- The calendar to generate time phased data from.
-
toString
public String toString()
Returns short string representation of the instance of the
ResourceAssignmentclass. The exact details of the representation are unspecified and subject to change.
-
-