|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.registration.impl.RepositoryManager
public class RepositoryManager
Manages a local repository for service tags and registration status.
The client code specifies (in the constructor) the file path or the File which is to hold the persisted registration repository. Note that any public method that modifies any part of the DOM for the repository also flushes the repository to the file before returning.
If the specified file exists, the manager loads its contents as the initial value of the document. If the file does not exist, the manager creates a new in-memory document containing the top-level registry element and the default registrationstatus element but does NOT write out this initial data. Writes to the file occur only in response to the client code invoking one of the methods that modifies the DOM.
| Constructor Summary | |
|---|---|
RepositoryManager(java.io.File registrationFile)
Creates a new manager which persists the registration data in the specified File. |
|
| Method Summary | |
|---|---|
void |
add(ServiceTag serviceTag)
Adds an element for the specified ServiceTag object (and writes the revised DOM to the file). |
java.lang.String |
getInstanceURN(java.lang.String productURN)
|
RegistrationService.RegistrationReminder |
getRegistrationReminder()
Returns the current registration status value. |
RegistrationService.RegistrationStatus |
getRegistrationStatus()
Returns the current registration status value. |
RegistrationDescriptor.RegistrationStatus |
getRegistrationStatus(ServiceTag serviceTag)
|
java.util.List<ServiceTag> |
getServiceTags()
Returns a list of all service tag objects represented in the repository. |
ServiceTag.Status |
getStatus(ServiceTag serviceTag)
|
void |
remove(ServiceTag serviceTag)
Removes the XML element corresponding to the specified service tag (and persists the change to the file). |
boolean |
setInstanceURN(java.lang.String productURN,
java.lang.String instanceURN)
|
void |
setRegistrationReminder(RegistrationService.RegistrationReminder reminder)
Sets the registration status value and persists the change to the on-disk repository. |
void |
setRegistrationStatus(RegistrationService.RegistrationStatus status)
Sets the registration status value for all service tags and persists the change to the on-disk repository. |
void |
setRegistrationStatus(ServiceTag serviceTag,
RegistrationDescriptor.RegistrationStatus status)
Sets the status for the specified service tag in the repository (and persists the change to the file). |
void |
setStatus(ServiceTag serviceTag,
ServiceTag.Status status)
|
void |
updateRuntimeValues()
Goes through all service tags in the repository, and updates runtime values if necessary. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RepositoryManager(java.io.File registrationFile)
throws RegistrationException
RegistrationException - for any errors creating the XML parser or
transformer used for reading and writing the registration data or during
the initial load of the repository from the local file| Method Detail |
|---|
public java.util.List<ServiceTag> getServiceTags()
public RegistrationService.RegistrationStatus getRegistrationStatus()
public void setRegistrationStatus(RegistrationService.RegistrationStatus status)
throws RegistrationException
status - the new RegistrationStatus value
RegistrationException - for errors writing the registration data
to the local repositorypublic RegistrationService.RegistrationReminder getRegistrationReminder()
public void setRegistrationReminder(RegistrationService.RegistrationReminder reminder)
throws RegistrationException
reminder - the new RegistrationReminder value
RegistrationException - for errors writing the registration data
to the local repository
public void add(ServiceTag serviceTag)
throws RegistrationException
serviceTag - the ServiceTag for which to add an XML element
RegistrationException - for errors writing the registration data
to the local repository
public void remove(ServiceTag serviceTag)
throws RegistrationException
serviceTag - the ServiceTag for which the XML element should be removed
RegistrationException - for errors writing the registration data
to the local repository
public void setRegistrationStatus(ServiceTag serviceTag,
RegistrationDescriptor.RegistrationStatus status)
throws RegistrationException
serviceTag - the service tag of interestthe - status to be assigned
RegistrationException - for errors writing the registration data
to the local repository
public RegistrationDescriptor.RegistrationStatus getRegistrationStatus(ServiceTag serviceTag)
throws RegistrationException
RegistrationException
public void setStatus(ServiceTag serviceTag,
ServiceTag.Status status)
throws RegistrationException
RegistrationException
public ServiceTag.Status getStatus(ServiceTag serviceTag)
throws RegistrationException
RegistrationException
public java.lang.String getInstanceURN(java.lang.String productURN)
throws RegistrationException
RegistrationException
public boolean setInstanceURN(java.lang.String productURN,
java.lang.String instanceURN)
throws RegistrationException
RegistrationException
public void updateRuntimeValues()
throws RegistrationException
RegistrationException - in case of errors writing the output
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||