private void setGroup(String name, String group) throws Exception { TapSchemaDAO ts = getTapSchemaDAO(); // assume 'name' is the schema, unless there's a table if (ts.getTable(name) != null) { log.debug("checking table permission"); checkTableWritePermission(name); } else { log.debug("checking schema permission"); checkSchemaWritePermission(name); } URI groupURI = null; if (group != null && group.trim().length() > 0) { // validate the group try { groupURI = new GroupURI(group).getURI(); } catch (IllegalArgumentException e) { throw new IllegalArgumentException( "Failed to set group write permissions: " + e.getMessage()); } } setReadWriteGroup(name, groupURI); syncOutput.setCode(200); }
TableDesc td = dao.getTable(tableName); if (td == null) throw new NoSuchElementException("not found: " + tableName);
DatabaseTransactionManager tm = new DatabaseTransactionManager(dataSource); try { TableDesc cur = getTable(tableName); if (cur == null) { throw new ResourceNotFoundException("not found: " + tableName);
TableDesc tableDesc = ts.getTable(tableName); if (tableDesc == null) { throw new ResourceNotFoundException("Table not found: " + tableName);
DatabaseTransactionManager tm = new DatabaseTransactionManager(dataSource); try { TableDesc cur = getTable(td.getTableName()); boolean update = (cur != null); if (update) {
if (tableName != null) TableDesc td = dao.getTable(tableName); if (td == null) { throw new ResourceNotFoundException("not found: " + tableName);
TapSchemaDAO ts = getTapSchemaDAO(); ts.setDataSource(ds); TableDesc td = ts.getTable(tableName); if (td != null) { throw new ResourceAlreadyExistsException("table " + tableName + " already exists");
TapSchemaDAO ts = pf.getTapSchemaDAO(); ts.setDataSource(ds); TableDesc td = ts.getTable(tableName); if (td == null) {