nl.gx.webmanager.wcb.lifecycle
Class WCBPurgeManager

java.lang.Object
  extended by nl.gx.webmanager.wcb.lifecycle.WCBLifecycleManager
      extended by nl.gx.webmanager.wcb.lifecycle.WCBPurgeManager

public class WCBPurgeManager
extends WCBLifecycleManager

This class implements the business logic that should be performed upon purging of an OSGi bundle. It removes any content that has been created during the uptime of the components contained by the bundle. Note that this lifecycle is attached to the UNINSTALLED lifecycle of the OSGi bundle. The purge knows nothing about components.

Author:
ivol

Field Summary
 
Fields inherited from class nl.gx.webmanager.wcb.lifecycle.WCBLifecycleManager
myBundle, myBundleDefinition, myComponentManager, myIsWCB, myPreferencesService, myRepositoryService
 
Constructor Summary
WCBPurgeManager(nl.gx.webmanager.wcb.componentmanager.impl.ComponentManagerImpl componentManager, org.osgi.framework.Bundle bundle)
          Constructor of the purge manager
 
Method Summary
 void deletePersistenceStructure(ComponentDefinition componentDefinition)
          Delete all persistence stuff created by this component definition
 java.lang.Class[] getPeristencyClassesFromBundle(ComponentDefinition compDef)
          Retrieve all classes that could create some persistent stuff in the JCR
 boolean purge()
          Purges all components contained by this component bundle
 
Methods inherited from class nl.gx.webmanager.wcb.lifecycle.WCBLifecycleManager
deleteBundleResources, deleteResourcesFromDisk, getBaseDirectory, getWebrootDirectory, purgePreferences, setBooleanPreference, setLanguageResources, setLastModified, startInfoMessage, stopInfoMessage, validateWCBKey, validateWCBKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WCBPurgeManager

public WCBPurgeManager(nl.gx.webmanager.wcb.componentmanager.impl.ComponentManagerImpl componentManager,
                       org.osgi.framework.Bundle bundle)
Constructor of the purge manager

Parameters:
componentManager - Component manager the lifecycle manager is created from
bundleDefinition - The Component bundle definition of the OSGi bundle that needs to be purged
Method Detail

purge

public boolean purge()
Purges all components contained by this component bundle

Returns:
true if the purge of all components succeeded, false otherwise

getPeristencyClassesFromBundle

public java.lang.Class[] getPeristencyClassesFromBundle(ComponentDefinition compDef)
Retrieve all classes that could create some persistent stuff in the JCR

Parameters:
compDef - Component definition to retrieve the info for
Returns:
Array of all classes that could create some persistent stuff in the JCR

deletePersistenceStructure

public void deletePersistenceStructure(ComponentDefinition componentDefinition)
Delete all persistence stuff created by this component definition

Parameters:
componentDefinition -


Copyright © 2007-2011 GX Software BV. All Rights Reserved.