public interface ValueRepresentation<T>
Modifier and Type | Field and Description |
---|---|
static ValueRepresentation |
DEFAULT
Default value representation implementation for values representation is the same as canonical value representation.
|
static XmlOptions |
LOAD_OPTIONS
load options
|
static long |
NO_VERSION
Indicates that the data is serialized via some external mechanism rather than this representation or a previous version of this representation.
|
static XmlOptions |
SAVE_OPTIONS
save options
|
static java.lang.String |
SPECIAL_PROPERTY_CLASS_NAME
A special property name indicating the class name of the serialized data if it was serialized before the this class was introduced.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
fromCanonical(Ref ref, T canonicalValue, java.util.Map<java.lang.String,java.lang.String> customParams, PBE_EncryptionService es)
Converts the given canonical representation of the value to this value representation
|
long |
getSerializationVersion()
Returns the version of this value representation
|
T |
toCanonical(Ref ref, byte[] val, java.util.Map<java.lang.String,java.lang.String> customParams, PBE_DecryptionService ds)
Converts the given value from this representation to canonical representation.
|
static final long NO_VERSION
static final java.lang.String SPECIAL_PROPERTY_CLASS_NAME
static final XmlOptions SAVE_OPTIONS
static final XmlOptions LOAD_OPTIONS
static final ValueRepresentation DEFAULT
toCanonical(com.bea.wli.config.Ref, byte[], java.util.Map<java.lang.String, java.lang.String>, com.bea.wli.security.encryption.PBE_DecryptionService)
method.long getSerializationVersion()
T toCanonical(Ref ref, byte[] val, java.util.Map<java.lang.String,java.lang.String> customParams, PBE_DecryptionService ds) throws java.lang.Exception
ref
- a reference to the valueval
- value to be converted to canonical representationcustomParams
- input parameters that can be used to convert the value to canonical representation. These parameters are initially obtained when the object is converted from canonical form to this representation via the fromCanonical(com.bea.wli.config.Ref, T, java.util.Map<java.lang.String, java.lang.String>, com.bea.wli.security.encryption.PBE_EncryptionService)
method.
Additionally the following parameters are added to the custom parameters
SPECIAL_PROPERTY_CLASS_NAME
: This parameter contains the class name of the serialized datads
- the decryption service to use when decrypting values. This value is null if the data was not encryptedjava.lang.Exception
byte[] fromCanonical(Ref ref, T canonicalValue, java.util.Map<java.lang.String,java.lang.String> customParams, PBE_EncryptionService es) throws java.lang.Exception
canonicalValue
- the canonical representation to be convertedcustomParams
- this is a modifiable map that can be used to store extra parameters to be used when toCanonical(com.bea.wli.config.Ref, byte[], java.util.Map<java.lang.String, java.lang.String>, com.bea.wli.security.encryption.PBE_DecryptionService)
method is used. Implementations of this method could return values in this map to further customize the serialization/deserialization to/from the canonical form.es
- the encryption service to use when encrypting data. This value is null if no encryption is requestedjava.lang.Exception