test_class.file: modules/flowable-rest/src/test/java/org/flowable/rest/service/api/management/TableColumnsResourceTest.java
test_class.identifier: TableColumnsResourceTest
test_class.superclass: extends BaseSpringRestTestCase
test_case.body: @Test
      public void testGetTableColumns() throws Exception {
          String tableName = managementService.getTableCount().keySet().iterator().next();
  
          TableMetaData metaData = managementService.getTableMetaData(tableName);
  
          CloseableHttpResponse response = executeRequest(
                  new HttpGet(SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_TABLE_COLUMNS, tableName)), HttpStatus.SC_OK);
  
          // Check table
          JsonNode responseNode = objectMapper.readTree(response.getEntity().getContent());
          closeResponse(response);
          assertThat(responseNode).isNotNull();
          assertThat(responseNode.get("tableName").textValue()).isEqualTo(tableName);
  
          ArrayNode names = (ArrayNode) responseNode.get("columnNames");
          ArrayNode types = (ArrayNode) responseNode.get("columnTypes");
          assertThat(names).isNotNull();
          assertThat(types).isNotNull();
  
          assertThat(names).hasSameSizeAs(metaData.getColumnNames());
          assertThat(types).hasSameSizeAs(metaData.getColumnTypes());
  
          for (int i = 0; i < names.size(); i++) {
              assertThat(metaData.getColumnNames().get(i)).isEqualTo(names.get(i).textValue());
              assertThat(metaData.getColumnTypes().get(i)).isEqualTo(types.get(i).textValue());
          }
      }
test_case.class_method_signature: TableColumnsResourceTest.testGetTableColumns()
test_case.full_signature: @Test public void testGetTableColumns()
test_case.identifier: testGetTableColumns
test_case.invocations: next iterator keySet getTableCount getTableMetaData executeRequest createRelativeResourceUrl readTree getContent getEntity closeResponse isNotNull assertThat isEqualTo assertThat textValue get get get isNotNull assertThat isNotNull assertThat hasSameSizeAs assertThat getColumnNames hasSameSizeAs assertThat getColumnTypes size isEqualTo assertThat get getColumnNames textValue get isEqualTo assertThat get getColumnTypes textValue get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetTableColumns()
focal_class.declarator: managementService
focal_class.modifier: @Autowired
      protected
focal_class.original_string: @Autowired
      protected ManagementService managementService;
focal_class.type: ManagementService
focal_class.var_name: managementService
focal_class.declarator: restApiInterceptor
focal_class.modifier: @Autowired(required=false)
      protected
focal_class.original_string: @Autowired(required=false)
      protected BpmnRestApiInterceptor restApiInterceptor;
focal_class.type: BpmnRestApiInterceptor
focal_class.var_name: restApiInterceptor
focal_class.file: modules/flowable-rest/src/main/java/org/flowable/rest/service/api/management/TableColumnsResource.java
focal_class.identifier: TableColumnsResource
focal_class.class_method_signature: TableColumnsResource.getTableMetaData(@ApiParam(name = "tableName") @PathVariable String tableName)
focal_class.full_signature: @ApiOperation(value = "Get column info for a single table", tags = { "Database tables" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the table exists and the table column info is returned."), @ApiResponse(code = 404, message = "Indicates the requested table does not exist.") }) @GetMapping(value = "/management/tables/{tableName}/columns", produces = "application/json") public TableMetaData getTableMetaData(@ApiParam(name = "tableName") @PathVariable String tableName)
focal_class.identifier: getTableMetaData
focal_class.modifiers: @ApiOperation(value = "Get column info for a single table", tags = { "Database tables" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the table exists and the table column info is returned."), @ApiResponse(code = 404, message = "Indicates the requested table does not exist.") }) @GetMapping(value = "/management/tables/{tableName}/columns", produces = "application/json") public
focal_class.parameters: (@ApiParam(name = "tableName") @PathVariable String tableName)
focal_class.return: TableMetaData
focal_class.signature: TableMetaData getTableMetaData(@ApiParam(name = "tableName") @PathVariable String tableName)
focal_method.body: @ApiOperation(value = "Get column info for a single table", tags = { "Database tables" })
      @ApiResponses(value = {
              @ApiResponse(code = 200, message = "Indicates the table exists and the table column info is returned."),
              @ApiResponse(code = 404, message = "Indicates the requested table does not exist.")
      })
      @GetMapping(value = "/management/tables/{tableName}/columns", produces = "application/json")
      public TableMetaData getTableMetaData(@ApiParam(name = "tableName") @PathVariable String tableName) {
          if (restApiInterceptor != null) {
              restApiInterceptor.accessTableInfo();
          }
          
          TableMetaData response = managementService.getTableMetaData(tableName);
  
          if (response == null) {
              throw new FlowableObjectNotFoundException("Could not find a table with name '" + tableName + "'.", String.class);
          }
          return response;
      }
focal_method.class_method_signature: TableColumnsResource.getTableMetaData(@ApiParam(name = "tableName") @PathVariable String tableName)
focal_method.full_signature: @ApiOperation(value = "Get column info for a single table", tags = { "Database tables" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the table exists and the table column info is returned."), @ApiResponse(code = 404, message = "Indicates the requested table does not exist.") }) @GetMapping(value = "/management/tables/{tableName}/columns", produces = "application/json") public TableMetaData getTableMetaData(@ApiParam(name = "tableName") @PathVariable String tableName)
focal_method.identifier: getTableMetaData
focal_method.invocations: accessTableInfo getTableMetaData
focal_method.modifiers: @ApiOperation(value = "Get column info for a single table", tags = { "Database tables" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the table exists and the table column info is returned."), @ApiResponse(code = 404, message = "Indicates the requested table does not exist.") }) @GetMapping(value = "/management/tables/{tableName}/columns", produces = "application/json") public
focal_method.parameters: (@ApiParam(name = "tableName") @PathVariable String tableName)
focal_method.return: TableMetaData
focal_method.signature: TableMetaData getTableMetaData(@ApiParam(name = "tableName") @PathVariable String tableName)