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
TableProviderControl
setEnabled
in interface TableProviderControl
tableId
- 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)
TableProviderControl
getTable
in interface TableProviderControl
remappedName
- The ID by which the table is saved (i.e. the remapped name)public java.util.Collection<CatalogedTable> getTables()
TableProviderControl
getTables
in interface TableProviderControl
public void insert(CatalogedTable catalogedTable)
TableProviderControl
insert
in interface TableProviderControl
catalogedTable
- 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)
TableProviderControl
upsert
in interface TableProviderControl
catalogedTable
- 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)
TableProviderControl
update
in interface TableProviderControl
catalogedTable
- 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)
TableProviderControl
delete
in interface TableProviderControl
public void shutMeDown()
TableProviderControl
shutMeDown
in interface TableProviderControl
public 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)
TableProviderParameters
getString
in interface TableProviderParameters
public int getInt(java.lang.String parameterKey, int defaultValue)
TableProviderParameters
getInt
in interface TableProviderParameters
public double getDouble(java.lang.String parameterKey, double defaultValue)
TableProviderParameters
getDouble
in interface TableProviderParameters
public java.util.List<java.lang.String> getMultivalue(java.lang.String parameterKey)
TableProviderParameters
getMultivalue
in interface TableProviderParameters
public java.util.Set<java.lang.String> getKeys()
TableProviderParameters
getKeys
in interface TableProviderParameters
public java.lang.String remap(java.lang.String name)
TableNameMapper
remap
in interface TableNameMapper
name
- the name to be remappedpublic TablePropertiesConfigurationWrapper getTableFilteredAliases(java.lang.String name)
TableNameMapper
getTableFilteredAliases
in interface TableNameMapper
name
- is the name to be remapped and be wrapped in TablePropertiesConfigurationWrapper
public void clearRetryCount()
TableProviderControl
clearRetryCount
in interface TableProviderControl
public void setStartThread(java.lang.Thread thread)
public void disableAllAndRestart()
TableProviderControl
disableAllAndRestart
in interface TableProviderControl
public java.io.File locateFile(java.lang.String filename, boolean required) throws LiveViewException
TableProviderControl
locateFile
in interface TableProviderControl
filename
- 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.