Package org.wso2.carbon.utils
Class Utils
java.lang.Object
org.wso2.carbon.utils.Utils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyDirectory(File sourceLocation, File targetLocation) static booleanDeletes all files and subdirectories under dir.static voiddeployZipFile(File zipFileLocation, File targetLocation) For a given Zip file, process each entry.static StringgetWebContextName(org.osgi.framework.BundleContext bundleContext) Read context name from carbon.xml "carbon" will be the default valuestatic voidregisterDeployerServices(org.osgi.framework.BundleContext bundleContext) Registers the Deployer services by using values defined in the corresonding bundles component.xml file..static intresolveTimeout(String timeoutProperty) static voidtransform(InputStream xmlStream, InputStream xslStream, OutputStream outputStream)
-
Method Details
-
transform
public static void transform(InputStream xmlStream, InputStream xslStream, OutputStream outputStream) throws TransformerException - Throws:
TransformerException
-
copyDirectory
- Throws:
IOException
-
deployZipFile
For a given Zip file, process each entry.- Parameters:
zipFileLocation- zipFileLocationtargetLocation- targetLocation- Throws:
CarbonException- CarbonException
-
deleteDir
Deletes all files and subdirectories under dir. Returns true if all deletions were successful. If a deletion fails, the method stops attempting to delete and returns false.- Parameters:
dir- directory to delete- Returns:
- status
-
getWebContextName
Read context name from carbon.xml "carbon" will be the default value- Returns:
- webcontext name
-
registerDeployerServices
public static void registerDeployerServices(org.osgi.framework.BundleContext bundleContext) throws Exception Registers the Deployer services by using values defined in the corresonding bundles component.xml file..- Parameters:
bundleContext-- Throws:
Exception
-
resolveTimeout
-