Class StoreAnonymizerXmlHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.jalios.jstore.tools.anonymizer.impl.sax.DefaultStoreAnonymizerXmlHandler
com.jalios.jstore.tools.anonymizer.impl.sax.StoreAnonymizerXmlHandler
- All Implemented Interfaces:
StoreConstants,StoreAnonymizerConstants,ContentHandler,DTDHandler,EntityResolver,ErrorHandler
Processes an XML file, and rewrites it to an outputStream using
startElement(String, String, String, Attributes).- Since:
- jcms-10.0.8
- Author:
- Sylvain Devaux
-
Field Summary
FieldsFields inherited from class com.jalios.jstore.tools.anonymizer.impl.sax.DefaultStoreAnonymizerXmlHandler
MGRFields inherited from interface com.jalios.jstore.tools.anonymizer.StoreAnonymizerConstants
CLASSNAME_PATTERN, CLOSE_WRAPPER, DATA_CLASSNAME_PATTERN, DB_DATAID_PATTERN, JSTORE_DATAID_PATTERN, OBFUSCATED, OPEN_WRAPPERFields inherited from interface com.jalios.jstore.StoreConstants
ARRAY_FLAG, CLEANING_STATE, COLLECTION_FLAG, CREATE_OP, DELETE_OP, IDLE_STATE, INNER_LOGS, INNER_MILESTONE, INNER_PREFIX, INNER_SYNC, ITEM_ESCAPE_CHAR, ITEM_SEPARATOR, LOADING_STATE, LOG_DIR_LOG_PREFIX, LOG_DIR_LOG_WORK, MAP_ASSIGN, MAP_CHARS_TO_ESCAPE, MAP_CLASS_SEPARATOR, MAP_FLAG, NAMESPACE, SH_SUFFIX, STORING_STATE, UPDATE_OP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanonymizeStore(String inputFilePath, StoreAnonymizerParameters params) anonymizeString(String attributeValue) voidvoidendElement(String uri, String localName, String qName) getAnonymizedAttributeValue(String tagName, String attributeName, String attributeValue) getAnonymizedAttributeValueMap(String attributeValue) protected StoreAnonymizerParametersbooleanisAuthorizedAttribute(String attributeName) booleanisAuthorizedAttributeValue(String value) Allows values being: empty number boolean jcmsId empty array or collection IDs array or collectionbooleanisAuthorizedTagAttribute(String tagName, String attributeName) booleanisAuthorizedTagAttributeNameValuePair(String tagName, String attributeName, String attributeValue) voidstartElement(String uri, String localName, String qName, Attributes attributes) toString()Methods inherited from class com.jalios.jstore.tools.anonymizer.impl.sax.DefaultStoreAnonymizerXmlHandler
clearInputStream, clearOutputStream, getInputFilePath, getInputStream, getLineCount, getMultiInputStream, getOutputFilePath, getOutputStream, getSAXParser, setInputFilePath, setLineCount, setOutputFilePathMethods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
AUTHORIZED_MEMBER_KV_ATTRIBUTES
-
AUTHORIZED_TAG_KV_ATTRIBUTES
-
-
Constructor Details
-
StoreAnonymizerXmlHandler
public StoreAnonymizerXmlHandler()
-
-
Method Details
-
anonymizeStore
public StoreAnonymizerResult anonymizeStore(String inputFilePath, StoreAnonymizerParameters params) throws StoreAnonymizerException - Throws:
StoreAnonymizerException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classDefaultHandler- Throws:
SAXException
-
anonymizeString
-
getAnonymizedAttributeValue
-
getAnonymizedAttributeValueMap
-
isAuthorizedAttribute
-
isAuthorizedTagAttribute
-
isAuthorizedTagAttributeNameValuePair
-
isAuthorizedAttributeValue
Allows values being:- empty
- number
- boolean
- jcmsId
- empty array or collection
- IDs array or collection
-
getAuthorizedAttributes
-
getAuthorizedTagAttributes
-
getParams
-
toString
-