public class TableProviderControlImpl extends java.lang.Object implements TableProviderControl, TableNameMapper, TableProviderParameters
| Constructor and Description |
|---|
TableProviderControlImpl(java.lang.String id,
TableProvider provider,
TableProviderManager manager,
com.streambase.liveview.internal.protocol.jaxb.ExternalServerConnectionType externalServerConnection,
int failedRetryAttempts) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearRetryCount()
This will set the failedRetryCount to zero.
|
void |
delete(java.lang.String remappedName)
Delete the table with this ID.
|
void |
disableAllAndRestart()
When a condition arises where the table provider is unable to service any of tables, but it does not wish
to have its tables removed from the system.
|
double |
getDouble(java.lang.String parameterKey,
double defaultValue)
Get the first parameter with this key, interpreted as an double.
|
com.streambase.liveview.internal.protocol.jaxb.ExternalServerConnectionType |
getExternalServerConnection() |
int |
getFailedRetryAttempts() |
java.lang.String |
getId() |
int |
getInt(java.lang.String parameterKey,
int defaultValue)
Get the first parameter with this key, interpreted as an integer.
|
java.util.Set<java.lang.String> |
getKeys()
Get all the keys that were specified.
|
java.util.List<java.lang.String> |
getMultivalue(java.lang.String parameterKey)
For keys that might appear more than once, this will return all of the values for that key.
|
TableProvider |
getProvider() |
TableProviderStatus |
getStatus() |
java.lang.String |
getString(java.lang.String parameterKey,
java.lang.String defaultValue)
Get the first parameter with this key, trimmed.
|
CatalogedTable |
getTable(java.lang.String remappedName)
Find the Table with this ID.
|
TablePropertiesConfigurationWrapper |
getTableFilteredAliases(java.lang.String name)
This will match the name against the selector.
|
java.util.Collection<CatalogedTable> |
getTables()
Get a collection of all the CatalogedTables that belong to your TableProvider.
|
long |
getWakeup() |
void |
insert(CatalogedTable catalogedTable)
Insert this Table.
|
java.io.File |
locateFile(java.lang.String filename,
boolean required)
This will attempt to locate a file within the project.
|
java.lang.String |
remap(java.lang.String name)
check and remap a name.
|
void |
setEnabled(java.lang.String tableId,
boolean enabled)
Change the enabled state of an existing table.
|
void |
setStartThread(java.lang.Thread thread) |
void |
setStatus(TableProviderStatus status) |
void |
shutMeDown()
Shut down the associated TableProvider.
|
void |
update(CatalogedTable catalogedTable)
Update this Table.
|
void |
upsert(CatalogedTable catalogedTable)
Insert or Update the Table, depending on whether or not it already exists.
|
public TableProviderControlImpl(java.lang.String id,
TableProvider provider,
TableProviderManager manager,
com.streambase.liveview.internal.protocol.jaxb.ExternalServerConnectionType externalServerConnection,
int failedRetryAttempts)
public void setEnabled(java.lang.String tableId,
boolean enabled)
throws LiveViewException
TableProviderControlsetEnabled in interface TableProviderControltableId - The ID of the Table to change.enabled - The new state to change it to.LiveViewException - if attempting to set a table that does not exist enabled. (Setting a non-existant table disabled is ignored.)public CatalogedTable getTable(java.lang.String remappedName)
TableProviderControlgetTable in interface TableProviderControlremappedName - The ID by which the table is saved (i.e. the remapped name)public java.util.Collection<CatalogedTable> getTables()
TableProviderControlgetTables in interface TableProviderControlpublic void insert(CatalogedTable catalogedTable)
TableProviderControlinsert in interface TableProviderControlcatalogedTable - The Table to insert. Note that the catalogedTable will be copied
so further changes to it will not affect anything until you update or upsert.public void upsert(CatalogedTable catalogedTable)
TableProviderControlupsert in interface TableProviderControlcatalogedTable - The Table to insert. Note that the catalogedTable will be copied
so further changes to it will not affect anything until you update or upsert.public void update(CatalogedTable catalogedTable)
TableProviderControlupdate in interface TableProviderControlcatalogedTable - The Table to insert. Note that the catalogedTable will be copied
so further changes to it will not affect anything until you update or upsert.public void delete(java.lang.String remappedName)
TableProviderControldelete in interface TableProviderControlpublic void shutMeDown()
TableProviderControlshutMeDown in interface TableProviderControlpublic TableProvider getProvider()
public java.lang.String getId()
public TableProviderStatus getStatus()
public void setStatus(TableProviderStatus status)
public long getWakeup()
public int getFailedRetryAttempts()
public com.streambase.liveview.internal.protocol.jaxb.ExternalServerConnectionType getExternalServerConnection()
public java.lang.String getString(java.lang.String parameterKey,
java.lang.String defaultValue)
TableProviderParametersgetString in interface TableProviderParameterspublic int getInt(java.lang.String parameterKey,
int defaultValue)
TableProviderParametersgetInt in interface TableProviderParameterspublic double getDouble(java.lang.String parameterKey,
double defaultValue)
TableProviderParametersgetDouble in interface TableProviderParameterspublic java.util.List<java.lang.String> getMultivalue(java.lang.String parameterKey)
TableProviderParametersgetMultivalue in interface TableProviderParameterspublic java.util.Set<java.lang.String> getKeys()
TableProviderParametersgetKeys in interface TableProviderParameterspublic java.lang.String remap(java.lang.String name)
TableNameMapperremap in interface TableNameMappername - the name to be remappedpublic TablePropertiesConfigurationWrapper getTableFilteredAliases(java.lang.String name)
TableNameMappergetTableFilteredAliases in interface TableNameMappername - is the name to be remapped and be wrapped in TablePropertiesConfigurationWrapperpublic void clearRetryCount()
TableProviderControlclearRetryCount in interface TableProviderControlpublic void setStartThread(java.lang.Thread thread)
public void disableAllAndRestart()
TableProviderControldisableAllAndRestart in interface TableProviderControlpublic java.io.File locateFile(java.lang.String filename,
boolean required)
throws LiveViewException
TableProviderControllocateFile in interface TableProviderControlfilename - indicates a file in the LiveView projectrequired - if true, this method will throw an exception if the file can't be found.LiveViewException - thrown if the required flag was true and either filename was empty or it couldn't find the file.