org.eclipse.ecf.storage
Interface IStorableContainerAdapter

All Superinterfaces:
IIdentifiable

public interface IStorableContainerAdapter
extends IIdentifiable

Container adapter for storable containers. Containers that can be stored via IContainerStores must implement this interface.


Method Summary
 java.lang.String getContainerFactoryName()
          Get the container factory name for storage and restoration.
 void restore(org.eclipse.equinox.security.storage.ISecurePreferences containerStorage)
          Restore the contents of the container given the storage instance.
 void store(org.eclipse.equinox.security.storage.ISecurePreferences containerStorage)
          Store the contents of the implementer in the given storage instance.
 boolean storeEncrypted()
           
 
Methods inherited from interface org.eclipse.ecf.core.identity.IIdentifiable
getID
 

Method Detail

storeEncrypted

boolean storeEncrypted()
Returns:
true if the implementer of this adapter should be stored as encrypted, false if encryption should not be used.

getContainerFactoryName

java.lang.String getContainerFactoryName()
Get the container factory name for storage and restoration. The returned String will be used for creating a restored version of this container via IContainerEntry.createContainer().

Returns:
String that identifies the container factory name for this container. The returned value must not be null.

store

void store(org.eclipse.equinox.security.storage.ISecurePreferences containerStorage)
           throws org.eclipse.equinox.security.storage.StorageException
Store the contents of the implementer in the given storage instance. This method is called during IContainerStore.store(IStorableContainerAdapter) and gives the implementer a chance to store any state. The state is then passed to the restore(ISecurePreferences) method during restore of this container.

Parameters:
containerStorage - the ISecurePreferences storage to use to store any state associated with this container.
Throws:
org.eclipse.equinox.security.storage.StorageException - if the store of this container should fail.

restore

void restore(org.eclipse.equinox.security.storage.ISecurePreferences containerStorage)
             throws org.eclipse.equinox.security.storage.StorageException
Restore the contents of the container given the storage instance. This method is called during IContainerEntry.createContainer(), to give the implementer an opportunity to restore any state previously stored via store(ISecurePreferences).

Parameters:
containerStorage - the ISecurePreferences storage whose contents were set via store(ISecurePreferences).
Throws:
org.eclipse.equinox.security.storage.StorageException - if the restore should fail.