class AttributeSpecification ; each attribute has a weight and contains the
collection of the possible values.
There are two issues: first the type of attributes
values, second the range
of possible values. We use the interface Value to accommodate several
different value types. Since we assume that only discrete values are possible,
the range of attribute values is expressed by enumeration.
How do we represent a proposal and the preferences?
As shown in Figure 20.4, the proposals are represented by class Proposal
that consists of a collection of attributes. Each attribute is characterized by
a value; in addition the attribute has a reference to the set of admissible
values from which the value must be picked. Users' preferences are repre-
sented by class PreferenceMap ; the preferences are defined at the attribute
level by means of the class AttributeMap , which assigns a weight to the single
attributes and ranks the values of the attribute. The ranking is accomplished
by the RankedAttribute class, which adds to the class Attribute the rank for a
How do we realize the negotiation process?
As shown in Figure 20.5, the negotiation is managed by the mediator that
ensures fairness of the process; its task is to drive the proposal exchange
between the service provider and service customer. Interface Negotiator
represents the two contenders of the negotiation process, the classes that
implement it provide a specific negotiation strategy. The negotiation
strategies can vary a great deal. We define the basic strategy described in
Section 20.2.1, by class BasicNegotiator .
Figure 20.4 Problem representation