public class ServerMetadata
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ServiceRepository |
serviceRepos
Stores the metadata of all services that have loaded onto this server, no matter
where they are stored.
|
Constructor and Description |
---|
ServerMetadata()
Create a new instance of ServerMetadata.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addServiceMeta(java.lang.String theAdminKey,
ServiceMeta theServiceMeta)
Add the metadata for the service.
|
void |
clearServiceMetadata()
Clear all service metadata apart from the server itself.
|
void |
clearServiceMetadata(java.util.ArrayList<java.lang.String> serviceIDs)
Clear all service metadata for the specified services, apart from the server itself.
|
org.licas_xml.abs.Element |
getServiceMeta(java.lang.String theServiceID)
Get a subset of the metadata for the service, for info purposes only.
|
org.licas_xml.abs.Element |
getServiceMeta(java.lang.String theServiceID,
java.util.ArrayList<java.lang.String> toInclude,
ServiceMeta serviceObjMeta)
Get a subset of the metadata for the service, plus other sections.
|
ServiceMeta |
getServiceMeta(java.lang.String theServiceID,
java.lang.String theAdminKey)
Get the service metadata from the repository.
|
org.licas_xml.abs.Element |
getServiceMetaPart(java.lang.String theServiceID,
java.lang.String toInclude,
ServiceMeta serviceObjMeta)
Retrieve just one part of the metadata, not the whole object.
|
java.util.ArrayList<java.lang.String> |
getServiceTypes()
Get a list of all of the service types in the network.
|
java.util.ArrayList<java.lang.String> |
getServiceTypes(java.lang.String category)
Get a list of all of the service types in the network for a
particular category.
|
boolean |
isStoredService(java.lang.String theServiceID)
Return true if the service id is stored for a loaded service.
|
boolean |
removeServiceMeta(java.lang.String theServiceID,
java.lang.String theAdminKey)
Remove the service metadata from the repository.
|
protected ServiceRepository serviceRepos
Service
addService
method
will automatically have metadata created and added to this repository as part of
the process. The metadata that is added is created using the Service
createServiceMeta
method internally, and is by default a description generated through the Java Reflection
classes.public boolean addServiceMeta(java.lang.String theAdminKey, ServiceMeta theServiceMeta)
theAdminKey
- the admin service key for the service.theServiceMeta
- the metadata for the service.public org.licas_xml.abs.Element getServiceMeta(java.lang.String theServiceID) throws java.lang.Exception
theServiceID
- the unique id to define the service.java.lang.Exception
- any error.public org.licas_xml.abs.Element getServiceMeta(java.lang.String theServiceID, java.util.ArrayList<java.lang.String> toInclude, ServiceMeta serviceObjMeta) throws java.lang.Exception
theServiceID
- the unique id to define the service.toInclude
- list of additional meta parts to return.serviceObjMeta
- full description of the service metadata.java.lang.Exception
- any error.public org.licas_xml.abs.Element getServiceMetaPart(java.lang.String theServiceID, java.lang.String toInclude, ServiceMeta serviceObjMeta)
theServiceID
- the unique id to define the service.toInclude
- meta part to return.serviceObjMeta
- full description of the service metadata.public ServiceMeta getServiceMeta(java.lang.String theServiceID, java.lang.String theAdminKey)
theServiceID
- the unique id to define the service.theAdminKey
- the unique admin key for the service.public boolean removeServiceMeta(java.lang.String theServiceID, java.lang.String theAdminKey)
theServiceID
- the unique id of the service to remove.theAdminKey
- the unique admin key for the service.public boolean isStoredService(java.lang.String theServiceID)
theServiceID
- the unique service id.public void clearServiceMetadata()
public void clearServiceMetadata(java.util.ArrayList<java.lang.String> serviceIDs)
serviceIDs
- list of service IDs to remove metadata for.public java.util.ArrayList<java.lang.String> getServiceTypes()
public java.util.ArrayList<java.lang.String> getServiceTypes(java.lang.String category)
category
- the category to return service types for.