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 boolean
Indicates if deprecated methods/properties s/b allowed.private boolean
Indicates if Gosu query expressions can reference entities.Classpath entries from the registryprivate String
The entity access class.private URL
The URL of the active registryprivate static final String
The xml tag for indicating what class to use to initialize Gosu's Common Services with.private static Registry
The singleton instance of this class.private static List
A list of init listeners.static final String
The xml tag for indicating if deprecated methods/properties s/b allowed.static final String
The xml tag for indicating if Gosu query expressions can reference entities.static final String
private static final String
static final String
private static final String
static final String
private static final String
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
private boolean
private void
The purpose of this method is to prevent vulnerabilities related to XXE (XML external entity injection).private static void
private Document
getDocument
(URL registrURL) private Node
static void
/** Initialize with defaults.static Registry
instance()
Get the singleton instance.boolean
boolean
static void
void
setAllowDeprecatedReferences
(boolean bAllowDeprecatedReferences) void
setAllowEntityQueires
(boolean bAllowEntityQueires) void
setCommonServiceInit
(String commonServiceInit) static void
setLocation
(String kernelInitClass) static void
setLocation
(URL registryURL) Sets the location of the registry file.static void
setLocation
(URL registryURL, String strCommonServicesInitDefault) void
updateClasspath
(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
-