|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.schemarepo.BaseRepository
org.schemarepo.DelegatingRepository
public abstract class DelegatingRepository
Base class for all delegating repositories. Implements decorator pattern.
| Field Summary | |
|---|---|
protected Repository |
repo
|
| Fields inherited from class org.schemarepo.BaseRepository |
|---|
closed, logger |
| Constructor Summary | |
|---|---|
protected |
DelegatingRepository(Repository delegate)
|
| Method Summary | |
|---|---|
void |
close()
|
protected Map<String,String> |
exposeConfiguration()
Expose certain configuration elements as properties. |
void |
isValid()
Asserts the repository is in a valid state (for ex. |
Subject |
lookup(String subjectName)
Returns the subject if it exists, null otherwise. |
Subject |
register(String subjectName,
SubjectConfig config)
Attempt to create a Subject with the given name and validator. |
Iterable<Subject> |
subjects()
List all subjects. |
| Methods inherited from class org.schemarepo.BaseRepository |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Repository repo
| Constructor Detail |
|---|
protected DelegatingRepository(Repository delegate)
| Method Detail |
|---|
public void isValid()
BaseRepository
isValid in class BaseRepository
public Subject register(String subjectName,
SubjectConfig config)
Repository
subjectName - The name of the subject. Must not be null.config - The subject configuration. May be null.
public Subject lookup(String subjectName)
Repository
subjectName - the subject name
public Iterable<Subject> subjects()
Repository
public void close()
throws IOException
close in interface Closeableclose in class BaseRepositoryIOExceptionprotected Map<String,String> exposeConfiguration()
BaseRepositoryRemember to call
superwhen overriding!
exposeConfiguration in class BaseRepository
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||