|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.gx.webmanager.wcb.lifecycle.WCBLifecycleManager
public abstract class WCBLifecycleManager
This class is the base class for business logic that should be performed upon some lifecycle change of a WCB. The lifecycle of the WCB is associated with the lifecycle of the OSGi bundle.
| Field Summary | |
|---|---|
protected org.osgi.framework.Bundle |
myBundle
|
protected ComponentBundleDefinition |
myBundleDefinition
|
protected nl.gx.webmanager.wcb.componentmanager.impl.ComponentManagerImpl |
myComponentManager
|
protected boolean |
myIsWCB
|
protected org.osgi.service.prefs.PreferencesService |
myPreferencesService
|
protected JcrRepository |
myRepositoryService
|
| Constructor Summary | |
|---|---|
WCBLifecycleManager(nl.gx.webmanager.wcb.componentmanager.impl.ComponentManagerImpl componentManager,
org.osgi.framework.Bundle bundle)
Constructor of the lifecycle manager with the bundle. |
|
WCBLifecycleManager(nl.gx.webmanager.wcb.componentmanager.impl.ComponentManagerImpl componentManager,
ComponentBundleDefinition bundleDefinition)
Constructor of the lifecycle manager with an active Component bundle definition. |
|
| Method Summary | |
|---|---|
void |
deleteBundleResources()
Delete the bundle resources from disk |
protected void |
deleteResourcesFromDisk(java.lang.String[] fileNames,
java.lang.String relativePath)
Deletes an array of files on a given relative path from disk. |
protected java.lang.String |
getBaseDirectory()
Return the WCB base directory |
protected java.lang.String |
getWebrootDirectory()
Return the webroot directory |
protected void |
purgePreferences(boolean deleteAll)
Purge the preferences |
protected void |
setBooleanPreference(java.lang.String baseNode,
java.lang.String subNode,
java.lang.String preference,
boolean value)
Sets a preference for the given base node and the given subnode. |
protected void |
setLanguageResources()
Sets the language resources for the bundle definition from the JAR file |
protected void |
setLastModified()
Store the last modified timestamp of the bundle in the component bundle's preferences. |
protected long |
startInfoMessage(java.lang.String action)
Start an info message |
protected void |
stopInfoMessage(java.lang.String action,
boolean success,
long starttime)
Stop an info message |
boolean |
validateWCBKey()
Validates the key of the WCB for the WCB ID this lifecycle manager manages. |
static boolean |
validateWCBKey(java.lang.String WCBID,
java.lang.String key)
Validates the key of a WCB. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected nl.gx.webmanager.wcb.componentmanager.impl.ComponentManagerImpl myComponentManager
protected org.osgi.service.prefs.PreferencesService myPreferencesService
protected JcrRepository myRepositoryService
protected org.osgi.framework.Bundle myBundle
protected ComponentBundleDefinition myBundleDefinition
protected boolean myIsWCB
| Constructor Detail |
|---|
public WCBLifecycleManager(nl.gx.webmanager.wcb.componentmanager.impl.ComponentManagerImpl componentManager,
org.osgi.framework.Bundle bundle)
componentManager - The component manager this class is instantiated frombundleDefinition - The component bundle definition subject to the lifecycle change
public WCBLifecycleManager(nl.gx.webmanager.wcb.componentmanager.impl.ComponentManagerImpl componentManager,
ComponentBundleDefinition bundleDefinition)
componentManager - The component manager this class is instantiated frombundleDefinition - The component bundle definition subject to the lifecycle change| Method Detail |
|---|
protected void deleteResourcesFromDisk(java.lang.String[] fileNames,
java.lang.String relativePath)
fileNames - Array of file namesrelativePath - Relative path on diskprotected java.lang.String getBaseDirectory()
protected java.lang.String getWebrootDirectory()
protected void setLastModified()
throws org.osgi.service.prefs.BackingStoreException
org.osgi.service.prefs.BackingStoreException
protected void setBooleanPreference(java.lang.String baseNode,
java.lang.String subNode,
java.lang.String preference,
boolean value)
baseNode - Identifying name of the base node.subNode - Identifying name of the sub node.preference - Identifying name of the preference to be set.value - Value for the preference to be set.public void deleteBundleResources()
protected void setLanguageResources()
protected void purgePreferences(boolean deleteAll)
deleteAll - If true, all preferences are removed, event the ones that are used by the
WebManager platform (lastmodified)protected long startInfoMessage(java.lang.String action)
action - Lifecycle action that is performed
protected void stopInfoMessage(java.lang.String action,
boolean success,
long starttime)
action - Lifecycle action that was performedsuccess - Indication if the lifecycle actionstarttime - public boolean validateWCBKey()
public static boolean validateWCBKey(java.lang.String WCBID,
java.lang.String key)
WCBID - The WCB ID for which to validate the keykey - The key of the WCB ID
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||