|
© 2001 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines the public interface of the DiscountMgmt
service. This service controls the persistance of discount sets and the
creation and access of discounts.
Method Summary | |
void |
activateDiscount(QualificationDiscountId id)
Mark the discount definition indicated by id as active. |
void |
addDiscountSet(java.lang.String setName,
java.lang.String source)
Stores the XML definition of the discount set if the discount set is not already present. |
void |
deactivateDiscount(QualificationDiscountId id)
Mark the discount definition indicated by id as inactive. |
boolean |
deleteDiscount(QualificationDiscountId id)
Delete the discount specified by id . |
boolean |
deleteDiscount(java.lang.String setName,
java.lang.String discountName)
Delete the discount specified by setName and
discountName . |
boolean |
deleteDiscountSet(java.lang.String setName)
Delete the discount set definition specified by setName . |
int |
deploySet(java.lang.String setName)
Deploys the discount set. |
QualificationDiscountDef |
getDiscountById(QualificationDiscountId id)
Gets a discount ( QualificationDiscountDef ) by it's id
(QualificationDiscountId ). |
QualificationDiscountDef |
getDiscountByName(java.lang.String setName,
java.lang.String discountName)
Gets a discount definition ( QualificationDiscountDef ) by its
name. |
java.util.Set |
getDiscountsById(java.util.Set idSet,
java.util.Set qualDiscountDefSet)
Gets a Set of QualificationDiscountDef s
whose ids (QualificationDiscountId )s are in the
Set argument passed. |
java.util.Set |
getGlobalDiscounts()
Gets all the global discounts currently deployed |
java.lang.String |
retrieveDiscountSet(java.lang.String setName)
Gets the XML representation of the discount set by it's name. |
void |
updateDiscountSet(java.lang.String setName,
java.lang.String source)
Updates the set named setName to the new definition
indicated by source . |
Method Detail |
public void addDiscountSet(java.lang.String setName, java.lang.String source) throws java.rmi.RemoteException, SetAlreadyExistsException, SetPersistenceException
setName
- a String indicating the discount set's namesource
- a String, the XML source definition of the discoun setSetAlreadyExistsException
- if a discount set with this
setName
already existsSetPersistenceException
- if the set cannot be saved for some
reasonjava.rmi.RemoteException
- thrown on a communication errorpublic void activateDiscount(QualificationDiscountId id) throws java.rmi.RemoteException, DiscountNotFoundException
id
as active.id
- the QualificationDiscountId
of the discount to
activateDiscountNotFoundException
- if the discount specified by
id
cannot be foundjava.rmi.RemoteException
- thrown on a communication errorpublic void deactivateDiscount(QualificationDiscountId id) throws java.rmi.RemoteException, DiscountNotFoundException
id
as inactive.id
- the QualificationDiscountId
of the discount to
deactivateDiscountNotFoundException
- if the discount specified by
id
cannot be foundjava.rmi.RemoteException
- thrown on a communication errorpublic int deploySet(java.lang.String setName) throws java.rmi.RemoteException, SetNotFoundException, DiscountParsingException, SetPersistenceException, DiscountDeployException
addDiscountSet
. During parsing definitons that are
deployed are marked in set definition and the definition is re-saved.setName
- a String indicating the discount set's nameSetNotFoundException
- if the set specified setName
cannot be found.DiscountParsingException
- if an unrecoverable failure occurs while
that attempting to parse the set definition that prevents any discounts
from being created.SetPersistenceException
- if the updated set definiton cannot be
saved.DiscountDeployException
- if any errors occur that cause one or
exceptions to not deployjava.rmi.RemoteException
- thrown on a communication erroraddDiscountSet(java.lang.String, java.lang.String)
public boolean deleteDiscount(QualificationDiscountId id) throws DiscountNotFoundException, DiscountInUseException, java.rmi.RemoteException
id
. A discount can only be
deleted if it is not being used in a DiscountAssociation
.id
- the QualificationDiscountId
of the discount to
deleteDiscountAssociation
.DiscountNotFoundException
- if the discount does not exists, or
has not been deployedDiscountInUseException
- if the discount could not be deleted
because it is being usedjava.rmi.RemoteException
- thrown on a communication errorDiscountAssociation
public boolean deleteDiscount(java.lang.String setName, java.lang.String discountName) throws DiscountNotFoundException, DiscountInUseException, java.rmi.RemoteException
setName
and
discountName
. A discount can only be deleted if it is not
being used in a DiscountAssociation
.setName
- a String, the name of the set the discount being deleted
belongs todiscountName
- a String, the name the discount being deletedDiscountAssociation
.DiscountNotFoundException
- if the discount does not exists, or
has not been deployedDiscountInUseException
- if the discount could not be deleted
because it is being usedjava.rmi.RemoteException
- thrown on a communication errorDiscountAssociation
public boolean deleteDiscountSet(java.lang.String setName) throws SetNotFoundException, DiscountSetInUseException, java.rmi.RemoteException
setName
.
he set can only be deleted if none of the discounts it defines are in
use, that is they were deployed and not deleted.setName
- a String, the name of the set to deleteSetNotFoundException
- if the set could not be foundDiscountSetInUseException
- if one or more discounts from the set
are still deployedjava.rmi.RemoteException
- thrown on a communication errorpublic java.util.Set getGlobalDiscounts() throws java.rmi.RemoteException
java.rmi.RemoteException
- thrown on a communication errorpublic QualificationDiscountDef getDiscountById(QualificationDiscountId id) throws java.rmi.RemoteException
QualificationDiscountDef
) by it's id
(QualificationDiscountId
).id
- the QualificationDiscountId
of the discountQualificationDiscountDef
specifed by the id or
null if the discount was not foundjava.rmi.RemoteException
- thrown on a communication errorpublic java.util.Set getDiscountsById(java.util.Set idSet, java.util.Set qualDiscountDefSet) throws java.rmi.RemoteException
Set
of QualificationDiscountDef
s
whose ids (QualificationDiscountId
)s are in the
Set
argument passed.idSet
- a Set of QualificationDiscountId
objects. This
Set will not be modified by this method.qualDiscountDefSet
- an empty set into which the
QualificationDiscountDef
objects will be placed. This set
must be modifiable. Anything that was already in the set will be removed.qualDiscountDefSet
parameter, of QualificationDiscountDef
objects whose
QualificationDiscountId
s match those passed in the
idSet
parameter. If no matching
QualificationDiscountDef
objects the returned set will be
empty.java.rmi.RemoteException
- thrown on a communication errorpublic QualificationDiscountDef getDiscountByName(java.lang.String setName, java.lang.String discountName) throws java.rmi.RemoteException
QualificationDiscountDef
) by its
name. Since discount name are only unquie within a discount set the
set name is required also.setName
- the name of the set to which the discount belongsdiscountName
- the id (QualificationDiscountId
) of the
discount to retrieveQualificationDiscountDef
),
or null if the discount was not foundjava.rmi.RemoteException
- thrown on a communication errorpublic java.lang.String retrieveDiscountSet(java.lang.String setName) throws java.rmi.RemoteException, SetNotFoundException
setName
- the name of the discount set definiton to retrieveSetNotFoundException
- if the set could not be foundjava.rmi.RemoteException
- thrown on a communication errorpublic void updateDiscountSet(java.lang.String setName, java.lang.String source) throws java.rmi.RemoteException, SetNotFoundException, SetPersistenceException
setName
to the new definition
indicated by source
.setName
- the name of the set to updatesource
- the new XML discount set defintion that will be specified
by setName
SetNotFoundException
- if a set called setName
isn't
already presentSetPersistenceException
- if the new set cannot be saved.java.rmi.RemoteException
- thrown on a communication error
|
© 2001 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |