FileDocCategorySizeDatePackage
DomainRegistryI.javaAPI DocGlassfish v2 API6459Fri May 04 22:33:32 BST 2007com.sun.enterprise.admin.common.domains.registry

DomainRegistryI

public interface DomainRegistryI

Fields Summary
Constructors Summary
Methods Summary
public booleancontainsDomain(DomainEntry de)
Indicate if the registry contains the given entry.

precondition - entry is not null

postcondition - registry has not been modified

param
de the entry whose presence in the registry is to be determined
return
true iff the entry is in the registry
throws
DomainRegistryException if there's a problem in accessing the registry

public DomainEntrygetDomain(java.lang.String name)
Return the domain entry given a domain entry name.

precondition - the given name is not null

postcondition - the registry has not been modified

param
name - the name of the domain whose entry is to be obtained
return
DomainEntry from the registry whose name is that given. Returns null if no match.
throws
DomainRegistryException if there's a problem accessing the registry

public java.util.Iteratoriterator()
Obtain an iterator over the entries in the registry. The entries will appear in alphabetically sorted order by name. This iterator will operate on a snapshot of the registry obtained at the time this method is executed - changes to the registry during the lifetime of the iterator returned from this method will not affect the iterator.

return
an iterator (whose contents are all instances of {@link DomainEntry}
throws
DomainRegistryException if there's a problem in obtaining the iterator.

public voidregisterDomain(DomainEntry de)
Register the given domain information.

Precondition - the domain entry's name and location are unique within the registry

Postcondition - the entry is registered under the domain entry's name within the registry.

param
de the domain entry to be registered. The name and location of this entry must be unique within the registry.
throws
NullPointerException if de is null
throws
DomainRegistryException if there's a problem with registering the domain entry.

public voidreregisterDomain(DomainEntry de)
Re-register the given domain entry with the registry.

Precondition - a domain with the same name and location as the given domain entry is already registered in the registry or no domain is registered which has either the same name or the same location (or both).

Postcondition - the domain entry registered against the given domain entry's name is the given domain entry.

param
de the domain entry to be re-registered
throws
DomainRegistryException if no domain with the given domain entry's name is registered, or if there are other problems with updating the registry

public intsize()
Get the number of entries in the registry.

return
Return the number of items in the registry
throws
DomainRegistryException if there's a problem accessing the registry

public voidunregisterDomain(java.lang.String domain_name)
Remove the registration of the domain with the given name.

Precondition - a domain is registered within the registry with the given name

Postcondition - the registry contains no entry for the given name

param
domain_name the name of the domain to be unregistered
throws
NullPointerException if the domain_name is null
throws
DomainRegistryException if the domain_name is unknown with the registry, or if there's a problem in deleting the registry entry

public voidunregisterDomain(DomainEntry de)
Remove the registration of the given domain entry.

Precondition - a domain with the same name and location as the given domain is registered in the registry

Postcondition - the registry contains no entry for the given name

param
de the domain entry to be unregistered
throws
NullPointerException if de is null
throws
DomainRegistryException if de is not registered within the registry, or if there's a problem in deleting the registry entry