|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IlvReservation
IlvReservation defines the abstract behavior of an
assignment of an IlvResource to an IlvActivity.
The activity reserving the resource is immutable once the
IlvReservation has been created. However, the resource that has
been reserved can be modified by invoking setResource(ilog.views.gantt.IlvResource).
IlvReservation implementations are expected to route their
property change events to the Gantt data model.
Therefore, although there is no accessor to the data model in this interface,
the reservation implementation must have some method of obtaining the model
it belongs to. Here is an example of how the IlvReservation
implementation should fire its property change events:
void fireEvent (ReservationEvent event) {
IlvGanttModel model = .....
if (model != null)
model.fireReservationEvent(event);
}
| Method Summary | |
|---|---|
IlvActivity |
getActivity()
Returns the activity for this reservation. |
IlvResource |
getResource()
Returns the resource for this reservation. |
void |
setGanttModelImpl(IlvGanttModel model)
This method is invoked by the IlvGanttModel when the reservation
is added or removed. |
void |
setResource(IlvResource resource)
Sets the resource for this reservation. |
| Method Detail |
|---|
IlvResource getResource()
void setResource(IlvResource resource)
resource must be a member of the same
data model. Before the resource is modified the reservation's data model,
if any, will fire an aboutToChange
ReservedResourceEvent.
After the resource is modified, the reservation's data model will fire a
changed ReservedResourceEvent.
The implementation of this method can use
IlvGanttModelUtil.checkValidMemberResource(ilog.views.gantt.IlvResource, ilog.views.gantt.IlvGanttModel) to validate
resource.
resource - The resource.
IllegalArgumentException - if resource is
null or is not a member of the same data model as this
reservationReservationEvent,
ReservationListener.reservationChanged(ilog.views.gantt.event.ReservationEvent)IlvActivity getActivity()
void setGanttModelImpl(IlvGanttModel model)
IlvGanttModel when the reservation
is added or removed.
Warning: This method is considered to be part of an
IlvReservation's internal implementation and is not a public
API.
You should only invoke this method directly if you have created your own
IlvGanttModel implementation.
model - The data model that this reservation has been added to, or
null if this reservation has been removed from the data model.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||