io.atlassian.blobstore.client.api
Interface ContentKeyFactory


public interface ContentKeyFactory


Method Summary
 com.atlassian.fugue.Option<ContentKey> marshall(java.lang.String id)
          Marshalls a key into a BlobKey object.
 java.lang.String unmarshall(ContentKey key)
          Unmarshalls a key into a String, suitable for storage and transport.
 

Method Detail

marshall

com.atlassian.fugue.Option<ContentKey> marshall(java.lang.String id)
Marshalls a key into a BlobKey object. This is a partial injective function that will produce an Option.None where undefined. The produced BlobKey should be compatible with the unmarshall(ContentKey) method. The following invariant should hold: { ForAll (id: String such as marshall(id).isDefined): unmarshall(marshall(id)).equals(id) }

Parameters:
id -
Returns:

unmarshall

java.lang.String unmarshall(ContentKey key)
Unmarshalls a key into a String, suitable for storage and transport. The produced String should be compatible with the marshall(String) method. The following invariant should hold: { ForAll (key: BlobKey): marshall(unmarshall(key)).equals(key) }

Parameters:
key -
Returns: