public class AdminConsoleService extends StandardMBean implements AdminConsoleServiceMBean
OBJECTNAME| Constructor and Description |
|---|
AdminConsoleService(org.osgi.service.cm.ConfigurationAdmin configurationAdmin,
ConfigurationAdmin configurationAdminImpl)
Constructor for use in unit tests.
|
| Modifier and Type | Method and Description |
|---|---|
String |
createFactoryConfiguration(String factoryPid)
Create a new configuration instance for the supplied persistent id of the factory, answering
the PID of the created configuration
|
String |
createFactoryConfigurationForLocation(String factoryPid,
String location)
Create a factory configuration for the supplied persistent id of the factory and the bundle
location bound to bind the created configuration to, answering the PID of the created
configuration
|
void |
delete(String pid)
Delete the configuration
|
void |
deleteConfigurations(String filter)
Delete the configurations matching the filter specification.
|
void |
deleteForLocation(String pid,
String location)
Delete the configuration
|
void |
destroy()
Unregister this MBean with the MBean server
|
ConfigurationStatus |
disableConfiguration(String servicePid)
Disables a configuration but preserves the configuration to be enabled at a later time.
|
ConfigurationStatus |
enableConfiguration(String servicePid)
Enables a previously disabled configuration
|
String |
getBundleLocation(String pid)
Answer the bundle location the configuration is bound to
|
Map<String,Object> |
getClaimsConfiguration(String filter) |
String[][] |
getConfigurations(String filter)
Answer the list of PID/Location pairs of the configurations managed by this service
|
String |
getFactoryPid(String pid)
Answer the factory PID if the configuration is a factory configuration, null otherwise.
|
String |
getFactoryPidForLocation(String pid,
String location)
Answer the factory PID if the configuration is a factory configuration, null otherwise.
|
List<AdminModule> |
getModuleList() |
Map<String,Object> |
getProperties(String pid)
Answer the contents of the configuration
|
Map<String,Object> |
getPropertiesForLocation(String pid,
String location)
Answer the contents of the configuration
|
Service |
getService(String filter)
Returns a managed service or managed service factory with associated metatype and
configurations
|
void |
init()
Initialize this MBean and register it with the MBean server
|
boolean |
isPermittedToViewService(String servicePid) |
List<Map<String,Object>> |
listModules()
Lists all modules that are available
|
List<Service> |
listServices()
Lists all managed services and managed service factories with associated metatypes and
configurations
|
void |
setBundleLocation(String pid,
String location)
Set the bundle location the configuration is bound to
|
void |
setGuestClaimsHandlerExt(GuestClaimsHandlerExt guestClaimsHandlerExt) |
void |
setModuleList(List<AdminModule> moduleList) |
boolean |
update(String pid,
Map<String,Object> configurationTable)
Update the configuration with the supplied properties For each property entry, the following
row is supplied
|
void |
updateForLocation(String pid,
String location,
Map<String,Object> configurationTable)
Update the configuration with the supplied properties For each property entry, the following
row is supplied
|
boolean |
updateGuestClaimsProfile(String pid,
Map<String,Object> configurationTable)
Interceptor method for special handling of guest claims profile data.
|
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementationpublic AdminConsoleService(org.osgi.service.cm.ConfigurationAdmin configurationAdmin,
ConfigurationAdmin configurationAdminImpl)
throws NotCompliantMBeanException
configurationAdmin - instance of org.osgi.service.cm.ConfigurationAdmin serviceconfigurationAdminImpl - mocked instance of ConfigurationAdminImplNotCompliantMBeanExceptionpublic void init()
public void destroy()
public List<AdminModule> getModuleList()
public void setModuleList(List<AdminModule> moduleList)
public List<Service> listServices()
AdminConsoleServiceMBeanlistServices in interface AdminConsoleServiceMBeanpublic Service getService(String filter)
AdminConsoleServiceMBean*@param filter the string representation of the org.osgi.framework.Filter
getService in interface AdminConsoleServiceMBeanpublic List<Map<String,Object>> listModules()
AdminConsoleServiceMBeanlistModules in interface AdminConsoleServiceMBeanpublic String createFactoryConfiguration(String factoryPid) throws IOException
AdminConsoleServiceMBeancreateFactoryConfiguration in interface AdminConsoleServiceMBeanfactoryPid - the persistent id of the factoryIOException - if the operation failedAdminConsoleServiceMBean.createFactoryConfiguration(java.lang.String)public String createFactoryConfigurationForLocation(String factoryPid, String location) throws IOException
AdminConsoleServiceMBeancreateFactoryConfigurationForLocation in interface AdminConsoleServiceMBeanfactoryPid - the persistent id of the factorylocation - the bundle locationIOException - if the operation failedAdminConsoleServiceMBean.createFactoryConfigurationForLocation(java.lang.String,
java.lang.String)public void delete(String pid) throws IOException
AdminConsoleServiceMBeandelete in interface AdminConsoleServiceMBeanpid - the persistent identifier of the configurationIOException - if the operation failsAdminConsoleServiceMBean.delete(java.lang.String)public void deleteForLocation(String pid, String location) throws IOException
AdminConsoleServiceMBeandeleteForLocation in interface AdminConsoleServiceMBeanpid - the persistent identifier of the configurationlocation - the bundle locationIOException - if the operation failsAdminConsoleServiceMBean.deleteForLocation(java.lang.String, java.lang.String)public void deleteConfigurations(String filter) throws IOException
AdminConsoleServiceMBeandeleteConfigurations in interface AdminConsoleServiceMBeanfilter - the string representation of the org.osgi.framework.FilterIOException - if the operation failedAdminConsoleServiceMBean.deleteConfigurations(java.lang.String)public String getBundleLocation(String pid) throws IOException
AdminConsoleServiceMBeangetBundleLocation in interface AdminConsoleServiceMBeanpid - the persistent identifier of the configurationIOException - if the operation failsAdminConsoleServiceMBean.getBundleLocation(java.lang.String)public String[][] getConfigurations(String filter) throws IOException
AdminConsoleServiceMBeangetConfigurations in interface AdminConsoleServiceMBeanfilter - the string representation of the org.osgi.framework.FilterIOException - if the operation failedAdminConsoleServiceMBean.getConfigurations(java.lang.String)public String getFactoryPid(String pid) throws IOException
AdminConsoleServiceMBeangetFactoryPid in interface AdminConsoleServiceMBeanpid - the persistent identifier of the configurationIOException - if the operation failsAdminConsoleServiceMBean.getFactoryPid(java.lang.String)public String getFactoryPidForLocation(String pid, String location) throws IOException
AdminConsoleServiceMBeangetFactoryPidForLocation in interface AdminConsoleServiceMBeanpid - the persistent identifier of the configurationlocation - the bundle locationIOException - if the operation failsAdminConsoleServiceMBean.getFactoryPidForLocation(java.lang.String, java.lang.String)public Map<String,Object> getProperties(String pid) throws IOException
AdminConsoleServiceMBeangetProperties in interface AdminConsoleServiceMBeanpid - the persistent identifier of the configurationIOException - if the operation failsAdminConsoleServiceMBean.getProperties(java.lang.String)public Map<String,Object> getPropertiesForLocation(String pid, String location) throws IOException
AdminConsoleServiceMBeangetPropertiesForLocation in interface AdminConsoleServiceMBeanpid - the persistent identifier of the configurationlocation - the bundle locationIOException - if the operation failsAdminConsoleServiceMBean.getPropertiesForLocation(java.lang.String, java.lang.String)public void setBundleLocation(String pid, String location) throws IOException
AdminConsoleServiceMBeansetBundleLocation in interface AdminConsoleServiceMBeanpid - the persistent identifier of the configurationlocation - the bundle locationIOException - if the operation failsAdminConsoleServiceMBean.setBundleLocation(java.lang.String, java.lang.String)public boolean updateGuestClaimsProfile(String pid, Map<String,Object> configurationTable) throws IOException
AdminConsoleServiceMBeanupdateGuestClaimsProfile in interface AdminConsoleServiceMBeanpid - the persistent identifier of the configurationconfigurationTable - the table of propertiesIOException - if the operation fails AdminConsoleServiceMBean.update(String, Map).for the generic version of this method; this method acts as an
interceptor to handle the special case where processing specific to guest claims occurs
before passing the configuration data to {@link #update(String, Map)} for persistence in
OSGi's configuration admin.public boolean update(String pid, Map<String,Object> configurationTable) throws IOException
AdminConsoleServiceMBeanIt is necessary to have a return value so that the ajax call to Jolokia waits for it to finish and we get any errors returned
update in interface AdminConsoleServiceMBeanpid - the persistent identifier of the configurationconfigurationTable - the table of propertiesIOException - if the operation failsAdminConsoleServiceMBean.update(java.lang.String, java.util.Map)public void updateForLocation(String pid, String location, Map<String,Object> configurationTable) throws IOException
AdminConsoleServiceMBeanupdateForLocation in interface AdminConsoleServiceMBeanpid - the persistent identifier of the configurationlocation - the bundle locationconfigurationTable - the table of propertiesIOException - if the operation failsAdminConsoleServiceMBean.updateForLocation(java.lang.String, java.lang.String,
java.util.Map)public ConfigurationStatus disableConfiguration(String servicePid) throws IOException
AdminConsoleServiceMBeandisableConfiguration in interface AdminConsoleServiceMBeanservicePid - that uniquely identifies the source to disable.IOException - if the Source to be disabled cannot be located via the provided service
PID.public Map<String,Object> getClaimsConfiguration(String filter)
getClaimsConfiguration in interface AdminConsoleServiceMBeanpublic ConfigurationStatus enableConfiguration(String servicePid) throws IOException
AdminConsoleServiceMBeanenableConfiguration in interface AdminConsoleServiceMBeanservicePid - that uniquely identifies the source to enable.IOException - if the Source to be enabled cannot be located via the provided service PID.public void setGuestClaimsHandlerExt(GuestClaimsHandlerExt guestClaimsHandlerExt)
public boolean isPermittedToViewService(String servicePid)
This work is licensed under a Creative Commons Attribution 4.0 International License.