Package org.wso2.carbon.service.mgt.util
Class Utils
java.lang.Object
org.wso2.carbon.service.mgt.util.Utils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeleteEmptyDirsOnPath(String path, String stopPoint) Deletes all empty directories on the given path, starting from the end.static StringgetFormattedDuration(long timeInMilliSeconds) Calculates the difference between current time and the given time and formats it according to the days, hours and minutes format.static StringgetTryitURL(String serviceName, org.apache.axis2.context.ConfigurationContext configurationContext) static String[]getWsdlInformation(String serviceName, org.apache.axis2.engine.AxisConfiguration axisConfig)
-
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
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 directoriesstopPoint- - dirs are deleted only upto this point
-
getFormattedDuration
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
-