Interface CreationContextStorage
-
public interface CreationContextStorageThis class defined all the main methods needed to be able to store and/or access to aCreationalContextand its content- Version:
- $Id$
- Author:
- Nicolas Filotto
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<String>getAllIds()Gives all theContextualids that have been stored<T> CreationContext<T>getCreationContext(String id)Gives theCreationContextcorresponding to the givenContextualidStringgetId()Gives the id of the storage.voidremoveInstance(String id)Removes from the storage the instance corresponding to the givenContextualid<T> TsetInstance(String id, CreationContext<T> creationContext)Stores an instance for the givenContextualid
-
-
-
Method Detail
-
getId
String getId()
Gives the id of the storage. TwoCreationContextStoragecorresponding to the same context must have the same id.
-
setInstance
<T> T setInstance(String id, CreationContext<T> creationContext)
Stores an instance for the givenContextualid- Parameters:
id- the id of the contextual for which we want to set a valuecreationContext- theCreationContextused for the instance creation- Returns:
- the instance that has been effectively set.
-
getCreationContext
<T> CreationContext<T> getCreationContext(String id)
Gives theCreationContextcorresponding to the givenContextualid- Parameters:
id- the id of the contextual for which we want to retrieve theCreationContext- Returns:
- the corresponding
CreationalContextif it exists,nullotherwise
-
removeInstance
void removeInstance(String id)
Removes from the storage the instance corresponding to the givenContextualid- Parameters:
id- the id of the contextual for which we want to remove the instance
-
getAllIds
Set<String> getAllIds()
Gives all theContextualids that have been stored- Returns:
- a
Setcontaining all the ids that have been used to store aCreationContext
-
-