|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.revusky.niggle.data.DataRegistryImpl
This object plays a central role in the niggle framework. It is essentially a repository of "metadata" that allows us to get at the various containers as well as "exemplars" of the various data records.
Constructor Summary | |
DataRegistryImpl()
|
Method Summary | |
DataSource |
getDataSource(java.lang.String name)
|
java.util.List |
getDataSourceNames()
|
static DataRegistry |
getDefaultRegistry()
|
Record |
getExemplar(java.lang.String type)
|
Record |
getExemplar(java.lang.String type,
int version)
|
RecordDescriptor |
getMetadata(java.lang.String type)
get record Metadata for the type and the highest version number available. |
RecordDescriptor |
getMetadata(java.lang.String type,
int version)
get record Metadata for the type and version. |
java.util.List |
getRecordNames()
|
void |
registerDataSource(DataSource source)
register a DataSource by its unique name |
void |
registerDataSource(DataSourceMetadata dsm)
register the metadata for a DataSource by its unique name. |
void |
registerRecordType(RecordDescriptor descriptor)
Register the metadata for a record type. |
static void |
setDefaultRegistry(DataRegistry registry)
Optional hook to call if you want to substitute a custom DataRegistry implementation for the default one. |
void |
setRemoteRegistry(DataRegistry registry)
Set a second DataRegistry source that will be used if the type is not found locally. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DataRegistryImpl() throws java.io.IOException
Method Detail |
public static DataRegistry getDefaultRegistry()
public static void setDefaultRegistry(DataRegistry registry)
public void setRemoteRegistry(DataRegistry registry) throws java.io.IOException
public RecordDescriptor getMetadata(java.lang.String type) throws java.io.IOException
DataRegistry
getMetadata
in interface DataRegistry
public RecordDescriptor getMetadata(java.lang.String type, int version) throws java.io.IOException
DataRegistry
getMetadata
in interface DataRegistry
public void registerRecordType(RecordDescriptor descriptor) throws java.io.IOException
DataRegistry
registerRecordType
in interface DataRegistry
public void registerDataSource(DataSource source) throws java.io.IOException
DataRegistry
registerDataSource
in interface DataRegistry
public void registerDataSource(DataSourceMetadata dsm) throws java.io.IOException
DataRegistry
registerDataSource
in interface DataRegistry
public DataSource getDataSource(java.lang.String name) throws java.io.IOException
getDataSource
in interface DataRegistry
com.revusky.niggle.data.DataRegistry
public Record getExemplar(java.lang.String type, int version) throws java.io.IOException
getExemplar
in interface DataRegistry
com.revusky.niggle.data.DataRegistry
public Record getExemplar(java.lang.String type) throws java.io.IOException
getExemplar
in interface DataRegistry
com.revusky.niggle.data.DataRegistry
public java.util.List getDataSourceNames() throws java.io.IOException
getDataSourceNames
in interface DataRegistry
com.revusky.niggle.data.DataRegistry
public java.util.List getRecordNames() throws java.io.IOException
getRecordNames
in interface DataRegistry
com.revusky.niggle.data.DataRegistry
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |