|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectno.ubicollab.osgi.ServiceRegistryImpl
public class ServiceRegistryImpl
An interface for UbiCollab Service Registry. Provides the neccessary functionality for the centraliced service registry. The registry will be accessible through web service calls.
Constructor Summary | |
---|---|
ServiceRegistryImpl(DBConnection dbConn)
This Constructor creates a new instance. |
Method Summary | |
---|---|
boolean |
addService(java.lang.String serviceURI,
java.lang.String descriptionURI,
java.lang.String friendlyName,
java.lang.String type,
java.lang.String location,
java.lang.String owner,
java.lang.String description)
Adds a service reference to the registry. |
boolean |
deleteService(int serviceId)
Removes the service which matches the provided service ID. |
java.lang.String |
getLogItems(java.lang.String logLevel,
int numItems)
Read from the log and return selected log items in a XML-formatted string. |
java.lang.String |
getServiceDetails(int serviceId)
Gets all registered information about the service specified by the provided serviceId . |
java.lang.String |
getServiceDetails(java.lang.String serviceUri)
Gets all registered information about the service specified by the provided serviceUri . |
java.lang.String |
getServices()
This method returns an XML-formatted list containing all the services in the registry. |
java.lang.String |
getServices(java.lang.String name,
java.lang.String type,
java.lang.String location,
java.lang.String owner,
java.lang.String description)
Method to return a list of service refrences matching the criteria specified in the query. |
boolean |
updateService(int serviceID,
java.lang.String serviceURI,
java.lang.String descriptionURI,
java.lang.String friendlyName,
java.lang.String type,
java.lang.String location,
java.lang.String owner,
java.lang.String description)
Updates the properties of service reference in the service registry. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceRegistryImpl(DBConnection dbConn)
dbConn
- the db connection to use for queriesMethod Detail |
---|
public boolean addService(java.lang.String serviceURI, java.lang.String descriptionURI, java.lang.String friendlyName, java.lang.String type, java.lang.String location, java.lang.String owner, java.lang.String description)
addService
in interface ServiceRegistry
friendlyName
- A selected name the user should be able to understandtype
- Classification of service (in service type hierarchy)descriptionURI
- The description URI for the serviceowner
- The owner or responsible for the servicedescription
- a textual service descriptionlocation
- The location of the serviceserviceURI
- The Url to the service bundle.
true
if the service refrence is successfully added,
false
otherwise.public java.lang.String getServiceDetails(java.lang.String serviceUri)
serviceUri
.
The format used for the returned data is the minimum for a well-formed
XML-document, containing only one element with this syntax:
<Service ID="int" ServiceUri="String" DescriptionUri="String" Name="String" Type="String" Location="String" Owner="String" Description="String"/>
getServiceDetails
in interface ServiceRegistry
serviceUri
- The service URI that uniquly identifies the service.
String
with an XML-document if successful,
"NO SERVICES MATCHES THE QUERY" otherwise.public java.lang.String getServiceDetails(int serviceId)
serviceId
.
The format used for the returned data is the minimum for a well-formed
XML-document, containing only one element with this syntax:
<Service ID="int" ServiceUri="String" DescriptionUri="String" Name="String" Type="String" Location="String" Owner="String" Description="String"/>
getServiceDetails
in interface ServiceRegistry
serviceId
- The unique id refrencing the service.
String
with an XML-document if successful,
"NO SERVICES MATCHES THE QUERY" otherwise.public java.lang.String getServices()
The xml-structure used to represent the returned service list is:
<?xml version='1.0'?> <Servicelist> <Service ID="int" ServiceUri="String" DescriptionUri="String" Name="String" Type="String" Location="String" Owner="String" Description="String"/>
... more services ...
</Servicelist>
getServices
in interface ServiceRegistry
String
containing an XML-formatted list with 0..n
service elements.public java.lang.String getServices(java.lang.String name, java.lang.String type, java.lang.String location, java.lang.String owner, java.lang.String description)
The xml-structure used to represent the returned service list is:
<?xml version='1.0'?> <Servicelist> <Service ID="int" ServiceUri="String" DescriptionUri="String" Name="String" Type="String" Location="String" Owner="String" Description="String"/>
... more services ...
</Servicelist>
getServices
in interface ServiceRegistry
type
- the type of service, or a partial type specificationowner
- the owner of the service, or a part of the owners namedescription
- the textual description of the servicelocation
- the location for the service, or a part of the locationname
- the name of the service, or a part of it
String
containing an XML-formatted list with 0..n
service elements.public boolean deleteService(int serviceId)
deleteService
in interface ServiceRegistry
serviceId
- The service ID for the service to remove
true
if the service reference is successfully removed,
false
otherwise.public java.lang.String getLogItems(java.lang.String logLevel, int numItems)
The xml-structure used to represent the returned log is:
<?xml version='1.0'?> <Log> <Logitem Date="dd.mm.yyyy" Time="hh:mm:ss" Level="String" Message="String"/>
... more log items ...
</Log>
getLogItems
in interface ServiceRegistry
logLevel
- The log level to include in the report. Valid arguments are:
'DEBUG', 'INFO', 'WARNING', 'ERROR', 'FATAL' and 'ALL' for all types.numItems
- The number of log items to include in the report
String
containg the resulting XMLpublic boolean updateService(int serviceID, java.lang.String serviceURI, java.lang.String descriptionURI, java.lang.String friendlyName, java.lang.String type, java.lang.String location, java.lang.String owner, java.lang.String description)
serviceID
.
updateService
in interface ServiceRegistry
serviceID
- the service ID for the service to updatefriendlyName
- A selected name the user should be able to understanddescriptionURI
- The description URI for the servicetype
- Classification of service (in service type hierarchy)owner
- The owner or responsible for the servicedescription
- a textual service descriptionlocation
- The location of the serviceserviceURI
- The Url to the service bundle.
true
if the service refrence is successfully updated,
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |