public class ContractManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.String,ServiceLevel> |
serviceLevelAgreements
Stores the service level agreements.
|
Constructor and Description |
---|
ContractManager(org.licas_xml.abs.Element document)
Create a new instance of ContractManager.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contractIsOK(Contract theContract)
Parse the negotiation contract to determine if it is OK.
|
void |
parseServiceContracts(org.licas_xml.abs.Element document)
Parse the admin or service level agreements document to store the
contract details for each service level.
|
Contract |
processClientContract(java.lang.String clientID,
Contract theContract)
Process the specified contract to determine if it meets the requirements
for the service level.
|
protected java.util.HashMap<java.lang.String,ServiceLevel> serviceLevelAgreements
ServiceLevel
.public ContractManager(org.licas_xml.abs.Element document) throws java.lang.Exception
document
- the service level agreements document to parse to
create the service level agreements.java.lang.Exception
- any error.public void parseServiceContracts(org.licas_xml.abs.Element document) throws java.lang.Exception
document
- an XML-based document that stores the relevant details.java.lang.Exception
- any error.public boolean contractIsOK(Contract theContract) throws java.lang.Exception
theContract
- a wrapper for an XML-based document that stores the
contract proposal as an arbitrary description. It must however contain
certain standard elements, such as the service level, relating to the
service level agreement licas contract that it wants to satisfy. This parameter
can also be set to null, to check if the service has a default 'yes' or 'no'
agreement contract installed.java.lang.Exception
- any error.public Contract processClientContract(java.lang.String clientID, Contract theContract) throws java.lang.Exception
clientID
- the id of the client making the request.theContract
- the client contract.java.lang.Exception
- any error.