public class OsgiServiceComponentData extends Object implements IComponentData
Modifier and Type | Field and Description |
---|---|
protected IComponent |
m_component |
protected IComponentProvider |
m_componentProvider |
protected Element |
m_configElement |
protected String |
m_configStream |
protected Map<String,Object> |
m_properties |
protected IURI |
m_uri |
Constructor and Description |
---|
OsgiServiceComponentData(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) |
Modifier and Type | Method and Description |
---|---|
IComponent |
getComponent()
A factory method to create the component from this IComponentData.
|
String |
getComponentClassName()
Gets the classname for the
IComponent which can be used in calls to ObjectUtil.createObject(java.lang.String) . |
Element |
getConfig()
Gets the config element for this
IComponent . |
String |
getConfigFile()
Get
configFile attribute value. |
String |
getConfigStream()
Gets config data as raw String stream
|
boolean |
getEnabled()
Gets whether this
IComponent is enabled or not. |
IInitializable |
getInitializable() |
Map<String,Object> |
getProperties()
Gets the properties for this
IComponent . |
String |
getServiceID()
Return the OSGi service ID for the component, if available.
|
IURI |
getURI() |
void |
setComponent(IComponent component)
If for some reason you want to create and initialize an
IComponent externally
Use only with caution, or not at all. |
void |
setComponentClassName(String className)
Sets the implementation class name for the
IComponent . |
void |
setConfig(Element configElement)
Sets the config element for this
IComponent . |
void |
setConfigFile(String configFile)
Set the value of
configFile |
void |
setConfigStream(String config)
Sets component data as raw String stream
|
void |
setEnabled(boolean enabled)
Sets whether this
IComponent is enabled |
DifferenceMap |
setProperties(Map<String,? extends Object> properties)
Sets the properties for this
IComponent . |
protected Element m_configElement
protected IComponentProvider m_componentProvider
protected IURI m_uri
protected String m_configStream
protected transient IComponent m_component
public OsgiServiceComponentData(Map<String,? extends Object> properties)
properties
- componentProvider
- public OsgiServiceComponentData(Map<String,? extends Object> properties, IInitializable service)
properties
- componentProvider
- public OsgiServiceComponentData(Map<String,? extends Object> properties, IComponentProvider componentProvider)
properties
- componentProvider
- public OsgiServiceComponentData(Map<String,? extends Object> properties, IComponentProvider componentProvider, IComponent component)
properties
- componentProvider
- public boolean getEnabled() throws PortalException
IComponentData
IComponent
is enabled or not.getEnabled
in interface IComponentData
PortalException
public void setEnabled(boolean enabled) throws PortalException
IComponentData
IComponent
is enabledsetEnabled
in interface IComponentData
PortalException
public String getServiceID()
public IInitializable getInitializable() throws PortalException
PortalException
public IComponent getComponent() throws PortalException
IComponentData
IComponent
if it hasn't already been initializedgetComponent
in interface IComponentData
IComponent
PortalException
public IURI getURI() throws PortalException
getURI
in interface IComponentData
IComponentData
PortalException
public String getComponentClassName() throws PortalException
IComponentData
IComponent
which can be used in calls to ObjectUtil.createObject(java.lang.String)
.getComponentClassName
in interface IComponentData
ObjectUtil.createObject(java.lang.String)
.PortalException
public void setComponentClassName(String className) throws PortalException
IComponentData
IComponent
.setComponentClassName
in interface IComponentData
className
- a valid string for calls to ObjectUtil.createObject(java.lang.String)
.PortalException
public Element getConfig() throws PortalException
IComponentData
IComponent
.getConfig
in interface IComponentData
PortalException
public void setConfig(Element configElement) throws PortalException
IComponentData
IComponent
.setConfig
in interface IComponentData
PortalException
public String getConfigStream() throws PortalException
IComponentData
getConfigStream
in interface IComponentData
PortalException
public void setConfigStream(String config) throws PortalException
IComponentData
setConfigStream
in interface IComponentData
PortalException
public Map<String,Object> getProperties() throws PortalException
IComponentData
IComponent
.getProperties
in interface IComponentData
PortalException
public DifferenceMap setProperties(Map<String,? extends Object> properties) throws PortalException
IComponentData
IComponent
.setProperties
in interface IComponentData
PortalException
public void setComponent(IComponent component)
IComponentData
IComponent
externally
Use only with caution, or not at all.setComponent
in interface IComponentData
component
- a valid IComponent
.public String getConfigFile() throws PortalException
IComponentData
configFile
attribute value.getConfigFile
in interface IComponentData
PortalException
IComponentData.getConfig()
public void setConfigFile(String configFile) throws PortalException
IComponentData
configFile
setConfigFile
in interface IComponentData
PortalException