eXo Kernel :: Container 2.5.0-GA

org.exoplatform.container.context
Interface CreationContextStorage


public interface CreationContextStorage

This class defined all the main methods needed to be able to store and/or access to a CreationalContext and its content

Version:
$Id$
Author:
Nicolas Filotto

Method Summary
 Set<String> getAllIds()
          Gives all the Contextual ids that have been stored
<T> CreationContext<T>
getCreationContext(String id)
          Gives the CreationContext corresponding to the given Contextual id
 String getId()
          Gives the id of the storage.
 void removeInstance(String id)
          Removes from the storage the instance corresponding to the given Contextual id
<T> T
setInstance(String id, CreationContext<T> creationContext)
          Stores an instance for the given Contextual id
 

Method Detail

getId

String getId()
Gives the id of the storage. Two CreationContextStorage corresponding to the same context must have the same id.


setInstance

<T> T setInstance(String id,
                  CreationContext<T> creationContext)
Stores an instance for the given Contextual id

Parameters:
id - the id of the contextual for which we want to set a value
creationContext - the CreationContext used for the instance creation
instance - the value to set
Returns:
the instance that has been effectively set.

getCreationContext

<T> CreationContext<T> getCreationContext(String id)
Gives the CreationContext corresponding to the given Contextual id

Parameters:
id - the id of the contextual for which we want to retrieve the CreationContext
Returns:
the corresponding CreationalContext if it exists, null otherwise

removeInstance

void removeInstance(String id)
Removes from the storage the instance corresponding to the given Contextual id

Parameters:
id - the id of the contextual for which we want to remove the instance

getAllIds

Set<String> getAllIds()
Gives all the Contextual ids that have been stored

Returns:
a Set containing all the ids that have been used to store a CreationContext

eXo Kernel :: Container 2.5.0-GA

Copyright © 2014 eXo Platform SAS. All Rights Reserved.