Class Utils
java.lang.Object
com.microsoftopentechnologies.windowsazurestorage.helper.Utils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
containTokens
(String text) This method checks if text contains tokens in the form of $TOKEN or ${TOKEN}.static String
Returns formatted blob end point in case if a non-default one is specified.static String
Returns default blob url.static String
Returns md5 hash in string format for a given string.static String
static String
static String
static String
replaceMacro
(String s, Map<String, String> props) wrapper of methodUtil.replaceMacro(String, Map)
, trim the result.static String
wrapper of methodUtil.replaceMacro(String, Map)
, make the result into lower case.static boolean
validateBlobName
(String blobName) static boolean
validateContainerName
(String containerName) Checks for validity of container name after converting the input into lowercase.static boolean
validateFileShareName
(String fileShareName) Check for the validity of file share name.
-
Field Details
-
DEF_BLOB_URL
- See Also:
-
BLOB_ENDPOINT_ENDSUFFIX_KEYWORD
- See Also:
-
BLOB_NAME_LENGTH_LIMIT
public static final int BLOB_NAME_LENGTH_LIMIT- See Also:
-
-
Method Details
-
validateContainerName
Checks for validity of container name after converting the input into lowercase. Rules for container name 1.Container names must start with a letter or number, and can contain only letters, numbers, and the dash (-) character. 2.Every dash (-) character must be immediately preceded and followed by a letter or number; consecutive dashes are not permitted in container names. 3.All letters in a container name must be lowercase. 4.Container names must be from 3 through 63 characters long. 5.Root container and web container are specially treated.- Parameters:
containerName
- Name of the Azure storage container- Returns:
- true if container name is valid else returns false
-
validateBlobName
-
containTokens
This method checks if text contains tokens in the form of $TOKEN or ${TOKEN}.- Parameters:
text
-- Returns:
- true if tokens exist in input string
-
getBlobEP
Returns formatted blob end point in case if a non-default one is specified.- Parameters:
blobURL
-- Returns:
- DEF_BLOB_URL if blobURL is empty or blobURL is default one else returns formatted blob url.
-
getDefaultBlobURL
Returns default blob url.- Returns:
-
getMD5
Returns md5 hash in string format for a given string.- Parameters:
plainText
-- Returns:
-
getWorkDirectory
-
getPluginInstance
-
getPluginVersion
-
replaceMacro
wrapper of methodUtil.replaceMacro(String, Map)
, make the result into lower case.- Parameters:
s
-props
-locale
-- Returns:
-
replaceMacro
wrapper of methodUtil.replaceMacro(String, Map)
, trim the result.- Parameters:
s
-props
-- Returns:
-