public class FactoryHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static List<String> |
DEFAULT_FEATURES_TO_DISABLE |
static List<String> |
DEFAULT_FEATURES_TO_ENABLE |
static List<String> |
DEFAULT_WHITE_LIST_CALLERS |
static String |
FEATURE_DISALLOW_DOCTYPE |
static String |
FEATURE_EXTERNAL_GENERAL_ENTITIES |
static String |
FEATURE_EXTERNAL_PARAMETER_ENTITIES |
static String |
FEATURE_LOAD_EXTERNAL_DTD |
static String |
FEATURE_USE_ENTITY_RESOLVER2 |
static String |
FEATURES_TO_DISABLE |
static String |
FEATURES_TO_ENABLE |
static String |
WHITE_LIST_CALLERS |
| Constructor and Description |
|---|
FactoryHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
configureFactory(DocumentBuilderFactory factory,
List<String> featuresToEnable,
List<String> featuresToDisable,
List<String> whiteListCallers) |
void |
configureFactory(SAXParserFactory factory,
List<String> featuresToEnable,
List<String> featuresToDisable,
List<String> whiteListCallers) |
List<String> |
getConfiguration(Class<?> factoryClass,
String propertyName,
List<String> defaultFeatures)
Returns a List of features (to be enabled or disabled) or class names (to be included in a caller white list) for
a factory.
|
public static final String FEATURE_EXTERNAL_GENERAL_ENTITIES
public static final String FEATURE_EXTERNAL_PARAMETER_ENTITIES
public static final String FEATURE_USE_ENTITY_RESOLVER2
public static final String FEATURE_LOAD_EXTERNAL_DTD
public static final String FEATURE_DISALLOW_DOCTYPE
public static final String FEATURES_TO_ENABLE
public static final String FEATURES_TO_DISABLE
public static final String WHITE_LIST_CALLERS
public void configureFactory(DocumentBuilderFactory factory, List<String> featuresToEnable, List<String> featuresToDisable, List<String> whiteListCallers)
public void configureFactory(SAXParserFactory factory, List<String> featuresToEnable, List<String> featuresToDisable, List<String> whiteListCallers)
public List<String> getConfiguration(Class<?> factoryClass, String propertyName, List<String> defaultFeatures)
factoryClass - used to look up the <factoryName>.propertyName - used as the property name in files or as the suffix in a sysme property.defaultFeatures - to be returned if other values are not found.Copyright © 2005–2016 Alfresco Software. All rights reserved.