public class TableProviderControlImpl extends Object implements TableProviderControl, TableNameMapper, TableProviderParameters
Constructor and Description |
---|
TableProviderControlImpl(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(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(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() |
String |
getId() |
int |
getInt(String parameterKey,
int defaultValue)
Get the first parameter with this key, interpreted as an integer.
|
Set<String> |
getKeys()
Get all the keys that were specified.
|
List<String> |
getMultivalue(String parameterKey)
For keys that might appear more than once, this will return all of the values for that key.
|
TableProvider |
getProvider() |
TableProviderStatus |
getStatus() |
String |
getString(String parameterKey,
String defaultValue)
Get the first parameter with this key, trimmed.
|
CatalogedTable |
getTable(String remappedName)
Find the Table with this ID.
|
TablePropertiesConfigurationWrapper |
getTableFilteredAliases(String name)
This will match the name against the selector.
|
Collection<CatalogedTable> |
getTables()
Get a collection of all the CatalogedTables that belong to your TableProvider.
|
long |
getWakeup() |
void |
insert(CatalogedTable catalogedTable)
Insert this Table.
|
File |
locateFile(String filename,
boolean required)
This will attempt to locate a file within the project.
|
String |
remap(String name)
check and remap a name.
|
void |
setEnabled(String tableId,
boolean enabled)
Change the enabled state of an existing table.
|
void |
setStartThread(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(String id, TableProvider provider, TableProviderManager manager, com.streambase.liveview.internal.protocol.jaxb.ExternalServerConnectionType externalServerConnection, int failedRetryAttempts)
public void setEnabled(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(String remappedName)
TableProviderControl
getTable
in interface TableProviderControl
remappedName
- The ID by which the table is saved (i.e. the remapped name)public 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(String remappedName)
TableProviderControl
delete
in interface TableProviderControl
public void shutMeDown()
TableProviderControl
shutMeDown
in interface TableProviderControl
public TableProvider getProvider()
public 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 String getString(String parameterKey, String defaultValue)
TableProviderParameters
getString
in interface TableProviderParameters
public int getInt(String parameterKey, int defaultValue)
TableProviderParameters
getInt
in interface TableProviderParameters
public double getDouble(String parameterKey, double defaultValue)
TableProviderParameters
getDouble
in interface TableProviderParameters
public List<String> getMultivalue(String parameterKey)
TableProviderParameters
getMultivalue
in interface TableProviderParameters
public Set<String> getKeys()
TableProviderParameters
getKeys
in interface TableProviderParameters
public String remap(String name)
TableNameMapper
remap
in interface TableNameMapper
name
- the name to be remappedpublic TablePropertiesConfigurationWrapper getTableFilteredAliases(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(Thread thread)
public void disableAllAndRestart()
TableProviderControl
disableAllAndRestart
in interface TableProviderControl
public File locateFile(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.