|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--amwebarsentitlementservice.provider.ProviderTable
This class stores all AMWebARSProviders of the AMWebARSEntitlementService. The class is a Singleton. There is only one instance of it. This class and the AMWebARSProvider fullfil the Single Instance by ID pattern.
AMWebARSProvider
, Serialized FormField Summary | |
static java.lang.String |
PROVIDER_TABLE_XML_NAME
|
Constructor Summary | |
protected |
ProviderTable()
|
Method Summary | |
void |
clear()
Removes all elements of the ProviderTable. |
protected java.lang.Object |
clone()
It isn't permited to clone the object: The clone method throws the CloneNotSupportedException. |
boolean |
containsProvider(AMWebARSProvider provider)
Tests whether a provider is contained in the ProviderTable. |
boolean |
containsProviderID(java.lang.String provider_id)
Tests whether a Provider with given provider_id is contained in the ProviderTable. |
boolean |
equals(java.lang.Object other_object)
Tests whether this ProviderTable is equal to another. |
void |
fromXML(org.jdom.Document xml_provider_table)
Updates the ProviderTable from an XML datastructure. |
static ProviderTable |
getInstance()
Returns the only instance of the ProviderTable. |
AMWebARSProvider |
getProvider(java.lang.String provider_id)
Returns a provider of a given provider_id. |
boolean |
isEmpty()
Tests whether this Table contains no Providers. |
void |
load(java.io.InputStream in)
Loads the ProviderTable from an input stream. |
AMWebARSProvider |
registerProvider(java.lang.String provider_id)
Registers a new Provider in the ProviderTable. |
AMWebARSProvider |
removeProvider(AMWebARSProvider provider)
Removes a Provider from the ProviderTable. |
AMWebARSProvider |
removeProvider(java.lang.String provider_id)
Removes a Provider with given provider_id from the ProviderTable. |
int |
size()
Returns the size of the table that means the number of provider stored in it. |
void |
store(java.io.OutputStream out)
Stores the ProviderTable into an output stream. |
java.lang.String |
toString()
|
org.jdom.Document |
toXML()
Translates the ProviderTable to XML. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String PROVIDER_TABLE_XML_NAME
Constructor Detail |
protected ProviderTable()
Method Detail |
public static ProviderTable getInstance()
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- public AMWebARSProvider getProvider(java.lang.String provider_id) throws java.util.NoSuchElementException
provider_id
- String ID of the providerjava.util.NoSuchElementException
- If the provider isn't found.public AMWebARSProvider registerProvider(java.lang.String provider_id)
provider_id
- String ID of the Provider that is registered.NullPointerException
- if parameter is nullpublic AMWebARSProvider removeProvider(java.lang.String provider_id) throws java.util.NoSuchElementException
String
- provider_id of the Provider to be removedjava.util.NoSuchElementException
- if the Provider isn't foundNullPointerException
- if parameter is nullpublic AMWebARSProvider removeProvider(AMWebARSProvider provider) throws java.util.NoSuchElementException
provider
- Provider to be removedjava.util.NoSuchElementException
- if the Provider isn't foundNullPointerException
- if parameter is nullpublic boolean containsProvider(AMWebARSProvider provider)
provider
- Provider to be looked for.NullPointerException
- if parameter is nullpublic boolean containsProviderID(java.lang.String provider_id)
provider_id
- String ID of the Provider to be looked for.NullPointerException
- if parameter is nullpublic int size()
public boolean isEmpty()
public void clear()
public boolean equals(java.lang.Object other_object)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public org.jdom.Document toXML()
public void fromXML(org.jdom.Document xml_provider_table) throws sun.io.MalformedInputException
xml_provider_table
- Document that describes the table.public void load(java.io.InputStream in) throws java.io.IOException, org.jdom.JDOMException
in
- InputStreampublic void store(java.io.OutputStream out) throws java.io.IOException
out
- OutputStream
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |