Class SystemResource

java.lang.Object
com.ads.services.webservice.rest.SystemResource

@RestController @RequestMapping("/api/metadatamanager") public class SystemResource extends Object
Contains the methods which performs the operations like Creation, Update, Deletion and Retrieval of Systems, Environments, Tables, and Columns.
All the REST methods have return type ResponseEntity.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    jakarta.servlet.http.HttpServletRequest
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity
    Creates the list of columns for the specified list of SMColumn objects.
    org.springframework.http.ResponseEntity
    Inserts a new system environment for the specified environment object.
    org.springframework.http.ResponseEntity
    Creates the list of systems for the specified list of SMSystem objects.
    org.springframework.http.ResponseEntity
    Inserts new tables for the specified SMTable objects list.
    org.springframework.http.ResponseEntity
    deleteColumns(String columnIds)
    Removes columns for the specified list of columnIds.
    org.springframework.http.ResponseEntity
    deleteEnvironments(String environmentIds, APIConstants.VersionMode versionMode)
    Deletes the environments with the specified list of environmentIds and versionMode.
    org.springframework.http.ResponseEntity
    deleteSystems(String systemIds)
    Deletes the systems for the specified list of systemIds.
    org.springframework.http.ResponseEntity
    deleteTables(String tableIds)
    Deletes the tables with the specified list of tableIds.
    org.springframework.http.ResponseEntity
    getColumn(int columnId, int fillOptions)
    Returns SMColumn object for the specified columnId.
    org.springframework.http.ResponseEntity
    getColumnId(String systemName, String environmentName, String tableName, String columnName)
    Returns the columnId for the specified environmentName, systemName, tableName and columnName.
    org.springframework.http.ResponseEntity
    getColumns(String columnIds, int fillOptions, int page, int per_page)
    Returns all the associated columns of the specified columnIds and fillOptions, for which specifying the columnIds and fillOptions parameters are mandatory in order to retrieve the columns.
    org.springframework.http.ResponseEntity
    getEnvironment(int environmentId, int fillOptions, boolean useReferenceId, int page, int per_page)
    Returns SMEnvironment object for the specified environmentId, fillOptions, and useReferenceId.
    org.springframework.http.ResponseEntity
    getEnvironmentId(String systemName, String environmentName)
    Returns the environmentId for the specified systemName and environmentName.
    org.springframework.http.ResponseEntity
    getEnvironments(String environmentIds, int fillOptions, boolean useReferenceId, int page, int per_page)
    Returns the SMEnvironment object list for the specified environmentIds.
    org.springframework.http.ResponseEntity
    getEnvironmentsBySystemId(int systemId, int page, int per_page)
     
    org.springframework.http.ResponseEntity
    getMetaData(String inputJson)
    Returns the metadata information includes systemId, systemName, environmentId, environmentName, environemnetType, dataSourceType etc..as a JSONArray for the specified input values in the JSON object.
    org.springframework.http.ResponseEntity
    getSystem(int systemId)
    Returns SMSystem object for the specified systemId.
    org.springframework.http.ResponseEntity
    getSystemId(String systemName)
    Returns the systemId for the specified systemName.
    org.springframework.http.ResponseEntity
    getSystems(String systemIds, int page, int per_page)
    Returns the list of SMSystems.
    org.springframework.http.ResponseEntity
    getTable(int tableId, int fillOptions)
    Returns SMTable object for the specified tableId.
    org.springframework.http.ResponseEntity
    getTableId(String systemName, String environmentName, String tableName)
    Returns the tableId for the specified systemName, environmentName and tableName.
    org.springframework.http.ResponseEntity
    getTables(String tableIds, int fillOptions, int page, int per_page)
    Returns the list of tables for the specified tableIds list.
    org.springframework.http.ResponseEntity
    scanIntoEnvironment(int environmentId, DBProperties.Operation dbOperation, DBHelper dBHelper)
    Scan and save the environment meta data into the specified environmentId by specifying the dbHelper object and dbOperation in the form of JSON.
    org.springframework.http.ResponseEntity
    updateColumns(List<SMColumn> columns, boolean useReferenceId)
    Updates the list of columns for the specified list of SMColumn objects and useReferenceId.
    org.springframework.http.ResponseEntity
    Updates the list of environments for the specified list of SMEnvironment objects.
    org.springframework.http.ResponseEntity
    Updates the list of systems for the specified list of SMSystem objects.i.e when provided with system details, this method updates the respective information of the system.
    org.springframework.http.ResponseEntity
    updateTables(List<SMTable> tables, boolean useReferenceId)
    Updates the list of tables for the specified list of SMTable objects and useReferenceId.
    org.springframework.http.ResponseEntity
    versionEnvironment(int environmentId, String changeDescription, String versionLabel)
    Creates new version of the environment for the specified environmentId.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • request

      @Autowired public jakarta.servlet.http.HttpServletRequest request
  • Constructor Details

    • SystemResource

      public SystemResource()
  • Method Details

    • getColumn

      @GetMapping(path="/columns/{column_id}", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getColumn(@PathVariable(name="column_id") int columnId, @RequestParam(name="fillOptions",defaultValue="0") int fillOptions) throws Exception
      Returns SMColumn object for the specified columnId.
      Specifying the columnId and fillOptions are mandatory. The returned SMColumn object contains all the details pertaining to column such as column name, table name in which the column is present, column length, column precision etc... and also contains details of column indexes, column extended properties ,valid values and extended properties of valid values based on the fillOptions parameter value passed with reference/addition of APIConstants.SMFillOptions.
      Here fillOptions parameter takes value of either APIConstants.SMFillOptions.COLUMN_INDEXES or APIConstants.SMFillOptions.COLUMN_EXTENDED_PROPERTIES or APIConstants.SMFillOptions.COLUMN_VALID_VALUES or APIConstants.SMFillOptions.VALID_VALUES_EXTENDED_PROPERTIES. Based on the value passed its related data is returned within the SMColumn object and if you want to get column indexes and column extended properties then fillOptions parameter value will be addition of COLUMN_INDEXES value and COLUMN_EXTENDED_PROPERTIES value i.e 8+16=24 and so on.
      Parameters:
      columnId - int
      fillOptions - int APIConstants.SMFillOptions
      Returns:
      Response - Column object
      Throws:
      Exception
      Since:
      12.0
    • getColumns

      @GetMapping(path="/columns", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getColumns(@RequestParam(name="columnIds") String columnIds, @RequestParam(name="fillOptions",defaultValue="0") int fillOptions, @RequestParam(name="page",defaultValue="1") int page, @RequestParam(name="per_page",defaultValue="25") int per_page) throws Exception
      Returns all the associated columns of the specified columnIds and fillOptions, for which specifying the columnIds and fillOptions parameters are mandatory in order to retrieve the columns.
      Each column object contains details like column name, column datatype, column length and column precision etc..and also contains details of column extended properties ,valid values and extended properties of column indexes, valid values based on the fillOptions parameter value passed with reference/addition of APIConstants.SMFillOptions.
      Here fillOptions parameter takes value of either APIConstants.SMFillOptions.COLUMN_INDEXES or APIConstants.SMFillOptions.COLUMN_EXTENDED_PROPERTIES or APIConstants.SMFillOptions.COLUMN_VALID_VALUES or APIConstants.SMFillOptions.VALID_VALUES_EXTENDED_PROPERTIES. Based on the value passed its related data is returned within the SMColumn object and if you want to get column indexes and column extended properties then fillOptions parameter value will be addition of COLUMN_INDEXES value and COLUMN_EXTENDED_PROPERTIES value i.e 8+16=24 and so on.
      Note: Pagination is applied, and by default, 25 records are displayed per page.
      Parameters:
      columnIds - String
      fillOptions - int APIConstants.SMFillOptions
      page - The page number to retrieve (1-indexed).
      per_page - The number of records to display per page.
      Returns:
      Response - List of column objects.
      Throws:
      Exception - sample for columnIds ==>1,2,3.
      Since:
      12.0
    • getEnvironment

      @GetMapping(path="/environments/{environment_id}", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getEnvironment(@PathVariable(name="environment_id") int environmentId, @RequestParam(name="fillOptions",defaultValue="0") int fillOptions, @RequestParam(name="useReferenceId",required=false) boolean useReferenceId, @RequestParam(name="page",defaultValue="1") int page, @RequestParam(name="per_page",defaultValue="25") int per_page) throws Exception
      Returns SMEnvironment object for the specified environmentId, fillOptions, and useReferenceId. Specifying the environmentId, fillOptions and useReferenceId is mandatory.
      Returns all the details pertaining to a specific environment such as environmentName, systemName in which environment is present, related DB information and its auditHistory. Specifying the environmentId is mandatory in order to retrieve the environment details.
      useReferenceId takes the values as true or false.
      If useReferenceId is true, then it returns the environment based on checking the table referenceId which is set to the tables and column referenceId set in the columns of those tables in the specific environment.
      Here fillOptions parameter takes value of APIConstants.SMFillOptions.ENVIRONMENT_TABLES_COLUMNS Based on the value passed its related data is returned within the SMEnvironment object. The default integer value for fillOptions is 0(zero).
      Note: Pagination is applied, and by default, 25 records are displayed per page.
      Parameters:
      environmentId - int
      fillOptions - APIConstants.SMFillOptions.ENVIRONMENT_TABLES_COLUMNS int
      useReferenceId - boolean
      page - The page number to retrieve (1-indexed).
      per_page - The number of records to display per page.
      Returns:
      Response - Environment object
      Throws:
      Exception
      Since:
      12.0
    • getEnvironments

      @GetMapping(path="/environments", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getEnvironments(@RequestParam(name="environmentIds") String environmentIds, @RequestParam(name="fillOptions",defaultValue="0") int fillOptions, @RequestParam(name="useReferenceId",required=false) boolean useReferenceId, @RequestParam(name="page",defaultValue="1") int page, @RequestParam(name="per_page",defaultValue="25") int per_page) throws Exception
      Returns the SMEnvironment object list for the specified environmentIds. Specifying environmentIds is mandatory.
      Returns all the details pertaining to the Environments, such as environmentId, environmetName, environmentType, systemId and systemName in which the Environments are present, and its associated Database details like userName, password, dbDriver information etc...
      Here fillOptions parameter takes value of APIConstants.SMFillOptions.ENVIRONMENT_TABLES_COLUMNS Based on the value passed its related data is returned within the SMEnvironment object. The default integer value for fillOptions is 0(zero).
      Note: Pagination is applied, and by default, 25 records are displayed per page.
      Parameters:
      environmentIds - String
      fillOptions - APIConstants.SMFillOptions.ENVIRONMENT_TABLES_COLUMNS int
      useReferenceId - boolean
      page - The page number to retrieve (1-indexed).
      per_page - The number of records to display per page.
      Returns:
      Response - A paginated list of SMEnvironment objects.
      Throws:
      Exception - sample for environmentIds ==>1,2,3.
      Since:
      12.0
    • getSystem

      @GetMapping(path="/systems/{system_id}", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getSystem(@PathVariable(name="system_id") int systemId) throws Exception
      Returns SMSystem object for the specified systemId. Specifying systemId is mandatory.
      Returns all the details such as systemName, description, systemOwner details, dataBase details and auditHistory etc.
      Parameters:
      systemId - int
      Returns:
      Response - System object
      Throws:
      Exception
      Since:
      12.0
    • getSystems

      @GetMapping(path="/systems", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getSystems(@RequestParam(name="systemIds",required=false) String systemIds, @RequestParam(name="page",defaultValue="1") int page, @RequestParam(name="per_page",defaultValue="25") int per_page) throws Exception
      Returns the list of SMSystems.
      Returns all the available Systems as a list of SMSystem objects.
      Parameters:
      systemIds - String
      page - The page number to retrieve (1-indexed).
      per_page - The number of records to display per page.
      Returns:
      Response - List of SMSystems
      Throws:
      Exception
      Since:
      12.0
    • getTable

      @GetMapping(path="/tables/{table_id}", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getTable(@PathVariable(name="table_id") int tableId, @RequestParam(name="fillOptions",defaultValue="0") int fillOptions) throws Exception
      Returns SMTable object for the specified tableId.
      Here fillOptions can be Integer values of either APIConstants.SMFillOptions.TABLE_INDEXES or APIConstants.SMFillOptions.TABLE_COLUMNS or APIConstants.SMFillOptions.TABLE_EXTENDED_PROPERTIES for example: If you want to get Indexes and it's Columns along with SMTable object, you need to pass the fillOptions parameter value as 3 (TABLE_INDEXES(1) + TABLE_COLUMNS(2)).
      Returns all the details pertaining to table such as tableName, tableDefinition, environmentName in which table is present etc... Specifying the tableId is mandatory in order to fetch the table details.
      Parameters:
      tableId - int
      fillOptions - APIConstants.SMFillOptions int
      Returns:
      Response - Table object.
      Throws:
      Exception
      Since:
      12.0
    • getTables

      @GetMapping(path="/tables", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getTables(@RequestParam(name="tableIds") String tableIds, @RequestParam(name="fillOptions",defaultValue="0") int fillOptions, @RequestParam(name="page",defaultValue="1") int page, @RequestParam(name="per_page",defaultValue="25") int per_page) throws Exception
      Returns the list of tables for the specified tableIds list. Specifying the tableIds list is mandatory in order to retrieve the tables.
      Note: Pagination is applied, and by default, 25 records are displayed per page.
      Parameters:
      tableIds - String
      fillOptions - APIConstants.SMFillOptions int
      page - The page number to retrieve (1-indexed).
      per_page - The number of records to display per page.
      Returns:
      Response - List of tables.
      Throws:
      Exception - sample for tableIds ==>1,2,3.
      Since:
      12.0
    • createColumns

      @PostMapping(path="/columns", consumes={"application/json","application/xml"}, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity createColumns(@RequestBody List<SMColumn> columns) throws Exception
      Creates the list of columns for the specified list of SMColumn objects. Specifying the column objects list is mandatory.
      In each column object, providing the details regarding the tableId and tableName is necessary, according to which the column gets created under that particular table.
      Parameters:
      columns - List of column objects
      Returns:
      Response
      Throws:
      Exception
      Since:
      12.1
    • createSystems

      @PostMapping(path="/systems", consumes={"application/json","application/xml"}, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity createSystems(@RequestBody List<SMSystem> systems) throws Exception
      Creates the list of systems for the specified list of SMSystem objects. Specifying the system objects list is mandatory.
      Each SMSystem object should contain all the details pertaining to system such as name, business purpose, DBMS platform, location etc...where in systemName is mandatory.
      Without specifying the systemName, method will fail to create a new system and it returns false.
      Parameters:
      systems - List
      Returns:
      Response
      Throws:
      Exception
      Since:
      12.1
    • createEnvironments

      @PostMapping(path="/environments", consumes={"application/json","application/xml"}, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity createEnvironments(@RequestBody List<SMEnvironment> environments) throws Exception
      Inserts a new system environment for the specified environment object. It creates the environment with the given details.
      Specifying the environmentName, databaseType is mandatory, depending on the databaseType other fields like driverName, userName, password, dbmsName, port, URL, IPAddress etc are mandatory.
      DatabaseOptions - If you want to add any database options to the environment, specify those in a string format with the comma separator. This is applicable to only RDBMS databases only.
      If the databaseType is fileType, then specification of driver name, port, URL etc... is not necessary.
      Parameters:
      environments - List
      Returns:
      Response
      Throws:
      Exception
      Since:
      12.1
    • createTables

      @PostMapping(path="/tables", consumes={"application/json","application/xml"}, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity createTables(@RequestBody List<SMTable> tables) throws Exception
      Inserts new tables for the specified SMTable objects list. Specifying the environmentId, tableName and tableType are mandatory in each table object to create the tables.
      Parameters:
      tables - List
      Returns:
      Response
      Throws:
      Exception
      Since:
      12.1
    • deleteColumns

      @DeleteMapping(path="/columns", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity deleteColumns(@RequestParam(name="columnIds") String columnIds) throws Exception
      Removes columns for the specified list of columnIds. Specifying the columnIds list is mandatory, based on which the columns gets deleted from the tables.
      If the columns are deleted all its associated data will also be deleted.
      Parameters:
      columnIds - String
      Returns:
      Response
      Throws:
      Exception - sample for columnIds ==>1,2,3.
      Since:
      12.1
    • deleteEnvironments

      @DeleteMapping(path="/environments", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity deleteEnvironments(@RequestParam(name="environmentIds") String environmentIds, @RequestParam(name="versionMode") APIConstants.VersionMode versionMode) throws Exception
      Deletes the environments with the specified list of environmentIds and versionMode. Specifying the environmentIds list is mandatory to delete a particular environments. If versionMode is not specified current version environments will be deleted.
      Version mode has values ALL_VERSIONS, CURRENT_VERSION.
      ALL_VERSIONS - Deletes all environments.
      CURRENT_VERSION - Deletes the present/current version.
      If the environments are deleted all its associated data will also be deleted.
      Parameters:
      environmentIds - String
      versionMode - String - APIConstants.VersionMode - Valid values are ALL_VERSIONS/CURRENT_VERSION .
      Returns:
      Response
      Throws:
      Exception - sample for environmentIds ==>1,2,3.
      Since:
      12.1
    • deleteSystems

      @DeleteMapping(path="/systems", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity deleteSystems(@RequestParam(name="systemIds") String systemIds) throws Exception
      Deletes the systems for the specified list of systemIds. It deletes the systems only if it does not contain any environments or documents associated with it.
      Specifying the systemIds list is mandatory
      Parameters:
      systemIds - String.
      Returns:
      Response
      Throws:
      Exception - sample for systemIds ==>1,2,3.
      Since:
      12.1
    • deleteTables

      @DeleteMapping(path="/tables", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity deleteTables(@RequestParam(name="tableIds") String tableIds) throws Exception
      Deletes the tables with the specified list of tableIds. Specifying the tableIds list is mandatory.
      If tables are deleted all its associated data will also be deleted.
      Parameters:
      tableIds - String .
      Returns:
      Response
      Throws:
      Exception - sample for tableIds ==>1,2,3.
      Since:
      12.1
    • getMetaData

      @PostMapping(path="/metadata", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getMetaData(@RequestBody String inputJson) throws Exception
      Returns the metadata information includes systemId, systemName, environmentId, environmentName, environemnetType, dataSourceType etc..as a JSONArray for the specified input values in the JSON object.
      The valid values in the input json object are SERVER, DATABASE, SCHEMA AND TABLENAME.
      Parameters:
      inputJson - String .
      Returns:
      Response
      Throws:
      Exception -

      Sample JSON :

      {
      "SERVER":"",
      "DATABASE":"",
      "SCHEMA":"",
      "TABLENAME":""
      }

      Since:
      12.1
    • scanIntoEnvironment

      @PostMapping(path="/environments/{environment_id}/scan", consumes={"application/json","application/xml"}, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity scanIntoEnvironment(@PathVariable(name="environment_id") int environmentId, @RequestParam(name="dbOperation",required=false) DBProperties.Operation dbOperation, @RequestBody DBHelper dBHelper) throws Exception
      Scan and save the environment meta data into the specified environmentId by specifying the dbHelper object and dbOperation in the form of JSON.
      The following properties in the dbHelper object are mandatory:

      databaseType - This defines the type of the database to be scanned and saved. For values reference at DBProperties.DatabaseType. Depending on this value, mandatory values will vary from one database to other.
      If the databaseType value retrieved from the dbHelper object is RDBMS database, then the environment is loaded and persisted into specified environment by specifying the dbUrl, dbDriver, dbUserName, dbPassword, dbName, dbSchema, databaseType, ipAddress, scanCriteria,readColumns, readComments, readTables, readViews, readSynonyms and selectedTables/selectedViews/selectedSynonyms etc.
      If the databaseType value retrieved from dbHelper object is file based database, then the environment is loaded and persisted into specified environment by specifying the filePath (i.e the location from which the file can be read), scanCriteria, readColumns, readComments, readTables, readViews, readSynonyms and selectedTables/selectedViews/selectedSynonyms etc.

      scanCriteria - This defines the selection criteria of objects(TABLES/VIEWS/SYNONYMS/COMPONENTS) to be saved into the specified environment. This takes either INCLUDE_SELECTION or EXCLUDE_SELECTION or ALL. For values reference at DBHelper.ScanCriteria).
      If the scanCriteria value is INCLUDE_SELECTION then the only selected objects are loaded and persisted or if the scanCriteria value is EXCLUDE_SELECTION then apart from selected objects, the rest of the objects from the database are loaded and persisted or if the scanCriteria value is ALL then all the objects in the database are loaded and persisted into specified environment. Here objects refers to TABLES/VIEWS/SYNONYMS/COMPONENTS. If the database contains nested tables, then need to specify the declarationPath for the nested tables.

      filePath - This property is mandatory when the databaseType is file based database.
      filePathType - The supported values for the filePathType are ABSOLUTE, RELATIVE.

      useReferenceId - This property in dbHelper is used only for ERWIN and CWM file based databases and it accepts boolean value true or false.

      modelType & readLogicalColumns - These properties from the dbHelper object are used for only ERWIN or ERWIN9 file based databases.
      modelType defines the order in which the tables are displayed and readLogicalColumns value defines whether to skip logical columns or not.
      The value of modelType value can be either PHYSICAL OR LOGICAL (For values reference at DBHelper.ModelType)). DBHelper.ModelType default value is PHYSICAL.
      The value of readLogicalColumns accepts boolean value true or false.

      dbOperation - DBProperties object specifies the operation modes in which the environment will be saved i.e., FRESH_UPLOAD, UPDATE_APPEND, APPEND and UPDATE_APPEND_INVALIDATE modes.(for values reference DBProperties.Operation).
      APPEND mode is used when environment is saved for the first time i.e add new option.
      UPDATE_APPEND mode is used when previously loaded environment is modified and few new tables are appended to the environment.
      FRESH_UPLOAD mode is used when the previously loaded environment tables are to be deleted and new tables will be inserted in to the environment.
      UPDATE_APPEND_INVALIDATE mode is used when previously loaded meta data is modified and few new tables needs to appended and few scanned tables need to be invalidated in the environment.

      Parameters:
      environmentId - int
      dbOperation - DBProperties.Operation DBProperties.Operation).
      dBHelper - DBHelper .
      Returns:
      Response
      Throws:
      Exception
      Since:
      12.1
    • updateColumns

      @PutMapping(path="/columns", consumes={"application/json","application/xml"}, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity updateColumns(@RequestBody List<SMColumn> columns, @RequestParam(name="useReferenceId",required=false) boolean useReferenceId) throws Exception
      Updates the list of columns for the specified list of SMColumn objects and useReferenceId. Specifying the tableId, columnId and columnName in each SMColumn object and useReferenceId are mandatory, which helps in updating all the details of the column specified.
      Parameters:
      columns - List
      useReferenceId - boolean .
      Returns:
      Response
      Throws:
      Exception
      Since:
      12.1
    • updateEnvironments

      @PutMapping(path="/environments", consumes={"application/json","application/xml"}, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity updateEnvironments(@RequestBody List<SMEnvironment> environments) throws Exception
      Updates the list of environments for the specified list of SMEnvironment objects.
      When updating the environment, databaseType can be changed from one type to other and depending on the database type the details has to be specified.
      DatabaseOptions - If you want to add any database options to the environment, specify those in a string format with the comma separator. This is applicable to only RDBMS databases only.
      If the databaseType of environment is ETL, then environment cannot be updated from one databaseType to another or vice versa
      Parameters:
      environments - List .
      Returns:
      Response
      Throws:
      Exception
      Since:
      12.1
    • updateSystems

      @PutMapping(path="/systems", consumes={"application/json","application/xml"}, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity updateSystems(@RequestBody List<SMSystem> systems) throws Exception
      Updates the list of systems for the specified list of SMSystem objects.i.e when provided with system details, this method updates the respective information of the system.
      Specifying systemId and systemName are mandatory. All the details of the system can be updated.
      Parameters:
      systems - List .
      Returns:
      Response
      Throws:
      Exception
      Since:
      12.1
    • updateTables

      @PutMapping(path="/tables", consumes={"application/json","application/xml"}, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity updateTables(@RequestBody List<SMTable> tables, @RequestParam(name="useReferenceId",required=false) boolean useReferenceId) throws Exception
      Updates the list of tables for the specified list of SMTable objects and useReferenceId. Specifying the SMTable object and useReferenceId are mandatory, useReferenceId value for ERWIN and CWM is true, whereas for other database types it is false.
      In each SMTable object specifying the environmentId, tableName and tableId are mandatory.
      Parameters:
      tables - List
      useReferenceId - boolean .
      Returns:
      Response
      Throws:
      Exception
      Since:
      12.1
    • versionEnvironment

      @PostMapping(path="/environments/{environment_id}/version", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity versionEnvironment(@PathVariable(name="environment_id") int environmentId, @RequestParam(name="changeDescription") String changeDescription, @RequestParam(name="versionLabel",required=false) String versionLabel) throws Exception
      Creates new version of the environment for the specified environmentId. Creates a copy of entire metadata in archived environments with new environment id and passive state, versionEnvironment will include extended properties, valid values, SDI fields and documents.
      Specifying the environmentId and changeDescription are mandatory,
      Parameters:
      environmentId - int
      changeDescription - String
      versionLabel - String .
      Returns:
      Response
      Throws:
      Exception
      Since:
      12.1
    • getSystemId

      @GetMapping(path="/systems/id", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getSystemId(@RequestParam(name="systemName") String systemName) throws Exception
      Returns the systemId for the specified systemName.
      Specifying the systemName is mandatory, based on the systemName, method will return the systemId.
      Parameters:
      systemName - String
      Returns:
      Response
      Throws:
      Exception
      Since:
      12.1
    • getEnvironmentId

      @GetMapping(path="/environments/id", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getEnvironmentId(@RequestParam(name="systemName") String systemName, @RequestParam(name="environmentName") String environmentName) throws Exception
      Returns the environmentId for the specified systemName and environmentName. Specifying the systemName and environmentName are mandatory, based on which method will return the environmentId.
      Parameters:
      systemName - String
      environmentName - String
      Returns:
      Response
      Throws:
      Exception
      Since:
      12.1
    • getTableId

      @GetMapping(path="/tables/id", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getTableId(@RequestParam(name="systemName") String systemName, @RequestParam(name="environmentName") String environmentName, @RequestParam(name="tableName") String tableName) throws Exception
      Returns the tableId for the specified systemName, environmentName and tableName.
      Specifying the systemName, environmentName and tableName are mandatory.
      Parameters:
      systemName - String
      environmentName - String
      tableName - String
      Returns:
      Response
      Throws:
      Exception
      Since:
      12.1
    • getColumnId

      @GetMapping(path="/columns/id", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getColumnId(@RequestParam(name="systemName") String systemName, @RequestParam(name="environmentName") String environmentName, @RequestParam(name="tableName") String tableName, @RequestParam(name="columnName") String columnName) throws Exception
      Returns the columnId for the specified environmentName, systemName, tableName and columnName.
      Specifying the environmentName, systemName, tableName and columnName are mandatory.
      Parameters:
      systemName - String
      environmentName - String
      tableName - String
      columnName - String
      Returns:
      Response
      Throws:
      Exception
      Since:
      12.1
    • getEnvironmentsBySystemId

      @GetMapping(path="/environments/system_id", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getEnvironmentsBySystemId(@RequestParam(name="systemId") int systemId, @RequestParam(name="page",defaultValue="1") int page, @RequestParam(name="per_page",defaultValue="25") int per_page) throws Exception
      Throws:
      Exception