Class ImageService

java.lang.Object
de.bytestore.hostinger.process.service.ImageService

@Service @Component public class ImageService extends Object
  • Constructor Details

    • ImageService

      public ImageService()
  • Method Details

    • substringVars

      public static List<String> substringVars(String valueIO)
      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

      public static List<String> separatePath(String valueIO)
      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

      public String getDefaultVars(String badgeIO)
      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

      public boolean isVar(String varIO)
      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

      public String getVarName(String varIO)
      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

      public String 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.
      Parameters:
      scriptIO - the string containing the script with variable tags
      keyIO - the key to be replaced in the variable tags
      valueIO - 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