Obfuscator interface
If you intend to use obfuscation with an entity, the entity must implement the Obfuscator interface. Each entity that implements the Obfuscator interface must also designate an implementation class, such as UserContactObfuscator.
Obfuscator interface, all child entities inherit that implementation, including the implementation class. You can override the parent implementation by declaring implementsInterface in the child entity.For example, in the base configuration, UserContact.etx has the following definition:
<extension xmlns="http://guidewire.com/datamodel"
entityName="UserContact">
<implementsInterface
iface="gw.api.obfuscation.Obfuscator"
impl="gw.personaldata.obfuscation.UserContactObfuscator"/>
<column-override
name="EmployeeNumber">
<tag
name="PersonalData"
value="ObfuscateDefault"/>
</column-override>
</extension>
In the base configuration, an entity can implement the Obfuscatable delegate but have an Obfuscator interface
implementation of UnsupportedObfuscator. In this case, even if the entity is marked as obfuscatable, any
attempt to obfuscate it results in an UnsupportedOperation exception.
To be able to obfuscate an entity, you must use or write a suitable Obfuscator, such as one that extends PCPersonalDataObfuscator.
Note
If the configuration of implementsInterface is coded incorrectly, then the server startup verification check will not be able to detect the error. The error will be caught when the application is starting up instead.
For example, suppose you coded the impl part of implementsInterface with a misspelled class name,
OfuscatorImpl2:
<implementsEntity
name="Obfuscatable"/>
<implementsInterface
iface="gw.api.personaldata.Obfuscator"
impl="gw.api.personaldata.ObfuscatorImpl2"/>
The server startup verification check cannot detect this error. When the application starts up, it generates a Class Not Found exception. If you see this exception on server startup, correct the code in the configuration.
See also
