Class Contract
- java.lang.Object
-
- es.bsc.dataclay.util.MgrObject<ContractID>
-
- es.bsc.dataclay.util.management.contractmgr.Contract
-
public final class Contract extends MgrObject<ContractID>
This class represents a system contract.
-
-
Constructor Summary
Constructors Constructor Description Contract()
Basic constructorContract(String namespaceOfProvider, AccountID providerID, Set<AccountID> newapplicantsIDs, List<InterfaceInContract> newInterfacesInContract, Calendar beginDateOfContract, Calendar endDateOfContract)
Builds a new contractContract(String namespaceOfProvider, String accountOfProvider, List<InterfaceInContract> newInterfacesInContract, Calendar beginDateOfContract, Calendar endDateOfContract)
Builds a new public contract
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
Set<AccountID>
getApplicantsAccountsIDs()
Calendar
getBeginDate()
Calendar
getEndDate()
Map<InterfaceID,InterfaceInContract>
getInterfacesInContract()
List<InterfaceInContract>
getInterfacesInContractSpecs()
Get the Contract::interfacesInContractSpecsString
getNamespace()
Get the Contract::namespaceNamespaceID
getNamespaceID()
Get the Contract::namespaceIDAccountID
getProviderAccountID()
Get the Contract::providerAccountint
hashCode()
boolean
isActive()
boolean
isPublicAvailable()
void
setApplicantsAccountsIDs(Set<AccountID> accountsIDsofTheApplicants)
void
setBeginDate(Calendar beginDateOfContract)
void
setEndDate(Calendar endDateOfContract)
void
setInterfacesInContract(Map<InterfaceID,InterfaceInContract> newInterfacesInContract)
void
setInterfacesInContractSpecs(List<InterfaceInContract> newinterfacesInContractSpecs)
Set the Contract::interfacesInContractSpecsvoid
setNamespace(String newnamespace)
Set the Contract::namespacevoid
setNamespaceID(NamespaceID newnamespaceID)
Set the Contract::namespaceIDvoid
setProviderAccountID(AccountID newproviderAccount)
Set the Contract::providerAccountvoid
setPublicAvailable(boolean isContractPublic)
String
toString()
-
Methods inherited from class es.bsc.dataclay.util.MgrObject
getDataClayID, setDataClayID
-
-
-
-
Constructor Detail
-
Contract
public Contract()
Basic constructor
-
Contract
public Contract(String namespaceOfProvider, AccountID providerID, Set<AccountID> newapplicantsIDs, List<InterfaceInContract> newInterfacesInContract, Calendar beginDateOfContract, Calendar endDateOfContract)
Builds a new contract- Parameters:
namespaceOfProvider
- the namespace of the provider of the contractaccountOfProvider
- Account name of providernewapplicantsNames
- the applicants account namesnewInterfacesInContract
- the interfaces this contract can access and accessible method implementationsbeginDateOfContract
- the date this contract is valid fromendDateOfContract
- the date this contract expires
-
Contract
public Contract(String namespaceOfProvider, String accountOfProvider, List<InterfaceInContract> newInterfacesInContract, Calendar beginDateOfContract, Calendar endDateOfContract)
Builds a new public contract- Parameters:
namespaceOfProvider
- the namespace of the provider of the contractaccountOfProvider
- Account name of providernewInterfacesInContract
- the interfaces this contract can access and accessible method implementationsbeginDateOfContract
- the date this contract is valid fromendDateOfContract
- the date this contract expires
-
-
Method Detail
-
getNamespace
public String getNamespace()
Get the Contract::namespace- Returns:
- the namespace
-
setNamespace
public void setNamespace(String newnamespace)
Set the Contract::namespace- Parameters:
newnamespace
- the namespace to set
-
getApplicantsAccountsIDs
public Set<AccountID> getApplicantsAccountsIDs()
- Returns:
- the applicantsAccountsID
-
setApplicantsAccountsIDs
public void setApplicantsAccountsIDs(Set<AccountID> accountsIDsofTheApplicants)
- Parameters:
accountsIDsofTheApplicants
- the applicantAccountID to set
-
getInterfacesInContractSpecs
public List<InterfaceInContract> getInterfacesInContractSpecs()
Get the Contract::interfacesInContractSpecs- Returns:
- the interfacesInContractSpecs
-
setInterfacesInContractSpecs
public void setInterfacesInContractSpecs(List<InterfaceInContract> newinterfacesInContractSpecs)
Set the Contract::interfacesInContractSpecs- Parameters:
newinterfacesInContractSpecs
- the interfacesInContractSpecs to set
-
getInterfacesInContract
public Map<InterfaceID,InterfaceInContract> getInterfacesInContract()
- Returns:
- the interfacesInContract
-
setInterfacesInContract
public void setInterfacesInContract(Map<InterfaceID,InterfaceInContract> newInterfacesInContract)
- Parameters:
newInterfacesInContract
- the interfacesInContract to set
-
getProviderAccountID
public AccountID getProviderAccountID()
Get the Contract::providerAccount- Returns:
- the providerAccount
-
setProviderAccountID
public void setProviderAccountID(AccountID newproviderAccount)
Set the Contract::providerAccount- Parameters:
newproviderAccount
- the providerAccount to set
-
getBeginDate
public Calendar getBeginDate()
- Returns:
- the beginDate
-
setBeginDate
public void setBeginDate(Calendar beginDateOfContract)
- Parameters:
beginDateOfContract
- the beginDate to set
-
getEndDate
public Calendar getEndDate()
- Returns:
- the endDate
-
setEndDate
public void setEndDate(Calendar endDateOfContract)
- Parameters:
endDateOfContract
- the endDate to set
-
isPublicAvailable
public boolean isPublicAvailable()
- Returns:
- the isPublic
-
setPublicAvailable
public void setPublicAvailable(boolean isContractPublic)
- Parameters:
isContractPublic
- whether the contract must be set as public or not
-
isActive
public boolean isActive()
- Returns:
- the isActive
-
getNamespaceID
public NamespaceID getNamespaceID()
Get the Contract::namespaceID- Returns:
- the namespaceID
-
setNamespaceID
public void setNamespaceID(NamespaceID newnamespaceID)
Set the Contract::namespaceID- Parameters:
newnamespaceID
- the namespaceID to set
-
-