Class StoreAnonymizerManager

    • Field Detail

      • PROP_FILE_KV_SEPARATOR

        protected static final char PROP_FILE_KV_SEPARATOR
        See Also:
        Constant Field Values
    • Method Detail

      • getInstance

        public static StoreAnonymizerManager getInstance()
        Get the manager.
        Returns:
        StoreAnonymizerManager the singleton instance
      • anonymize

        public StoreAnonymizerResult anonymize​(java.lang.String inputFilePath,
                                               java.lang.String outputFilePath)
                                        throws StoreAnonymizerException
        Parameters:
        inputFilePath - input file to process
        outputFilePath - the path to result to, optional
        Returns:
        a result or null
        Throws:
        StoreAnonymizerException - if something unexpected occured
        Since:
        jcms-10.0.8
      • generateOutputFilePath

        public java.lang.String generateOutputFilePath​(java.lang.String inputFilePath)
        Creates a filename following format: {inputFilePath}_store_anonymized_2024-05-29_18-12-24.xml
        Parameters:
        inputFilePath - the input file, must not be null
        Returns:
        a path with timestamp for output file
        Since:
        jcms-10.0.8
      • isJcmsId

        public boolean isJcmsId​(java.lang.String value)
      • isJcmsIdTokens

        public boolean isJcmsIdTokens​(java.lang.String[] tokens)
      • isIdsArray

        public boolean isIdsArray​(java.lang.String value)
      • isIdsCollection

        public boolean isIdsCollection​(java.lang.String value)
      • isIdsArrayOrCollection

        public boolean isIdsArrayOrCollection​(java.lang.String value)
      • isMap

        public boolean isMap​(java.lang.String value)
      • isEmptyArrayCollectionOrMap

        public boolean isEmptyArrayCollectionOrMap​(java.lang.String value)
      • isClassname

        public boolean isClassname​(java.lang.String value)
      • isClassSlashJcmsId

        public boolean isClassSlashJcmsId​(java.lang.String attrValueToken)
      • isClassSlashJcmsIdArrayOrCollection

        public boolean isClassSlashJcmsIdArrayOrCollection​(java.lang.String attrValue)
      • isNumber

        public boolean isNumber​(java.lang.String value)
      • isPercentage

        public boolean isPercentage​(java.lang.String value)
      • isBoolean

        public boolean isBoolean​(java.lang.String value)
      • formatAsProperties

        public java.lang.String formatAsProperties​(java.util.Map<java.lang.String,​? extends java.util.Collection<java.lang.String>> propertiesMap)
        Convenient way to log current configuration formatted as where it should come from, ie, a properties file.
        Parameters:
        propertiesMap - map to print
        Returns:
        formatted map for properties file