Delete() operation: Removes a contract
from its participants by removing the connectors from the chain
of responsibility of each participant. However, because the
host language is Java, it does not delete the contract object.
getParticipant() operations: A set of
operations, one per participant, each of which returns a contract
participant. For instance, for a participant Account savings
an operation public Account getsavings(){ return savings;
} will be generated.
setAttribute() and getAttribute()
operations: For each contract attribute, two
operations are generated: one to set the attribute value and one
to return the attribute value. For instance, for a contract
attribute double Limit, the operations generated
will be: public void setLimit(double _Limit){Limit = _Limit;}
and public double getLimit(){return Limit;}. These
operations are to be used for the configuration of contracts.
initialize() operation: This is an operation
called by default in each contract constructor. If you wish
to perform some actions at contract initialization time,
this is the operation to use. Notice that you have to
define explicitly the operation in the contracts specification operation
section.
String getName() and String toString()
operations: These are operations that are used in the animator.
The former returns the contract name and the latter the name
of the contract together with the classes of its participants.
toString()
can not currently be "coordinated". Operations selected
as coordinated will be the ones that will appear in the generated
file participantClassInterface.java and will be renamed
according to the contracts design pattern.componentClassName.java: For instance, for a
component class Account, the generated file will be Account.java.
This files contains the adapted version of the component, i.e
the Subject and the SubjectToProxyAdapter parts of the pattern,
merged into a singe Java class.
componentClassNameInterface.java: For instance,
AccountInterface.java. It contains a Java interface
with the component operations that are declared as "coordinated".
It corresponds to the SubjectInterface part of the pattern.
IcomponentClassNamePartner.java: For instance,
IAccountPartner.java. It corresponds to the ISubjectPartner
part of the pattern and inherits from a CDE framework class
CrdContractPartner that defines some common functionalites
for managing the chain of responsibility, independently of specific
partners.
contractName.java: The
implementation of the contract, corresponding to the Contract
class of the pattern.
contractNameparticipantName_participantClassConnector.java:
Corresponds to the Ct-i-SubjectConnector of the pattern. For
each contract participant there is a corresponding file of this
type. For instance, for a contract FlexiblePackage with participants
checking and savings of class Account, the generated files will
be FlexiblePackagechecking_AccountConnector.java
and FlexiblePackagesavings_AccountConnector.java.
Account
that belonged to the Java package banking, will be,
after the generation, at the subdirectory /generation/banking.
© Copyright 2001 ATX Software SA. All rights
reserved.