public class TableManagerImpl extends Object implements TableManager
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.log4j.Logger |
logger |
| Constructor and Description |
|---|
TableManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
createTable(Table table)
Creates a new table.
|
void |
downloadTableFile(String action,
Table table,
javax.servlet.http.HttpServletResponse response)
Access the table file on disk and streams it to the response object.
|
int |
getTableCount()
Queries the persistence mechanism and returns the number of tables.
|
int |
getTableCount(int userId)
Queries the persistence mechanism and returns the number of tables owned by a user.
|
List<Table> |
getTableList()
Requests a List of ALL tables from the persistence mechanism.
|
List<Table> |
getTableList(int userId)
Requests a List of tables owned by a particular user from the persistence mechanism.
|
Table |
lookupTable(int tableId)
Looks up and retrieves a table from the persistence mechanism using the table id.
|
Table |
lookupTable(String checkSum)
Looks up and retrieves a table from the persistence mechanism using the checkSum value.
|
void |
setTableDao(TableDao tableDao)
Sets the data access object which will acquire and persist the data
passed to it via the methods of this TableManager.
|
void |
toggleTableVisibility(Table table)
Toggles the table's visiblity attribute to in the persistence mechanism.
|
void |
updateTable(Table table)
Saves changes made to an existing table (meaning changes made to table
attributes in the persistence mechanism and NOT the creation/deletion of tables
contained within the table).
|
public void setTableDao(TableDao tableDao)
tableDao - The service mechanism data access object representing a Table.public Table lookupTable(int tableId)
lookupTable in interface TableManagertableId - The id of the table we are trying to locate (will be unique for each table).public Table lookupTable(String checkSum)
lookupTable in interface TableManagercheckSum - The checkSum check sum of the table we are trying to locate (will be unique for each table).public List<Table> getTableList()
getTableList in interface TableManagerpublic List<Table> getTableList(int userId)
getTableList in interface TableManageruserId - The id of the user what owns the tables.public int getTableCount()
getTableCount in interface TableManagerpublic int getTableCount(int userId)
getTableCount in interface TableManageruserId - The id of the user that owns the tables.public void toggleTableVisibility(Table table)
toggleTableVisibility in interface TableManagertable - The table in the persistence mechanism.public void createTable(Table table) throws IOException
createTable in interface TableManagertable - The table to be created.IOException - If an IO error occurs when writing the table to the file system.public void updateTable(Table table)
updateTable in interface TableManagertable - The existing table with changes that needs to be saved.public void downloadTableFile(String action, Table table, javax.servlet.http.HttpServletResponse response) throws RuntimeException
downloadTableFile in interface TableManageraction - Whether we want to view the file or download the file (influences the mimetype).table - The Table object representing the file to download.response - The current HttpServletRequest response.RuntimeException - If unable to stream the file to the response object.Copyright © 1999–2014 UCAR/Unidata. All rights reserved.