psdi.app.scconfig

Class SCConfigUtil

  • java.lang.Object
    • psdi.app.scconfig.SCConfigUtil


  • public class SCConfigUtil
    extends java.lang.Object
    This class is designed to provide utility methods for start center functionality
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String LOGGER 
      static java.lang.String NEW_TEMPLATE_PREFIX 
    • Constructor Summary

      Constructors 
      Constructor and Description
      SCConfigUtil() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String createCRCId(java.lang.String idString)
      Generates a universal uniqueid
      static java.lang.String extractValueFromXMLUsingRegex(java.lang.String toFindIn, java.lang.String contentidregex)
      Used to extract a certain XMl element from a string that represents an XML.
      static java.lang.String extractValueFromXMLUsingRegex(java.lang.String toFindIn, java.lang.String contentidregex, int flag)
      Used to extract a certain XMl element from a string that represents an XML.
      static java.lang.String longToString(long longValue)
      Converts long value to String.
      static java.lang.String makeAppList(java.util.HashSet hs)
      Makes comma seperated applist based on current apps
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SCConfigUtil

        public SCConfigUtil()
    • Method Detail

      • makeAppList

        public static java.lang.String makeAppList(java.util.HashSet hs)
        Makes comma seperated applist based on current apps
        Parameters:
        HashSet - of all allowed applications
        Returns:
      • longToString

        public static java.lang.String longToString(long longValue)
        Converts long value to String. Returns empty string if the value is 0
        Parameters:
        longValue -
        Returns:
        String
      • createCRCId

        public static java.lang.String createCRCId(java.lang.String idString)
        Generates a universal uniqueid
        Returns:
        String e.g. "97d06d57-aad7-4767-ac8f-f2d77df0675c"
      • extractValueFromXMLUsingRegex

        public static java.lang.String extractValueFromXMLUsingRegex(java.lang.String toFindIn,
                                                                     java.lang.String contentidregex,
                                                                     int flag)
        Used to extract a certain XMl element from a string that represents an XML. For e.g. in the xml if we want to extract contentuid, then use regex as contentuid=\"([^\"]*)\"
        Parameters:
        toFindIn - String to find in
        contentidregex - - regular expression
        Pattern - search flag eg Pattern.CASE_INSENSITIVE
        Returns:
      • extractValueFromXMLUsingRegex

        public static java.lang.String extractValueFromXMLUsingRegex(java.lang.String toFindIn,
                                                                     java.lang.String contentidregex)
        Used to extract a certain XMl element from a string that represents an XML. For e.g. in the xml if we want to extract contentuid, then use regex as contentuid=\"([^\"]*)\" Will with Pattern.CASE_INSENSITIVE as default
        Parameters:
        toFindIn - String to find in
        contentidregex - - regular expression
        Returns: