Package nl.gx.webmanager.wcb.lifecycle
Class WCBPurgeManager
- java.lang.Object
-
- nl.gx.webmanager.wcb.lifecycle.WCBLifecycleManager
-
- 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
Constructors Constructor Description WCBPurgeManager(nl.gx.webmanager.wcb.componentmanager.impl.ComponentManagerImpl componentManager, org.osgi.framework.Bundle bundle)
Constructor of the purge manager
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deletePersistenceStructure(ComponentDefinition componentDefinition)
Delete all persistence stuff created by this component definitionClass[]
getPeristencyClassesFromBundle(ComponentDefinition compDef)
Retrieve all classes that could create some persistent stuff in the JCRboolean
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
-
-
-
-
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 frombundleDefinition
- 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 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
-
-
-