Class ImageService
java.lang.Object
de.bytestore.hostinger.process.service.ImageService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDefaultVars(String badgeIO) Gets the default variable from the given string.getVarName(String varIO) Removes the variable tags from the given string and returns the variable name.booleanChecks if the given string contains any variables.replaceVar(String scriptIO, String keyIO, String valueIO) Replaces all occurrences of the given key surrounded by variable tags with the given value in the script string.separatePath(String valueIO) Separates a given path string into a list of individual path components.substringVars(String valueIO) Gets an array of substrings between the given start and end delimiters from the given string.
-
Constructor Details
-
ImageService
public ImageService()
-
-
Method Details
-
substringVars
Gets an array of substrings between the given start and end delimiters from the given string.- Parameters:
valueIO- the input string to search for substrings in- Returns:
- an array of substrings between the start and end delimiters
-
separatePath
Separates a given path string into a list of individual path components.- Parameters:
valueIO- the path string to be separated- Returns:
- a list of individual path components
-
getDefaultVars
Gets the default variable from the given string.- Parameters:
badgeIO- the string to search for the default variable in- Returns:
- the default variable as a string
-
isVar
Checks if the given string contains any variables.- Parameters:
varIO- the string to check for variables- Returns:
- true if the string contains variables, false otherwise
-
getVarName
Removes the variable tags from the given string and returns the variable name.- Parameters:
varIO- the string containing the variable name surrounded by variable tags- Returns:
- the variable name extracted from the given string
-
replaceVar
Replaces all occurrences of the given key surrounded by variable tags with the given value in the script string.- Parameters:
scriptIO- the string containing the script with variable tagskeyIO- the key to be replaced in the variable tagsvalueIO- the value to replace the key in the variable tags- Returns:
- the script string with all occurrences of the key surrounded by variable tags replaced with the value
-