|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.gx.webmanager.wcb.lifecycle.WCBLifecycleUtil
public class WCBLifecycleUtil
| Constructor Summary | |
|---|---|
WCBLifecycleUtil()
|
|
| Method Summary | |
|---|---|
static void |
deleteExcludedBundleResources(org.osgi.framework.Bundle bundle,
java.lang.String srcFileNamePrefix,
java.lang.String destFileNamePrefix,
java.lang.String directoryName)
Deletes all the resources (files and directories) that are in the directory, but not in the resources of the bundle. |
static void |
deleteFileFromDisk(java.io.File file)
Delete a specified file from disk. |
static java.lang.String |
formatFileName(java.lang.String fileName)
Formats the specified filename by fixing \ and / file separators and removing the starting file separator |
static java.lang.String |
formatFileName(java.lang.String fileName,
java.lang.Boolean cutStartingSeparator)
Formats the specified filename by fixing \ and / file separators |
static java.lang.String |
formatPath(java.lang.String pathName)
Ensure that the given pathname is a system path; System specific direcory indicators and ending with File.separator. |
static ComponentBundleDefinition |
getBundleDefinition(org.osgi.framework.Bundle bundle)
Returns the component bundle definition from the specified bundle. If the given bundle does not provide any component bundle definition null will be returned. |
static java.lang.String |
substringAfter(java.lang.String str,
java.lang.String separator)
Returns the remainder of the string after the first occurrence of the given separator |
static void |
writeBundleResourcesToFile(java.lang.String[] srcFileNames,
java.lang.String jarScrPrefix,
java.lang.String destFileNamePrefix,
ComponentBundleDefinition bundleDefinition,
java.lang.String baseDir)
deploy the srcFileNames[] to the given destFileNamePrefix tipicaly used for language resources f.e. |
static void |
writeBundleResourcesToFile(java.lang.String srcFileNamePrefix,
java.lang.String destFileNamePrefix,
java.lang.String baseDirectory,
ComponentBundleDefinition bundleDefinition)
|
static void |
writeComponentBundleResourceToFile(java.lang.String srcFileName,
java.lang.String destFileName,
java.lang.String destFileNamePrefix,
java.lang.String destBaseDirectory,
ComponentBundleDefinition bundleDefinition)
Write component bundle resource to file |
static void |
writeResourceToFile(java.net.URL srcResourceURL,
java.lang.String destFileName)
Stream a resource file named resourceName, which is present in the bundle that is passed on, to the specified location. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WCBLifecycleUtil()
| Method Detail |
|---|
public static void deleteFileFromDisk(java.io.File file)
file - File to delete
public static void deleteExcludedBundleResources(org.osgi.framework.Bundle bundle,
java.lang.String srcFileNamePrefix,
java.lang.String destFileNamePrefix,
java.lang.String directoryName)
bundle - The bundle that contains the resources to compare withdirectoryName - The directory to check for resourcessrcFileNamePrefix - The prefix of files in the bundle, like "presentationtype/jsp/"destFileNamePrefix - The prefix of files in the directory, like "WEB-INF/project/<bundleId>"
public static void writeBundleResourcesToFile(java.lang.String srcFileNamePrefix,
java.lang.String destFileNamePrefix,
java.lang.String baseDirectory,
ComponentBundleDefinition bundleDefinition)
srcFileNamePrefix - destFileNamePrefix - baseDirectory -
public static void writeBundleResourcesToFile(java.lang.String[] srcFileNames,
java.lang.String jarScrPrefix,
java.lang.String destFileNamePrefix,
ComponentBundleDefinition bundleDefinition,
java.lang.String baseDir)
srcFileNames - filenames to deply (jar format)jarScrPrefix - prefix for the srcFileNames location in the jar f.e. messages/destFileNamePrefix - destenation path can hold bundle specific names
public static void writeComponentBundleResourceToFile(java.lang.String srcFileName,
java.lang.String destFileName,
java.lang.String destFileNamePrefix,
java.lang.String destBaseDirectory,
ComponentBundleDefinition bundleDefinition)
srcFileName - destFileName - destFileNamePrefix - destBaseDirectory -
public static void writeResourceToFile(java.net.URL srcResourceURL,
java.lang.String destFileName)
srcResourceURL - URL of resource to writedestFileName - Destination filename to write to
public static java.lang.String substringAfter(java.lang.String str,
java.lang.String separator)
str - String to evaluateseparator - Separator to split on
public static java.lang.String formatFileName(java.lang.String fileName)
fileName - Filename to format
is removed from the filename
public static java.lang.String formatFileName(java.lang.String fileName,
java.lang.Boolean cutStartingSeparator)
fileName - Filename to formatcutStartingSeparator - if true the starting separator
is removed from the filename
public static java.lang.String formatPath(java.lang.String pathName)
pathName -
public static ComponentBundleDefinition getBundleDefinition(org.osgi.framework.Bundle bundle)
null will be returned.
bundle - Bundle to retrieve the component bundle definition for.
null if the given bundle does not provide any.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||