Class OsgiServiceComponentData
java.lang.Object
com.webmethods.portal.system.osgi.OsgiServiceComponentData
- All Implemented Interfaces:
IComponentData
IComponentData for components implemented as OSGi declaritive services
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IComponent
protected IComponentProvider
protected Element
protected String
protected IURI
-
Constructor Summary
ConstructorsConstructorDescriptionOsgiServiceComponentData
(Map<String, ? extends Object> properties) OsgiServiceComponentData
(Map<String, ? extends Object> properties, IComponentProvider componentProvider) OsgiServiceComponentData
(Map<String, ? extends Object> properties, IComponentProvider componentProvider, IComponent component) OsgiServiceComponentData
(Map<String, ? extends Object> properties, IInitializable service) -
Method Summary
Modifier and TypeMethodDescriptionA factory method to create the component from this IComponentData.Gets the classname for theIComponent
which can be used in calls toObjectUtil.createObject(java.lang.String)
.Gets the config element for thisIComponent
.GetconfigFile
attribute value.Gets config data as raw String streamboolean
Gets whether thisIComponent
is enabled or not.Gets the properties for thisIComponent
.Return the OSGi service ID for the component, if available.getURI()
void
setComponent
(IComponent component) If for some reason you want to create and initialize anIComponent
externally Use only with caution, or not at all.void
setComponentClassName
(String className) Sets the implementation class name for theIComponent
.void
Sets the config element for thisIComponent
.void
setConfigFile
(String configFile) Set the value ofconfigFile
void
setConfigStream
(String config) Sets component data as raw String streamvoid
setEnabled
(boolean enabled) Sets whether thisIComponent
is enabledsetProperties
(Map<String, ? extends Object> properties) Sets the properties for thisIComponent
.
-
Field Details
-
m_properties
-
m_configElement
-
m_componentProvider
-
m_uri
-
m_configStream
-
m_component
-
-
Constructor Details
-
OsgiServiceComponentData
- Parameters:
properties
-componentProvider
-
-
OsgiServiceComponentData
- Parameters:
properties
-componentProvider
-
-
OsgiServiceComponentData
public OsgiServiceComponentData(Map<String, ? extends Object> properties, IComponentProvider componentProvider) - Parameters:
properties
-componentProvider
-
-
OsgiServiceComponentData
public OsgiServiceComponentData(Map<String, ? extends Object> properties, IComponentProvider componentProvider, IComponent component) - Parameters:
properties
-componentProvider
-
-
-
Method Details
-
getEnabled
Description copied from interface:IComponentData
Gets whether thisIComponent
is enabled or not.- Specified by:
getEnabled
in interfaceIComponentData
- Returns:
- true if enabled, false otherwise
- Throws:
PortalException
-
setEnabled
Description copied from interface:IComponentData
Sets whether thisIComponent
is enabled- Specified by:
setEnabled
in interfaceIComponentData
- Throws:
PortalException
-
getServiceID
Return the OSGi service ID for the component, if available.- Returns:
- the component id or "unknown" if it can not be determined.
-
getInitializable
- Returns:
- the service
- Throws:
PortalException
-
getComponent
Description copied from interface:IComponentData
A factory method to create the component from this IComponentData. This will also initialize theIComponent
if it hasn't already been initialized- Specified by:
getComponent
in interfaceIComponentData
- Returns:
- an initialized
IComponent
- Throws:
PortalException
-
getURI
- Specified by:
getURI
in interfaceIComponentData
- Returns:
- a unique URI which describes this
IComponentData
- Throws:
PortalException
-
getComponentClassName
Description copied from interface:IComponentData
Gets the classname for theIComponent
which can be used in calls toObjectUtil.createObject(java.lang.String)
.- Specified by:
getComponentClassName
in interfaceIComponentData
- Returns:
- a valid string for calls to
ObjectUtil.createObject(java.lang.String)
. - Throws:
PortalException
-
setComponentClassName
Description copied from interface:IComponentData
Sets the implementation class name for theIComponent
.- Specified by:
setComponentClassName
in interfaceIComponentData
- Parameters:
className
- a valid string for calls toObjectUtil.createObject(java.lang.String)
.- Throws:
PortalException
-
getConfig
Description copied from interface:IComponentData
Gets the config element for thisIComponent
.- Specified by:
getConfig
in interfaceIComponentData
- Returns:
- Either the config element, or NULL if it is properties based
- Throws:
PortalException
-
setConfig
Description copied from interface:IComponentData
Sets the config element for thisIComponent
.- Specified by:
setConfig
in interfaceIComponentData
- Throws:
PortalException
-
getConfigStream
Description copied from interface:IComponentData
Gets config data as raw String stream- Specified by:
getConfigStream
in interfaceIComponentData
- Returns:
- Throws:
PortalException
-
setConfigStream
Description copied from interface:IComponentData
Sets component data as raw String stream- Specified by:
setConfigStream
in interfaceIComponentData
- Throws:
PortalException
-
getProperties
Description copied from interface:IComponentData
Gets the properties for thisIComponent
.- Specified by:
getProperties
in interfaceIComponentData
- Returns:
- properties, or simple Element attributes if this is element based
- Throws:
PortalException
-
setProperties
Description copied from interface:IComponentData
Sets the properties for thisIComponent
.- Specified by:
setProperties
in interfaceIComponentData
- Throws:
PortalException
-
setComponent
Description copied from interface:IComponentData
If for some reason you want to create and initialize anIComponent
externally Use only with caution, or not at all.- Specified by:
setComponent
in interfaceIComponentData
- Parameters:
component
- a validIComponent
.
-
getConfigFile
Description copied from interface:IComponentData
GetconfigFile
attribute value.- Specified by:
getConfigFile
in interfaceIComponentData
- Throws:
PortalException
- See Also:
-
setConfigFile
Description copied from interface:IComponentData
Set the value ofconfigFile
- Specified by:
setConfigFile
in interfaceIComponentData
- Throws:
PortalException
-