Class Utils

java.lang.Object
org.wso2.carbon.service.mgt.util.Utils

public final class Utils extends Object
  • Method Details

    • getWsdlInformation

      public static String[] getWsdlInformation(String serviceName, org.apache.axis2.engine.AxisConfiguration axisConfig) throws org.apache.axis2.AxisFault
      Throws:
      org.apache.axis2.AxisFault
    • getTryitURL

      public static String getTryitURL(String serviceName, org.apache.axis2.context.ConfigurationContext configurationContext) throws org.apache.axis2.AxisFault
      Throws:
      org.apache.axis2.AxisFault
    • deleteEmptyDirsOnPath

      public static void deleteEmptyDirsOnPath(String path, String stopPoint)
      Deletes all empty directories on the given path, starting from the end. If an unempty folder is found, stop there and return. This is only done, upto the given directory (stopPoint). Path can be a file path or a directory path.

      Ex: path = /home/axis2/repository/isuru/foo/bar upto = isuru - delete bar if it is empty - delete foo if it is empty - delete isuru if it is empty and stop as stopPoint = isuru

      Parameters:
      path - - path to delete directories
      stopPoint - - dirs are deleted only upto this point
    • getFormattedDuration

      public static String getFormattedDuration(long timeInMilliSeconds)
      Calculates the difference between current time and the given time and formats it according to the days, hours and minutes format.
      Parameters:
      timeInMilliSeconds - - start time
      Returns:
      - formatted duration