org.idoox.security.pstore
Interface PropertySerializer


public interface PropertySerializer

(De)Serializes properties and allows to get basic information about the property.

Since:
4.0
Component:
Security-Core

Field Summary
static java.lang.String IMAGE_TYPE
          Image MIME type
static java.lang.String PASSWORD_TYPE
          password type (not MIME)
static java.lang.String X509CERT
          X509 certificate MIME type
static java.lang.String X509CERT_CHAIN
          X509 certificate chain MIME type
 
Method Summary
 java.lang.Object decode(byte[] encoded)
          Deserializes the byte array to the property object
 byte[] encode(java.lang.Object property)
          Serializes the property to the byte array.
 java.lang.Class getAcceptingClass()
          Gets the class type, which is accepted by the encode method
 java.lang.String getPropertyDescription()
          Gets the description od the property.
 java.lang.String getType()
          Gets the type of the property, that can serialized/deserialized.
 

Field Detail

PASSWORD_TYPE

public static final java.lang.String PASSWORD_TYPE
password type (not MIME)

See Also:
Constant Field Values

X509CERT

public static final java.lang.String X509CERT
X509 certificate MIME type

See Also:
Constant Field Values

X509CERT_CHAIN

public static final java.lang.String X509CERT_CHAIN
X509 certificate chain MIME type

See Also:
Constant Field Values

IMAGE_TYPE

public static final java.lang.String IMAGE_TYPE
Image MIME type

See Also:
Constant Field Values
Method Detail

encode

public byte[] encode(java.lang.Object property)
Serializes the property to the byte array.

Parameters:
property - the property being serialized
Returns:
serialized byte array

decode

public java.lang.Object decode(byte[] encoded)
Deserializes the byte array to the property object

Parameters:
encoded - the serialized byte array of the property
Returns:
the property object.

getPropertyDescription

public java.lang.String getPropertyDescription()
Gets the description od the property.

Returns:
description of the property (it should describe the usage of the property)

getAcceptingClass

public java.lang.Class getAcceptingClass()
Gets the class type, which is accepted by the encode method

Returns:
class type accepted by encode method.

getType

public java.lang.String getType()
Gets the type of the property, that can serialized/deserialized.

Returns:
type of the property