Class SynapseArtifactUploaderUtil
- java.lang.Object
-
- org.wso2.carbon.mediation.artifactuploader.util.SynapseArtifactUploaderUtil
-
public class SynapseArtifactUploaderUtil extends Object
Utility cass for Synapse Artifact Uploader
-
-
Constructor Summary
Constructors Constructor Description SynapseArtifactUploaderUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String[]getArtifacts(String extensionsPath)Returns Existing uploaded artifacts to Serverstatic StringgetFileExtension(String fileName)Finds the extension of a given filestatic booleanvalidateFilePath(File destinationFile, File targetDirectory)Validates whether the destinationFile is copied to the target directory
-
-
-
Method Detail
-
getArtifacts
public static String[] getArtifacts(String extensionsPath)
Returns Existing uploaded artifacts to Server
-
getFileExtension
public static String getFileExtension(String fileName)
Finds the extension of a given file- Parameters:
fileName- - name of the file- Returns:
- - extension
-
validateFilePath
public static boolean validateFilePath(File destinationFile, File targetDirectory) throws IOException
Validates whether the destinationFile is copied to the target directory- Parameters:
destinationFile- - file to be uploaded or removedtargetDirectory- - target directory- Returns:
- true if the destination file is copied to the target directory
- Throws:
IOException
-
-