|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Repository
The Repository provides a collection of application-wide data
structures and services that typically setup the whole application
structure in a modular fashion.
These modules are called Participants and they are
registered through a name so make it possible to retrieve them. The name is
not necessarily a unique identifier, but can also identify a specific
Participant type.
Participant| Method Summary | |
|---|---|
void |
cleanup()
Cleans up the repository, typically done at application shutdown. |
Object |
getContext()
Retrieves the context in which the repository was initialized. |
Participant |
getParticipant(String name)
Looks for the participant that corresponds to a given name and returns it when found. |
Collection<? extends Participant> |
getParticipants(String name)
Returns all the participants that correspond to a given name. |
HierarchicalProperties |
getProperties()
Retrieves the repository's properties. |
boolean |
hasParticipant(String name)
Verifies if a participant with a certain name is present in the repository. |
boolean |
isFinished()
Obtains the finished status of the initialization. |
| Method Detail |
|---|
boolean hasParticipant(String name)
name - The name of the participant that you wish to look up in the
repository.
true if the participant could be found, or
false otherwise
Participant getParticipant(String name)
Participant instance if the provided name could
be found; or
null if the participant couldn't be found
ParticipantCollection<? extends Participant> getParticipants(String name)
name - The name of the participants that you wish to retrieve from
the repository.
Collection of Participants that
correspond to the name; or
null if no participants with the provided name could be
found
ParticipantHierarchicalProperties getProperties()
System.getProperties, but then not for the whole
system, but just for this application.
Also, instead of just have a map of String keys and values,
the property values are of the PropertyValue type and are looked
up at run-time in a hierachical manner. This provides them with IoC
capabilities.
Since Java allows the configuration of an application through the use of properties, many other sub-system have adopted a similar approach (for example servlet init parameters). Most of the time an application runs through several barriers of configuration that often function independently. These properties make it possible for each sub-system to add their properties to the same pool. This makes it much more convenient to retrieve a property value.
Object getContext()
null if the context isn't accessible
boolean isFinished()
false if the initialization is still busy; or
true if the initialization is finished
void cleanup()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||