public abstract class AbstractRepositoryBuilder extends java.lang.Object implements RepositoryBuilder
Modifier | Constructor and Description |
---|---|
protected |
AbstractRepositoryBuilder() |
Modifier and Type | Method and Description |
---|---|
boolean |
addTriggerFactory(TriggerFactory factory)
Optionally add a TriggerFactory which will be called upon to create an
initial trigger for each Storable type that the Repository supports.
|
void |
assertReady()
Throw a configuration exception if the configuration is not filled out
sufficiently and correctly such that a repository could be instantiated
from it.
|
Repository |
build()
Builds a repository instance.
|
void |
errorCheck(java.util.Collection<java.lang.String> messages)
This method is called by assertReady, and subclasses must override to
perform custom checks.
|
java.lang.Iterable<TriggerFactory> |
getTriggerFactories()
Returns all the TriggerFactories which were added.
|
boolean |
removeTriggerFactory(TriggerFactory factory)
Remove a TriggerFactory which was added earlier.
|
public Repository build() throws ConfigurationException, RepositoryException
RepositoryBuilder
build
in interface RepositoryBuilder
ConfigurationException
- if there is a problem in the builder's configurationRepositoryException
- if there is a general problem opening the repositorypublic boolean addTriggerFactory(TriggerFactory factory)
RepositoryBuilder
addTriggerFactory
in interface RepositoryBuilder
public boolean removeTriggerFactory(TriggerFactory factory)
RepositoryBuilder
removeTriggerFactory
in interface RepositoryBuilder
public java.lang.Iterable<TriggerFactory> getTriggerFactories()
RepositoryBuilder
getTriggerFactories
in interface RepositoryBuilder
public final void assertReady() throws ConfigurationException
ConfigurationException
public void errorCheck(java.util.Collection<java.lang.String> messages) throws ConfigurationException
super.errorCheck
as well.messages
- add any error messages to this listConfigurationException
- if error checking indirectly caused
another exceptionCopyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.