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
  • Method Details

    • 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
      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