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 void
delete()
Deletes resource assignment from project assignments collection.boolean
equals(ResourceAssignment other)
Returns a value indicating whether this instance is equal to a specified instance of theResourceAssignment
class.boolean
equals(Object obj)
Returns a value indicating whether this instance is equal to a specified object.<T> T
get(Key<T,Integer> key)
Returns the value to which the property is mapped in this container.AssignmentBaselineCollection
getBaselines()
Gets AssignmentBaselineCollection object.ExtendedAttributeCollection
getExtendedAttributes()
Gets an instance of the ExtendedAttributeCollection class for this object.UUID
getGuid()
Gets unique identifier for this assignment.com.aspose.ms.System.Collections.Generic.IGenericEnumerable<com.aspose.tasks.IExtendedAttributeParent>
getItems()
Project
getParentProject()
Gets parent project for this assignment.Resource
getResource()
The resource assigned to a task.Task
getTask()
The task to which a resource is assigned.TimephasedDataCollection
getTimephasedData()
Gets the instance ofTimephasedDataCollection
class containing elements ofTimephasedData
(getTimephasedData()
/setTimephasedData(TimephasedDataCollection)
) class.TimephasedDataCollection
getTimephasedData(Date start, Date end)
ReturnsTimephasedDataCollection
object with the instances ofTimephasedData
(getTimephasedData()
/setTimephasedData(TimephasedDataCollection)
) class within given start and end dates ofTimephasedDataType.AssignmentWork
.TimephasedDataCollection
getTimephasedData(Date start, Date end, int timephasedType)
Returns the instanceTimephasedDataCollection
class containing instances ofTimephasedData
(getTimephasedData()
/setTimephasedData(TimephasedDataCollection)
) class within given start and end dates of specifiedTimephasedDataType
.boolean
hasChildren()
Gets a value indicating that this resource assignment has children.int
hashCode()
Returns a hash code value for the instance of theResourceAssignment
class.Date
makeTPs(Date start, double time, Calendar calendar, List<TimephasedData> list, boolean isWorking, int type)
Generates a list of time phased data.<T> void
set(Key<T,Integer> key, T val)
Maps the specified property to the specified value in this container.void
setExtendedAttributes(ExtendedAttributeCollection value)
Sets an instance of the ExtendedAttributeCollection class for this object.void
setGuid(UUID value)
Sets unique identifier for this assignment.void
setResource(Resource value)
The resource assigned to a task.void
setTask(Task value)
The task to which a resource is assigned.void
setTimephasedData(TimephasedDataCollection value)
Sets the instance ofTimephasedDataCollection
class containing elements ofTimephasedData
(getTimephasedData()
/setTimephasedData(TimephasedDataCollection)
) class.void
splitTask(Date start, Date finish, Calendar calendar)
Splits task into two parts.void
timephasedDataFromTaskDuration(Calendar calendar)
Generates list of time phased data based on the task duration and the scheduled start date.String
toString()
Returns short string representation of the instance of theResourceAssignment
class.
-
-
-
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
ResourceAssignment
class.- Parameters:
other
- The specified instance of theResourceAssignment
class to compare with this instance.- Returns:
- True if the specified instance of the
ResourceAssignment
class has the same UID value as this instance; otherwise, false.
-
equals
public boolean equals(Object obj)
Returns a value indicating whether this instance is equal to a specified object.
- Specified by:
equals
in interfacecom.aspose.ms.System.IEquatable<ResourceAssignment>
- Overrides:
equals
in classObject
- Parameters:
obj
- The object to compare with this instance.- Returns:
- True if o is a ResourceAssignment that assign the same resource and task as this instance; otherwise, false.
-
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.Asn
for 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.
-
getResource
public final Resource getResource()
The resource assigned to a task.
- Returns:
- resource assigned to a task.
-
setResource
public final void setResource(Resource value)
The resource assigned to a task.
- Parameters:
value
- the resource assigned to a task.
-
getTask
public final Task getTask()
The task to which a resource is assigned.
- Returns:
- task to which a resource is assigned.
-
setTask
public final void setTask(Task value)
The task to which a resource is assigned.
- Parameters:
value
- the task to which a resource is assigned.
-
getTimephasedData
public final TimephasedDataCollection getTimephasedData()
Gets the instance of
TimephasedDataCollection
class containing elements ofTimephasedData
(getTimephasedData()
/setTimephasedData(TimephasedDataCollection)
) class.- Returns:
- the instance of
TimephasedDataCollection
class containing elements ofTimephasedData
(getTimephasedData()
/setTimephasedData(TimephasedDataCollection)
) class.
-
setTimephasedData
public final void setTimephasedData(TimephasedDataCollection value)
Sets the instance of
TimephasedDataCollection
class containing elements ofTimephasedData
(getTimephasedData()
/setTimephasedData(TimephasedDataCollection)
) class.- Parameters:
value
- the instance ofTimephasedDataCollection
class containing elements ofTimephasedData
(getTimephasedData()
/setTimephasedData(TimephasedDataCollection)
) class.
-
getTimephasedData
public final TimephasedDataCollection getTimephasedData(Date start, Date end, int timephasedType)
Returns the instance
TimephasedDataCollection
class 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
TimephasedData
class.
-
getTimephasedData
public final TimephasedDataCollection getTimephasedData(Date start, Date end)
Returns
TimephasedDataCollection
object 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
TimephasedData
class.
-
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
ResourceAssignment
class.
-
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.Asn
for 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
ResourceAssignment
class. The exact details of the representation are unspecified and subject to change.
-
-