org.wso2.carbon.utils
Class Utils

java.lang.Object
  extended by org.wso2.carbon.utils.Utils

public class Utils
extends Object


Method Summary
static void copyDirectory(File sourceLocation, File targetLocation)
           
static boolean deleteDir(File dir)
          Deletes all files and subdirectories under dir.
static void deployZipFile(File zipFileLocation, File targetLocation)
          For a given Zip file, process each entry.
static String getWebContextName(org.osgi.framework.BundleContext bundleContext)
          Read context name from carbon.xml "carbon" will be the default value
static void registerDeployerServices(org.osgi.framework.BundleContext bundleContext)
          Registers the Deployer services by using values defined in the corresonding bundles component.xml file..
static void transform(InputStream xmlStream, InputStream xslStream, OutputStream outputStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

transform

public static void transform(InputStream xmlStream,
                             InputStream xslStream,
                             OutputStream outputStream)
                      throws TransformerException
Throws:
TransformerException

copyDirectory

public static void copyDirectory(File sourceLocation,
                                 File targetLocation)
                          throws IOException
Throws:
IOException

deployZipFile

public static void deployZipFile(File zipFileLocation,
                                 File targetLocation)
                          throws CarbonException
For a given Zip file, process each entry.

Parameters:
zipFileLocation - zipFileLocation
targetLocation - targetLocation
Throws:
CarbonException - CarbonException

deleteDir

public static boolean deleteDir(File dir)
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

public static String getWebContextName(org.osgi.framework.BundleContext bundleContext)
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


Copyright © 2014 WSO2 Inc. All rights reserved.