|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectno.ubicollab.osgi.DBConnection
public class DBConnection
The Class DBConnection offers methods to open/close database connections, and also the read/write methods that is required by Service Registry.
Field Summary | |
---|---|
static java.lang.String |
newline
Gets the corrects newline character for the system the bundle runs on. |
Constructor Summary | |
---|---|
DBConnection()
This Constructor will create a new DBConnection instance. |
Method Summary | |
---|---|
boolean |
addService(java.lang.String serviceURI,
java.lang.String descriptionURI,
java.lang.String name,
java.lang.String type,
java.lang.String location,
java.lang.String owner,
java.lang.String description)
Adds a new service record to the database. |
boolean |
deleteService(int serviceID)
Deletes a service refrence record from the database. |
void |
disconnectFromDatabase()
Disconnects from database. |
java.lang.String |
getServiceDetails(int serviceId)
Gets all registered information about the service specified by the provided service ID. |
java.lang.String |
getServiceDetails(java.lang.String serviceUri)
Gets all registered information about the service specified by the provided service URI. |
java.lang.String |
getServiceList(java.lang.String name,
java.lang.String type,
java.lang.String location,
java.lang.String owner,
java.lang.String description)
Get a list of services matching the specified query parameters. |
boolean |
updateService(int serviceID,
java.lang.String serviceURI,
java.lang.String descriptionURI,
java.lang.String name,
java.lang.String type,
java.lang.String location,
java.lang.String owner,
java.lang.String description)
Updates a service record to the database, based on the serviceID . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String newline
Constructor Detail |
---|
public DBConnection()
Method Detail |
---|
public void disconnectFromDatabase()
public boolean addService(java.lang.String serviceURI, java.lang.String descriptionURI, java.lang.String name, java.lang.String type, java.lang.String location, java.lang.String owner, java.lang.String description)
type
- Classification of service (in service type hierarchy)descriptionURI
- The description URI for the serviceowner
- The owner or responible for the servicedescription
- the textual service descriptionlocation
- The location of the servicename
- A selected name the user should be able to understandserviceURI
- The Url to the service bundle.
true
if the service refrence is successfully added,
false
otherwise.public boolean updateService(int serviceID, java.lang.String serviceURI, java.lang.String descriptionURI, java.lang.String name, java.lang.String type, java.lang.String location, java.lang.String owner, java.lang.String description)
serviceID
.
serviceID
- the service ID of the service to updatedescriptionURI
- The description URI for the servicetype
- Classification of service (in service type hierarchy)owner
- The owner or responible for the servicedescription
- the textual service descriptionlocation
- The location of the servicename
- A selected name the user should be able to understandserviceURI
- The Url to the service bundle.
true
if the service refrence is successfully updated,
false
otherwise.public boolean deleteService(int serviceID)
serviceID
- the service ID for the service to remove
true
if the service refrence is successfully updated,
false
otherwise.public java.lang.String getServiceList(java.lang.String name, java.lang.String type, java.lang.String location, java.lang.String owner, java.lang.String description)
type
- The type of serviceowner
- The owner of the srvicedescription
- the description of the servicelocation
- The location of the servicename
- The name of the service
public java.lang.String getServiceDetails(java.lang.String serviceUri)
serviceUri
- The Uri to the service. This location is required to be unique
in registry and this ensures that only one service is returned.
public java.lang.String getServiceDetails(int serviceId)
serviceId
- The unique id refrencing the service.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |