public static class IlvGanttSelectionSupport.DefaultIdentifierFactory extends Object implements IlvGanttSelectionSupport.IdentifierFactory
IdentifierFactory
.
This implementation relies on the identifiers of activities and resources
as defined by the getID()
method on these Gantt model objects
and requires that these identifiers are unique over the model.
The identifiers are built as follows:
IlvActivity
- Identifier of the activity as returned by
getID()
,IlvConstraint
- Identifier of the from
and
to
activities, separated with a slash. For example, a
constraint from the activity A-1
to the activity
A-2
gets the identifier A-1/A-2
,IlvResource
- Identifier of the resource as returned by
getID()
,IlvReservation
- Identifier of the activity and resource, separated
with a slash. For example, a reservation of the resource
R-1
for the activity A-1
gets the
identifier A-1/R-1
.Constructor and Description |
---|
DefaultIdentifierFactory()
Creates a
DefaultIdentifierFactory . |
Modifier and Type | Method and Description |
---|---|
String |
getActivityId(String reservationId)
Returns the identifier of the activity associated to a reservation.
|
String |
getFromActivityId(String constraintId)
Returns the identifier of the fromActivity of a constraint.
|
String |
getIdentifier(Object object)
Returns a unique identifier for a Gantt model object.
|
String |
getResourceId(String reservationId)
Returns the identifier of the resource associated to a reservation.
|
String |
getToActivityId(String constraintId)
Returns the identifier of the toActivity of a constraint.
|
public DefaultIdentifierFactory()
DefaultIdentifierFactory
.public String getIdentifier(Object object)
getIdentifier
in interface IlvGanttSelectionSupport.IdentifierFactory
object
- A Gantt model object, that is: either an
IlvActivity
, an IlvConstraint
,
an IlvReservation
, or an
IlvResource
.public String getFromActivityId(String constraintId)
getFromActivityId
in interface IlvGanttSelectionSupport.IdentifierFactory
constraintId
- The identifier of the constraint.public String getToActivityId(String constraintId)
getToActivityId
in interface IlvGanttSelectionSupport.IdentifierFactory
constraintId
- The identifier of the constraint.public String getActivityId(String reservationId)
getActivityId
in interface IlvGanttSelectionSupport.IdentifierFactory
reservationId
- The identifier of the reservation.public String getResourceId(String reservationId)
getResourceId
in interface IlvGanttSelectionSupport.IdentifierFactory
reservationId
- The identifier of the reservation.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.