|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.gx.webmanager.wcb.foundation.ComponentBundleImpl
public final class ComponentBundleImpl
Implementation of a GX WebManager componentbundle providing registration and management of the components the WCB provides.
| Constructor Summary | |
|---|---|
ComponentBundleImpl(ComponentBundleDefinition bundleDefinition,
org.apache.felix.dependencymanager.DependencyManager dependencyManager)
Constructor. |
|
| Method Summary | |
|---|---|
void |
componentTypeAdded(org.osgi.framework.ServiceReference serviceReference,
java.lang.Object service)
Call-back method for the dependency manager. |
void |
componentTypeRemoved(org.osgi.framework.ServiceReference serviceReference,
java.lang.Object service)
Call-back method for the dependency manager. |
void |
deleteExcludedBundleResources(java.lang.String srcFileNamePrefix,
java.lang.String destFileNamePrefix,
java.lang.String baseDirectory)
delete all files not in the given jar source (srcFileNamePrefix) from the given destFileNamePrefix. |
void |
deleteFileFromDisk(java.io.File file)
Delete file from disk. |
void |
destroy()
Callback from dependencymanager. |
java.lang.String |
formatFileName(java.lang.String fileName)
Ensure that the given fileName is a system path; System specifiek direcory indicators. |
java.lang.String |
getBaseDirectory()
Returns the base directory where all backend files are located. |
org.osgi.framework.BundleContext |
getBundleContext()
Gets the bundle context. |
ComponentBundleDefinition |
getBundleDefinition()
|
org.apache.felix.dependencymanager.DependencyManager |
getDependencyManager()
Gets the dependency manager. |
java.util.List<java.lang.String> |
getRegisteredComponentIds()
Returns all component ids registered by the ComponentBundle. |
org.osgi.framework.Version |
getVersion()
The technical version of a ComponentBundle is read from the Manifest. |
java.lang.String |
getWebrootDirectory()
Returns the base directory where all static files are located. |
java.lang.String |
getWorkDirectory()
path of a working directory which can be used by this component bundle to store temporary or non-temporary files. |
void |
init()
Callback from dependencymanager. |
boolean |
isLicensed(ComponentDefinition componentDefinition)
Returns if a valid license is installed for the given component definition |
void |
start()
Checks if the component bundle's components are registered, if not, it registers the components. |
void |
stop()
Deactivates all component bundle's components. |
java.lang.String |
substringAfter(java.lang.String str,
java.lang.String separator)
Return the substring of str after the seperator. |
void |
writeComponentBundleResourcesToFile(java.lang.String srcFileNamePrefix,
java.lang.String destFileNamePrefix,
java.lang.String baseDirectory)
deploy all files from the given jar source (srcFileNamePrefix)to the given destFileNamePrefix. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ComponentBundleImpl(ComponentBundleDefinition bundleDefinition,
org.apache.felix.dependencymanager.DependencyManager dependencyManager)
bundleDefinition - bundleDefinition for this bundledependencyManager - dependencyManager for this bundle| Method Detail |
|---|
public void init()
public void destroy()
public void start()
throws java.lang.Exception
start in interface ComponentBundlejava.lang.Exception - when starting of ComponentBundle was not successful.public void stop()
stop in interface ComponentBundle
public void componentTypeAdded(org.osgi.framework.ServiceReference serviceReference,
java.lang.Object service)
serviceReference - Reference to the added component type service and its meta data.service - The actual component type service.ComponentBundleActivatorBase#init(BundleContext, DependencyManager)}
public void componentTypeRemoved(org.osgi.framework.ServiceReference serviceReference,
java.lang.Object service)
serviceReference - Reference to the added component type service and its meta data.service - The actual component type service.public ComponentBundleDefinition getBundleDefinition()
getBundleDefinition in interface ComponentBundlepublic org.osgi.framework.Version getVersion()
getVersion in interface ComponentBundlepublic org.osgi.framework.BundleContext getBundleContext()
public org.apache.felix.dependencymanager.DependencyManager getDependencyManager()
public boolean isLicensed(ComponentDefinition componentDefinition)
isLicensed in interface ComponentBundlecomponentDefinition - Component definition to check the license for
true if a valid license is installed for the component
definition or the component definition is not licensed, false otherwisepublic java.lang.String getBaseDirectory()
getBaseDirectory in interface ComponentBundlepublic java.lang.String getWebrootDirectory()
getWebrootDirectory in interface ComponentBundlepublic java.lang.String getWorkDirectory()
getWorkDirectory in interface ComponentBundlepublic java.util.List<java.lang.String> getRegisteredComponentIds()
getRegisteredComponentIds in interface ComponentBundlepublic void deleteFileFromDisk(java.io.File file)
deleteFileFromDisk in interface ComponentBundlefile - File to delete
public void writeComponentBundleResourcesToFile(java.lang.String srcFileNamePrefix,
java.lang.String destFileNamePrefix,
java.lang.String baseDirectory)
writeComponentBundleResourcesToFile in interface ComponentBundlesrcFileNamePrefix - prefix for the srcFileNames location in the jar f.e.
editpresentation/destFileNamePrefix - destenation path can hold bundle specific names f.e.
/WEB-INF/wm/jsp/edit/wcb/{bundle_id}/baseDirectory - base directory for the destination pathpublic java.lang.String formatFileName(java.lang.String fileName)
formatFileName in interface ComponentBundlefileName - Original file name
public java.lang.String substringAfter(java.lang.String str,
java.lang.String separator)
substringAfter in interface ComponentBundlestr - input Stringseparator - seperator string
public void deleteExcludedBundleResources(java.lang.String srcFileNamePrefix,
java.lang.String destFileNamePrefix,
java.lang.String baseDirectory)
deleteExcludedBundleResources in interface ComponentBundlesrcFileNamePrefix - prefix for the srcFileNames location in the jar f.e.
editpresentation/destFileNamePrefix - destenation path can hold bundle specific names f.e.
/WEB-INF/wm/jsp/edit/wcb/{bundle_id}/baseDirectory - base directory for the destination path
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||