|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MetaDataManager
Interface for getting metatyping info of bundles deployed on the framework. Admin applications can use this service to get bundles' metatyping info.
Remote use of the service is enabled through the com.prosyst.util.io.Remote interface.
A bundle can publish its metatyping info in the framework either by providing
xml resource in its jar file and describing it in the bundle's manifest headers (Config,
FactoryConfig or any extended type), or by making its ManagedService &
ManagedServiceFactory implement the MetaTypeProvider interface
(as specified in ConfigurationManagement API).
To get use of the xml presentation of a metatype provider a bundle should follow the metatype.dtd, described in the documentation.
A metatype header must follow the syntax: header:=subheader[, subheader]* subheader:=xml=<resource>; pid=<service.pid>[; name=<display name>][; version=<version>] For example: FactoryConfig: xml=/com/prosyst/mbs/impl/services/dhcp/dhcp-host-rules.xml; pid=mbs.dhcp.rules.host; name=HostRules; version=1.0.0, xml=/com/prosyst/mbs/impl/services/dhcp/dhcp-range-rules.xml; pid=mbs.dhcp.rules.range; name=RangeRules; version=1.0.1, xml=/com/prosyst/mbs/impl/services/dhcp/dhcp-leases.xml; pid=mbs.dhcp.leases; name=Leases Config: xml=/com/prosyst/mbs/impl/services/dhcp/dhcp-global.xml; pid=mbs.dhcp.options; name=Options; version=2.0.0
| Field Summary | |
|---|---|
static int |
TYPE_OSGI
Used to point that the type of the XML documet is defined by OSGi's R4 Specification |
static int |
TYPE_PROSYST
Used to point that the type of the XML documet is defined by ProSyst |
| Fields inherited from interface com.prosyst.util.io.Remote |
|---|
AUTHORIZED_ROLES |
| Method Summary | |
|---|---|
void |
addMetaDataListener(MetaDataListener listener,
java.lang.String[] types)
Adds/Replaces MetaDataListener. |
MetaTypeProviderExtern |
getAggregatedMetaTypeProvider(java.lang.String pid)
Returns metatype provider info containing an objectclass(ObjectClassDefinitionImpl) having id equal to supplied pid. |
java.lang.String[] |
getMetaTypeProvidedFactoryPids(long bundleId)
Returns all metatype info supported pids of "FactoryConfig" type and the corresponding display names provided by a bundle. |
java.lang.String[] |
getMetaTypeProvidedPids(long bundleId)
Returns all metatype info supported pids of "Config" type and the corresponding display names provided by a bundle. |
java.lang.String[] |
getMetaTypeProvidedPids(long bundleId,
java.lang.String[] types)
Returns all metatype info supported pids of the listed types and the corresponding display names provided by a bundle. |
MetaTypeProviderExtern |
getMetaTypeProvider(java.lang.String pid,
boolean original)
Returns meta typing info, published in the framework either by the bundle's manifest metatype headers(Config, FactoryConfig, etc.) or as registered ManagedService or ManagedServiceFactory service
implementing MetaTypeProvider interface
(see OSGi ConfigurationManagement specification). |
java.net.URL |
getMetaTypeProviderResource(java.lang.String pid)
Returns the url to the metatype xml for the specified pid if present. |
java.lang.String |
getMetaTypeProviderVersion(java.lang.String pid)
Returns the version of the MetaTypeProvider for a pid or null if such information is not available. |
java.io.InputStream |
getMetaTypeProviderXML(java.lang.String pid)
Deprecated. use getMetaTypeProviderResource instead |
long |
getProvidingBundle(java.lang.String pid)
Returns the id of the bundle within the framework which exports the metatype provider with the specified pid. |
void |
removeMetaDataListener(MetaDataListener listener)
Removes MetaDataListener. |
| Methods inherited from interface com.prosyst.util.io.Remote |
|---|
remoteInterfaces |
| Field Detail |
|---|
static final int TYPE_OSGI
static final int TYPE_PROSYST
| Method Detail |
|---|
long getProvidingBundle(java.lang.String pid)
throws java.io.IOException
pid - The metatype provider pid.
java.io.IOException - is thrown if error occured while accessing the storage.
MetaTypeProviderExtern getAggregatedMetaTypeProvider(java.lang.String pid)
throws java.io.IOException,
java.lang.Exception
ObjectClassDefinitionEx.SUPER "super" belonging to the original ObjectClassDefinitionImpl.
pid - The metatype provider pid.
MetaTypeProvider to the pid;
null if there is no matching instance or the passed pid is null.
java.io.IOException - if an error occurs while getting the MetaTypeProvider.
java.lang.Exception - if an logical error(circular dependence, missing parent, duplicate
or missing attribute definition(s)) occurs while calculating the aggreagated MetaTypeProvider.
MetaTypeProviderExtern getMetaTypeProvider(java.lang.String pid,
boolean original)
throws java.io.IOException
ManagedService or ManagedServiceFactory service
implementing MetaTypeProvider interface
(see OSGi ConfigurationManagement specification).
pid - The metatype provider pid.original - Specifies whether the provider to be extracted from the metatype xml
or to be returned the already stored one. For registered providers this parameter
does not make sense.
MetaTypeProvider to the pid;
null if there is no matching instance or the passed pid is null.
java.io.IOException - if an error occurs while getting the MetaTypeProvider.MetaDataPlugin
java.io.InputStream getMetaTypeProviderXML(java.lang.String pid)
throws java.io.IOException
pid - The metatype provider pid.
null if pid is null, provider is not available or the resource is not available.
java.io.IOException - if error occurs while accessing the storage or the resource.
java.net.URL getMetaTypeProviderResource(java.lang.String pid)
throws java.io.IOException
pid - The metatype provider pid.
null otherwise.
java.io.IOException - is thrown if error occured while creating this URL.java.lang.String[] getMetaTypeProvidedPids(long bundleId)
getMetaTypeProvidedPids(long, String[])
when called with String[] { "Config" } parameter.
bundleId - The target bundle id.
null if no configuration pids are available or an exception occurs while the storage is accessed.java.lang.String[] getMetaTypeProvidedFactoryPids(long bundleId)
getMetaTypeProvidedPids(long, String[])
when called with String[] { "FactoryConfig" } parameter.
bundleId - The target bundle id.
null if no configuration pids are available or an exception occurs while the storage is accessed.
java.lang.String[] getMetaTypeProvidedPids(long bundleId,
java.lang.String[] types)
MetaTypeProviderExtern.METADATA_TYPE propery must be present into
its registration properties.
bundleId - The target bundle id.types - Set of the interested meta info types.
null if no configuration pids are available or an exception occurs while the storage is accessed.
Note that when a metatype provider is registered its display name should be null.java.lang.String getMetaTypeProviderVersion(java.lang.String pid)
MetaTypeProviderExtern.METADATA_VERSION property.
Config: xml=/com/prosyst/mbs/impl/services/myservice/my-service.xml; pid=my-service.pid; name=MyService; version=1.0.0
pid - The metatype provider pid.
null if the specified
metatype is not available or does not provide version information
void addMetaDataListener(MetaDataListener listener,
java.lang.String[] types)
MetaDataListener.
listener - The listener to be added.types - The metatypes the listener is interested in.MetaDataListener.metaDataChanged(int, long, java.lang.String, java.lang.String, java.lang.String, int)void removeMetaDataListener(MetaDataListener listener)
MetaDataListener.
listener - The listener to be removed.
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||