|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.gx.webmanager.wcb.foundation.ComponentBase
public abstract class ComponentBase
Base implementation for component interface, is extended by implementations in componenttype bundles.
| Field Summary | |
|---|---|
protected static java.util.logging.Logger |
LOG
|
protected org.osgi.framework.BundleContext |
myBundleContext
|
protected ComponentBundleImpl |
myComponentBundle
|
protected ComponentDefinitionImpl |
myComponentDefinition
|
| Constructor Summary | |
|---|---|
ComponentBase()
|
|
| Method Summary | |
|---|---|
void |
dependencyAdded(org.osgi.framework.ServiceReference serviceReference,
java.lang.Object serviceObject)
This callback method for the dependencymanager adds all available declared dependencies for this component. |
void |
dependencyRemoved(org.osgi.framework.ServiceReference serviceReference,
java.lang.Object serviceObject)
This callback method for the dependencymanager removes all unavailable declared dependencies for this component. |
void |
exportContent(javax.jcr.Node node,
boolean exportBinaries,
java.io.OutputStream out)
Writes the repository content associated with the given Node to given OutputStream. |
void |
extensionAdded(org.osgi.framework.ServiceReference serviceReference,
java.lang.Object serviceObject)
This callback method for the dependencymanager adds all available declared extensions for this component. |
void |
extensionRemoved(org.osgi.framework.ServiceReference serviceReference,
java.lang.Object serviceObject)
This callback method for the dependencymanager removes all unavailable declared extensions for this component. |
org.osgi.framework.BundleContext |
getBundleContext()
Returns the bundle context of the component. |
java.lang.Class[] |
getClassesFromBundle()
Retrieve all classes from the bundle. |
java.lang.Class |
getClassForName(java.lang.String fullyQualifiedClassName)
Returns the class for the given fully qualified class name. |
ComponentBundle |
getComponentBundle()
Returns the component bundle which contains this component. |
ComponentDefinition |
getComponentDefinition()
Returns the definition containing all metadata describing this component. |
DelegatedController |
getDelegatedController()
Returns the Spring controller to whom controller logic must be delegated |
java.util.Collection<ExtensionProvider> |
getExtensions(java.lang.String interfaceClassName)
|
java.lang.String |
getId()
Return the identifier for this component. |
java.lang.Object |
getInstance()
Returns an instance of the component's class. |
java.lang.Object |
getInstanceForName(java.lang.String fullyQualifiedClassName)
Returns an instance of the given class if it is serviced by this component's OSGi bundle. |
protected javax.jcr.Node |
getPrivateNode()
Retrieve a private node for this panelcomponent. |
javax.jcr.Node |
getPrivateNode(java.lang.String websiteIdentifier)
Retrieve a private node for this panelcomponent. |
java.lang.String |
getTypeId()
Return the identifier for this components type. |
WrapperDefinition[] |
getWrapperDefinitions()
Returns the component's WrapperDefinitions. |
void |
importContent(javax.jcr.Node targetNode,
boolean importBinaries,
java.io.InputStream in,
int uuidbehavior)
Imports content into the JCR. |
void |
internalDoStart()
Call-back method used by the dependency manager. |
void |
internalDoStop()
Call-back method used by the dependency manager. |
void |
onDestroy()
Can be implemented by components for attaching logic to a destroy event. |
void |
onInit()
Can be implemented by components for attaching logic to a init event. |
void |
onInstall()
Can be implemented by components for attaching logic to an install event. |
boolean |
onPurge()
Can be implemented by components for attaching logic to a purge event. |
void |
onStart()
Can be implemented by components for attaching logic to a start event. |
void |
onStop()
Can be implemented by components for attaching logic to a stop event. |
boolean |
onUninstall()
Can be implemented by components for attaching logic to an uninstall event Note that the WCB containing the component needs to be ACTIVE in order for the onUninstall to be invoked. |
void |
onUpdate()
Can be implemented by components for attaching logic to an update event. |
void |
purgeContent()
Deprecated. |
void |
setBundleContext(org.osgi.framework.BundleContext bundleContext)
Sets the context of the OSGi bundle which contains this component. |
void |
setComponentBundle(ComponentBundle componentBundle)
Sets the component bundle which contains this component. |
void |
setComponentBundle(ComponentBundleImpl componentBundle)
|
void |
setComponentDefinition(ComponentDefinition componentDefinition)
Set the definition containing all metadata describing this component. |
void |
setComponentManager(ComponentManager componentManager)
|
void |
setDelegatedController(DelegatedController controller)
Sets the Spring controller to whom controller logic must be delegated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.util.logging.Logger LOG
protected ComponentDefinitionImpl myComponentDefinition
protected ComponentBundleImpl myComponentBundle
protected org.osgi.framework.BundleContext myBundleContext
| Constructor Detail |
|---|
public ComponentBase()
| Method Detail |
|---|
public java.lang.String getId()
getId in interface Componentpublic java.lang.String getTypeId()
getTypeId in interface Componentpublic void onStart()
onStart in interface Componentpublic final void internalDoStart()
public void onStop()
onStop in interface Componentpublic final void internalDoStop()
public void onInit()
onInit in interface Componentpublic void onDestroy()
onDestroy in interface Componentpublic void onInstall()
onInstall in interface Componentpublic void onUpdate()
onUpdate in interface Component@Deprecated public void purgeContent()
purgeContent in interface Componentpublic boolean onPurge()
onPurge in interface Componenttrue if the install succeeded, false otherwise. If false is returned,
the WCB will not be purged.public boolean onUninstall()
onUninstall in interface Componenttrue if the uninstallation succeeded, false otherwise. If false is
returned, the WCB will not be uninstalled.public ComponentDefinition getComponentDefinition()
getComponentDefinition in interface Componentpublic void setComponentDefinition(ComponentDefinition componentDefinition)
setComponentDefinition in interface ComponentcomponentDefinition - Definition containing all metadata describing this componentpublic ComponentBundle getComponentBundle()
getComponentBundle in interface Componentpublic void setComponentBundle(ComponentBundle componentBundle)
setComponentBundle in interface ComponentcomponentBundle - Component bundle which contains this componentpublic void setComponentBundle(ComponentBundleImpl componentBundle)
componentBundle - public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
setBundleContext in interface ComponentbundleContext - Context of the OSGi bundle which contains this componentpublic void setComponentManager(ComponentManager componentManager)
setComponentManager in interface Componentpublic org.osgi.framework.BundleContext getBundleContext()
public final void dependencyAdded(org.osgi.framework.ServiceReference serviceReference,
java.lang.Object serviceObject)
serviceReference - the serviceReferenceserviceObject - the serviceObject
public final void dependencyRemoved(org.osgi.framework.ServiceReference serviceReference,
java.lang.Object serviceObject)
serviceReference - the serviceReferenceserviceObject - the serviceObjectpublic java.util.Collection<ExtensionProvider> getExtensions(java.lang.String interfaceClassName)
getExtensions in interface Component
public final void extensionAdded(org.osgi.framework.ServiceReference serviceReference,
java.lang.Object serviceObject)
serviceReference - the serviceReferenceserviceObject - the serviceObject
public final void extensionRemoved(org.osgi.framework.ServiceReference serviceReference,
java.lang.Object serviceObject)
serviceReference - the serviceReferenceserviceObject - the serviceObjectpublic java.lang.Class getClassForName(java.lang.String fullyQualifiedClassName)
getClassForName in interface ComponentfullyQualifiedClassName - fully qualified class name
public WrapperDefinition[] getWrapperDefinitions()
getWrapperDefinitions in interface Componentpublic java.lang.Class[] getClassesFromBundle()
getClassesFromBundle in interface Componentpublic java.lang.Object getInstance()
getInstance in interface Componentpublic java.lang.Object getInstanceForName(java.lang.String fullyQualifiedClassName)
getInstanceForName in interface ComponentfullyQualifiedClassName - Fully qualified class name
protected final javax.jcr.Node getPrivateNode()
public final javax.jcr.Node getPrivateNode(java.lang.String websiteIdentifier)
getPrivateNode in interface ComponentwebsiteIdentifier - the unique identifier of the cuurent webinitiatif, or null if the
allContainerNode should be returned
public void exportContent(javax.jcr.Node node,
boolean exportBinaries,
java.io.OutputStream out)
throws ExportException
exportContent in interface Componentnode - the root of the subtree to be serializedexportBinaries - whether binaries should be includedout - The OutputStream to which the systemview on the content is exported.
ExportException - on error
public void importContent(javax.jcr.Node targetNode,
boolean importBinaries,
java.io.InputStream in,
int uuidbehavior)
throws ImportException
importContent in interface ComponenttargetNode - the node under which the deserialized subtree is addedimportBinaries - whether binary content should be imported; ignored by the default implementationin - the inputstream from which the xml to deserialize is readuuidbehavior - a four-value flag that governs how incoming UUIDs are handled
ImportException - on errorpublic DelegatedController getDelegatedController()
getDelegatedController in interface DelegatedControllerAwarepublic void setDelegatedController(DelegatedController controller)
setDelegatedController in interface DelegatedControllerAwarecontroller - The controller of this entity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||