Package gw.config
Class Registry
java.lang.Object
gw.config.Registry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<TypeLoaderSpec>XMLNode specifications for additional typeloaders that will be created for this runtime environmentprivate booleanIndicates if deprecated methods/properties s/b allowed.private booleanIndicates if Gosu query expressions can reference entities.Classpath entries from the registryprivate StringThe entity access class.private URLThe URL of the active registryprivate static final StringThe xml tag for indicating what class to use to initialize Gosu's Common Services with.private static RegistryThe singleton instance of this class.private static ListA list of init listeners.static final StringThe xml tag for indicating if deprecated methods/properties s/b allowed.static final StringThe xml tag for indicating if Gosu query expressions can reference entities.static final Stringprivate static final Stringstatic final Stringprivate static final Stringstatic final Stringprivate static final Stringprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidprivate booleanprivate voidThe purpose of this method is to prevent vulnerabilities related to XXE (XML external entity injection).private static voidprivate DocumentgetDocument(URL registrURL) private Nodestatic void/** Initialize with defaults.static Registryinstance()Get the singleton instance.booleanbooleanstatic voidvoidsetAllowDeprecatedReferences(boolean bAllowDeprecatedReferences) voidsetAllowEntityQueires(boolean bAllowEntityQueires) voidsetCommonServiceInit(String commonServiceInit) static voidsetLocation(String kernelInitClass) static voidsetLocation(URL registryURL) Sets the location of the registry file.static voidsetLocation(URL registryURL, String strCommonServicesInitDefault) voidupdateClasspath(List<String> classpath)
-
Field Details
-
TAG_ALLOW_DEPRECATED_REFERENCES
The xml tag for indicating if deprecated methods/properties s/b allowed.- See Also:
-
TAG_ALLOW_ENTITY_QUERIES
The xml tag for indicating if Gosu query expressions can reference entities.- See Also:
-
COMMON_SERVICE_INIT
The xml tag for indicating what class to use to initialize Gosu's Common Services with.- See Also:
-
TAG_SERIALIZATION
- See Also:
-
TAG_TYPELOADERS
- See Also:
-
TAG_TYPELOADER
- See Also:
-
TAG_CLASSPATH
- See Also:
-
TAG_CLASS
- See Also:
-
TAG_SRC
- See Also:
-
TAG_ENTRY
- See Also:
-
g_instance
The singleton instance of this class. -
g_listeners
A list of init listeners. -
_bAllowDeprecatedReferences
private boolean _bAllowDeprecatedReferencesIndicates if deprecated methods/properties s/b allowed. -
_bAllowEntityQueires
private boolean _bAllowEntityQueiresIndicates if Gosu query expressions can reference entities. -
_additionalTypeLoaderSpecs
XMLNode specifications for additional typeloaders that will be created for this runtime environment -
_classpathEntries
Classpath entries from the registry -
_commonServiceInit
The entity access class. -
_registerUrl
The URL of the active registry
-
-
Constructor Details
-
Registry
-
Registry
-
-
Method Details
-
initDefaults
public static void initDefaults()/** Initialize with defaults. Guidewire applications should NEVER call this. -
setLocation
-
setLocation
Sets the location of the registry file. Initializes singleton registry.- Parameters:
registryURL-
-
setLocation
-
addLocationListener
-
removeLocationListener
-
fireLocationChanged
private static void fireLocationChanged() -
getDocument
private Document getDocument(URL registrURL) throws IOException, ParserConfigurationException, SAXException -
disableExternalEntities
private void disableExternalEntities(DocumentBuilderFactory dbf) throws ParserConfigurationException The purpose of this method is to prevent vulnerabilities related to XXE (XML external entity injection). Although the nature of Gosu's registry in this case is such that it is _not_ vulnerable, we configure the parser in this way to appease those who demand zero alarm results from static analysis tooling such as Veracode.- Throws:
ParserConfigurationException
-
getTag
-
instance
Get the singleton instance.- Returns:
- The one and only Registry.
-
getCommonServiceInit
- Returns:
-
setCommonServiceInit
- Parameters:
commonServiceInit-
-
getAdditionalTypeLoaders
-
getClasspathEntries
-
isAllowDeprecatedReferences
public boolean isAllowDeprecatedReferences()- Returns:
-
setAllowDeprecatedReferences
public void setAllowDeprecatedReferences(boolean bAllowDeprecatedReferences) -
isAllowEntityQueires
public boolean isAllowEntityQueires()- Returns:
-
setAllowEntityQueires
public void setAllowEntityQueires(boolean bAllowEntityQueires) -
updateClasspath
-
canWrite
-