public class ConfigurationAdminImpl extends Object implements ConfigurationAdmin
NO_MATCH_FILTER
Constructor and Description |
---|
ConfigurationAdminImpl(Object configurationAdmin,
List<ConfigurationAdminPlugin> configurationAdminPluginList) |
Modifier and Type | Method and Description |
---|---|
ConfigurationStatus |
disableManagedServiceFactoryConfiguration(String servicePid,
org.osgi.service.cm.Configuration originalConfig)
Disables a currently enabled configuration.
|
ConfigurationStatus |
enableManagedServiceFactoryConfiguration(String servicePid,
org.osgi.service.cm.Configuration disabledConfig)
Enables a currently disabled configuration.
|
Metatype |
findMetatypeForConfig(org.osgi.service.cm.Configuration config)
Returns the complete Metatype with all available information for the provided
Configuration |
org.osgi.service.cm.Configuration |
getConfiguration(String pid)
Returns the
Configuration associated with the given PID |
String |
getDefaultFactoryLdapFilter()
Returns a default filter that can be used by a client when calling listServices(...) This
filter would pertain to managed service factories
|
String |
getDefaultLdapFilter()
Returns a default filter that can be used by a client when calling listServices(...) This
filter would pertain to managed services
|
String |
getName(org.osgi.framework.Bundle bundle)
Return a display name for the given
bundle :
If the bundle has a non-empty Bundle-Name manifest header that value is
returned. |
org.osgi.service.metatype.ObjectClassDefinition |
getObjectClassDefinition(org.osgi.framework.Bundle bundle,
String pid)
Returns the
ObjectClassDefinition associated with the given Configuration . |
org.osgi.service.metatype.ObjectClassDefinition |
getObjectClassDefinition(org.osgi.service.cm.Configuration config)
Returns the
ObjectClassDefinition associated with the given Configuration . |
org.osgi.service.metatype.ObjectClassDefinition |
getObjectClassDefinition(String pid)
Returns the
ObjectClassDefinition associated with the given Configuration . |
boolean |
isPermittedToViewService(String servicePid) |
boolean |
isPermittedToViewService(String servicePid,
org.apache.shiro.subject.Subject subject)
Returns true if the subject is permitted to view the service corresponding to the provided
service.pid.
|
List<Service> |
listServices(String serviceFactoryFilter,
String serviceFilter)
Returns all services and managed service factories that satisfy the provided LDAP filters
|
public ConfigurationAdminImpl(Object configurationAdmin, List<ConfigurationAdminPlugin> configurationAdminPluginList)
configurationAdmin
- ClassCastException
- if service
is not a MetaTypeService instancespublic final org.osgi.service.cm.Configuration getConfiguration(String pid)
ConfigurationAdmin
Configuration
associated with the given PIDgetConfiguration
in interface ConfigurationAdmin
pid
- - service pid for the configurationpublic List<Service> listServices(String serviceFactoryFilter, String serviceFilter)
ConfigurationAdmin
listServices
in interface ConfigurationAdmin
serviceFactoryFilter
- - LDAP filter for managed service factoriesserviceFilter
- - LDAP filter for managed servicespublic String getName(org.osgi.framework.Bundle bundle)
bundle
:
Bundle-Name
manifest header that value is
returned.
getName
in interface ConfigurationAdmin
bundle
- the bundle which name to retrievepublic String getDefaultFactoryLdapFilter()
ConfigurationAdmin
getDefaultFactoryLdapFilter
in interface ConfigurationAdmin
public String getDefaultLdapFilter()
ConfigurationAdmin
getDefaultLdapFilter
in interface ConfigurationAdmin
public Metatype findMetatypeForConfig(org.osgi.service.cm.Configuration config)
ConfigurationAdmin
Configuration
findMetatypeForConfig
in interface ConfigurationAdmin
config
- - Configuration to retrieve Metatype forpublic org.osgi.service.metatype.ObjectClassDefinition getObjectClassDefinition(org.osgi.service.cm.Configuration config)
ConfigurationAdmin
ObjectClassDefinition
associated with the given Configuration
. The
ObjectClassDefinition is the actual configuration part of the metatype that holds all of the
configurable pieces.getObjectClassDefinition
in interface ConfigurationAdmin
config
- - The configuration associated with the metatypepublic org.osgi.service.metatype.ObjectClassDefinition getObjectClassDefinition(org.osgi.framework.Bundle bundle, String pid)
ConfigurationAdmin
ObjectClassDefinition
associated with the given Configuration
. The
ObjectClassDefinition is the actual configuration part of the metatype that holds all of the
configurable pieces.getObjectClassDefinition
in interface ConfigurationAdmin
bundle
- - The bundle for which metatype information is requested.pid
- - Service pid for the metatypepublic org.osgi.service.metatype.ObjectClassDefinition getObjectClassDefinition(String pid)
ConfigurationAdmin
ObjectClassDefinition
associated with the given Configuration
. The
ObjectClassDefinition is the actual configuration part of the metatype that holds all of the
configurable pieces.getObjectClassDefinition
in interface ConfigurationAdmin
pid
- - Service pid for the metatypepublic boolean isPermittedToViewService(String servicePid, org.apache.shiro.subject.Subject subject)
ConfigurationAdmin
isPermittedToViewService
in interface ConfigurationAdmin
servicePid
- - PID of the service in questionsubject
- - Subject to implypublic boolean isPermittedToViewService(String servicePid)
public ConfigurationStatus disableManagedServiceFactoryConfiguration(String servicePid, org.osgi.service.cm.Configuration originalConfig) throws IOException
ConfigurationAdmin
disableManagedServiceFactoryConfiguration
in interface ConfigurationAdmin
servicePid
- - PID corresponding to the configurationoriginalConfig
- - The configuration that is enabledIOException
public ConfigurationStatus enableManagedServiceFactoryConfiguration(String servicePid, org.osgi.service.cm.Configuration disabledConfig) throws IOException
ConfigurationAdmin
enableManagedServiceFactoryConfiguration
in interface ConfigurationAdmin
servicePid
- - PID corresponding to the configurationdisabledConfig
- - The configuration that is disabledIOException
This work is licensed under a Creative Commons Attribution 4.0 International License.