public class SystemManagerUtil
extends BaseUtil
Resizable-array Implements all optional list operations.Each ArrayList instance has a capacity. The capacity is the size of the array used to store the elements in the list. It is always at least as large as the list size. Hash table based implementation provides all of the optional map operations.
RequestStatus as return type methods will result in being returned as either true or false as its status.
Constructor and Description |
---|
SystemManagerUtil(java.lang.String token) |
SystemManagerUtil(java.lang.String tokenType,
java.lang.String token) |
Modifier and Type | Method and Description |
---|---|
RequestStatus |
addDocument(int nodeId,
Node.NodeType nodeType,
Document document)
Document is added for the specified nodeId of nodeType.
|
RequestStatus |
addDocument(java.lang.String nodeName,
int parentNodeId,
Node.NodeType parentNodeType,
Document document)
Document is added for the specified nodeName, parentNodeId of parentNodeType.
|
java.lang.String |
addDocumentAs(int nodeId,
java.lang.String nodeType,
java.lang.String documentJsonObj,
java.lang.String outputFormat)
Document is added for the specified nodeId of nodeType.
|
java.lang.String |
addDocumentAs(java.lang.String nodeName,
int parentNodeId,
java.lang.String parentNodeType,
java.lang.String documentObjJson,
java.lang.String outputFormat)
Document is added for the specified nodeName, parentNodeId of parentNodeType.
|
RequestStatus |
addIndex(int columnId,
SMIndex index)
Inserts a new index for the specified columnId and the specified SMIndex
object should contain all the details pertaining to index such as index
name which is mandatory, type,owner etc..
|
RequestStatus |
addIndex(SMIndex index)
Inserts a new index for the specified SMIndex Object.
|
java.lang.String |
addIndexAs(int columnId,
java.lang.String jsonSMIndex,
java.lang.String outputFormat)
Inserts a new index for the specified columnId and the specified SMIndex
object should contain all the details pertaining to index such as index
name which is mandatory, type,owner etc..
|
java.lang.String |
addIndexAs(java.lang.String jsonSMIndex,
java.lang.String outputFormat)
Inserts a new index for the specified SMIndex Object.
|
RequestStatus |
addIndexes(int columnId,
java.util.List<SMIndex> indexes)
Inserts list of indexes for the specified columnId where in each SMIndex
object should contain index name.
|
RequestStatus |
addIndexes(java.util.List<SMIndex> indexes)
Inserts List of indexes for the specified SMIndex Objects.Each SMIndex
object should contain all the details pertaining to index such as index
name,type,owner etc...where index name is mandatory and SMIndex object
should also contain either column object or list of column objects to
which the index need to be added where in columnId is mandatory in each
column object.
|
java.lang.String |
addIndexesAs(int columnId,
java.lang.String jsonArraySMIndex,
java.lang.String outputFormat)
Inserts list of indexes for the specified columnId where in each SMIndex
object should contain index name.
|
java.lang.String |
addIndexesAs(java.lang.String jsonArraySMIndex,
java.lang.String outputFormat)
Inserts List of indexes for the specified SMIndex Objects.Each SMIndex
object should contain all the details pertaining to index such as index
name,type,owner etc...where index name is mandatory and SMIndex object
should also contain either column object or list of column objects to
which the index need to be added where in columnId is mandatory in each
column object.
|
RequestStatus |
assignCodeset(int columnId,
Codeset codeset)
Assigns the specified codeset to the specified columnId.
|
java.lang.String |
assignCodesetAs(int columnId,
java.lang.String jsonCodeset,
java.lang.String outputFormat)
Assigns the specified codeset to the specified columnId.
|
RequestStatus |
assignCodesets(int columnId,
java.util.List<Codeset> codesets)
Assigns the specified list of codesets to the specified columnId.
|
RequestStatus |
assignCodesets(int columnId,
java.util.List<java.lang.Integer> codeSetIds,
boolean unassignExisting)
Assigns codesets of specified codeset ids to the specified columnId.
|
java.lang.String |
assignCodesetsAs(int columnId,
java.lang.String jsonArrayCodeSetIds,
boolean unassignExisting,
java.lang.String outputFormat)
Assigns codesets of specified codeset ids to the specified columnId.
|
java.lang.String |
assignCodesetsAs(int columnId,
java.lang.String jsonArrayCodeset,
java.lang.String outputFormat)
Assigns the specified list of codesets to the specified columnId.
|
RequestStatus |
cloneEnvironment(int srcSystemId,
java.lang.String srcEnvironmentName,
int tgtSystemId,
java.lang.String tgtEnvironmentName)
Clone Environment creates another copy of the Environment.
|
RequestStatus |
cloneEnvironment(int environmentId,
java.lang.String tgtSystemName,
java.lang.String tgtEnvironmentName)
Clone Environment creates another copy of the Environment.
|
RequestStatus |
cloneEnvironment(java.lang.String srcSystemName,
java.lang.String srcEnvironmentName,
java.lang.String tgtSystemName,
java.lang.String tgtEnvironmentName)
Clone Environment creates another copy of the Environment.
|
java.lang.String |
cloneEnvironmentAs(int srcSystemId,
java.lang.String srcEnvironmentName,
int tgtSystemId,
java.lang.String tgtEnvironmentName,
java.lang.String outputFormat)
Clone Environment creates another copy of the Environment.
|
java.lang.String |
cloneEnvironmentAs(int environmentId,
java.lang.String tgtSystemName,
java.lang.String tgtEnvironmentName,
java.lang.String outputFormat)
Clone Environment creates another copy of the Environment.
|
java.lang.String |
cloneEnvironmentAs(java.lang.String srcSystemName,
java.lang.String srcEnvironmentName,
java.lang.String tgtSystemName,
java.lang.String tgtEnvironmentName,
java.lang.String outputFormat)
Clone Environment creates another copy of the Environment.
|
RequestStatus |
createColumn(SMColumn column)
Inserts Column for the specified SMColumn Object.
|
java.lang.String |
createColumnAs(java.lang.String smColumnObjJson,
java.lang.String outputFormat)
Inserts Column for the specified SMColumn Object.
|
RequestStatus |
createEnvironment(SMEnvironment environment)
Inserts a new System Environment for the specified environment object.It
creates the environment with the given details.
|
java.lang.String |
createEnvironmentAs(java.lang.String smEnvironmentObjJson,
java.lang.String outputFormat)
Inserts a new System Environment for the specified environment object in
JSON.It creates the environment with the given details.
|
RequestStatus |
createSystem(SMSystem system)
Inserts a new system for the specified SMSystem Object.SMSystem object
should contain all the details pertaining to system such as name,
business purpose, DBMS platform,location etc...where in systemName
are mandatory.
|
java.lang.String |
createSystemAs(java.lang.String smSystemObjJson,
java.lang.String outputFormat)
Inserts a new system for the specified SMSystem Object.Specifying
systemName is Mandatory.
|
RequestStatus |
createTable(SMTable table)
Inserts new Table for the specified SMTable Object.
|
java.lang.String |
createTableAs(java.lang.String smTableObjJson,
java.lang.String outputFormat)
Inserts new Table for the specified SMTable Object.
|
java.util.LinkedHashMap<java.lang.String,java.lang.Object> |
dataAssetsSearch(org.json.JSONObject configDetails) |
RequestStatus |
deleteColumn(int columnId)
Removes column for the specified columnId.
|
java.lang.String |
deleteColumnAs(int columnId,
java.lang.String outputFormat)
Removes column for the specified columnId.
|
RequestStatus |
deleteDocument(Node.NodeType nodeType,
int docId)
Deletes the Document for the specified docId of nodeType.
|
java.lang.String |
deleteDocumentAs(java.lang.String nodeType,
int docId,
java.lang.String outputFormat)
Deletes the Document for the specified docId of nodeType.
|
RequestStatus |
deleteDocuments(int nodeId,
Node.NodeType nodeType)
Deletes the documents of the specified nodeId of nodeType.
|
RequestStatus |
deleteDocuments(Node.NodeType nodeType,
java.util.List<java.lang.Integer> docIds)
Documents are deleted for the specified List of docIds of the given nodeType.
|
RequestStatus |
deleteDocuments(java.lang.String nodeName,
int parentNodeId,
Node.NodeType parentNodeType)
Documents are deleted for the specified nodeName, parentNodeId of parentNodeType.
|
java.lang.String |
deleteDocumentsAs(int nodeId,
java.lang.String nodeType,
java.lang.String outputFormat)
Deletes the documents of the specified nodeId of nodeType.
|
java.lang.String |
deleteDocumentsAs(java.lang.String nodeName,
int parentNodeId,
java.lang.String parentNodeType,
java.lang.String outputFormat)
Documents are deleted for the specified nodeName, parentNodeId of
parentNodeType.
|
java.lang.String |
deleteDocumentsAs(java.lang.String nodeType,
java.lang.String docIdsJsonArray,
java.lang.String outputFormat)
Documents are deleted for the specified List of docIds of the given
nodeType.
|
RequestStatus |
deleteEnvironment(int environmentId)
Removes System Environment for the specified environmentId.
|
java.lang.String |
deleteEnvironmentAs(int environmentId,
java.lang.String outputFormat)
Removes System Environment for the specified environmentId.
|
RequestStatus |
deleteEnvironmentDocuments(int environmentId)
Deletes the Environment Documents of the specified environmentId.
|
RequestStatus |
deleteEnvironmentDocuments(int systemId,
java.lang.String environmentName)
Deletes the Environment Documents of the specified environmentName and systemId.
|
java.lang.String |
deleteEnvironmentDocumentsAs(int environmentId,
java.lang.String outputFormat)
Deletes the Environment Documents of the specified environmentId.
|
java.lang.String |
deleteEnvironmentDocumentsAs(int systemId,
java.lang.String environmentName,
java.lang.String outputFormat)
Deletes the Environment Documents of the specified environmentName and
systemId.
|
RequestStatus |
deleteIndex(SMIndex index)
Removes index for the specified SMIndex object.
|
java.lang.String |
deleteIndexAs(java.lang.String jsonSMIndex,
java.lang.String outputFormat)
Removes index for the specified SMIndex object.
|
RequestStatus |
deleteIndexById(int indexId)
Removes SMIndex for the specified indexId.
|
java.lang.String |
deleteIndexByIdAs(int indexId,
java.lang.String outputFormat)
Removes SMIndex for the specified indexId.
|
RequestStatus |
deleteIndexes(java.util.List<SMIndex> indexes)
Removes indexes for the specified list of SMIndex objects.
|
RequestStatus |
deleteIndexes(Node.NodeType nodeType,
int nodeId)
Removes indexes for the specified nodeId of nodeType.
|
java.lang.String |
deleteIndexesAs(java.lang.String nodeType,
int nodeId,
java.lang.String outputFormat)
Removes indexes for the specified nodeId of nodeType.
|
java.lang.String |
deleteIndexesAs(java.lang.String jsonArraySMIndex,
java.lang.String outputFormat)
Removes indexes for the specified list of SMIndex objects.
|
RequestStatus |
deleteIndexesById(java.util.List<java.lang.Integer> indexIds)
Removes indexes for the specified list of index ids.
|
java.lang.String |
deleteIndexesByIdsAs(java.lang.String jsonArrayIndexId,
java.lang.String outputFormat)
Removes indexes for the specified list of index ids.
|
RequestStatus |
deleteSystem(int systemId)
Removes SMSystem for the specified systemId.It deletes the System only if
it does not contain any Environments or Documents associated with it.
|
java.lang.String |
deleteSystemAs(int systemId,
java.lang.String outputFormat)
Removes SMSystem for the specified systemId.It deletes the System only if
it does not contain any Environments or Documents associated with it.
|
RequestStatus |
deleteSystemDocuments(int systemId)
Deletes the systemDocuments for the specified systemId.
|
RequestStatus |
deleteSystemDocuments(java.lang.String systemName)
Deletes the System Documents for the specified systemName.
|
java.lang.String |
deleteSystemDocumentsAs(int systemId,
java.lang.String outputFormat)
Deletes the systemDocuments for the specified systemId.
|
java.lang.String |
deleteSystemDocumentsAs(java.lang.String systemName,
java.lang.String outputFormat)
Deletes the systemDocuments for the specified systemName.
|
RequestStatus |
deleteTable(int tableId)
Removes the table for the specified tableId.
|
java.lang.String |
deleteTableAs(int tableId,
java.lang.String outputFormat)
Removes the table for the specified tableId.
|
RequestStatus |
exportEnvironment(int environmentId,
APIConstants.FileExtension fileExtension)
Environment is exported to xml for the specified environmentId.
|
java.lang.String |
exportEnvironmentAs(int environmentId,
java.lang.String fileExtension,
java.lang.String outputFormat)
Environment is exported to xml for the specified environmentId.
|
java.util.List<Codeset> |
getAssignedCodesets(int columnId)
Returns the list of Codeset objects for the specified columnId where each
Codeset object contains codeset name,codeset description, codeset status
and category name in which Codeset is present etc...
|
java.util.List<Codeset> |
getAssignedCodesets(int columnId,
int fillOptions)
Returns the list of Codeset objects for the specified columnId.
|
java.lang.String |
getAssignedCodesetsAs(int columnId,
int fillOptions,
java.lang.String outputFormat)
Returns the list of Codeset objects for the specified columnId.
|
java.lang.String |
getAssignedCodesetsAs(int columnId,
java.lang.String outputFormat)
Returns the list of Codeset objects for the specified columnId where each
Codeset object contains codeset name,codeset description, codeset status
and category name in which Codeset is present etc...
|
SMColumn |
getColumn(int columnId)
Returns SMColumn object for the specified columnId.
|
SMColumn |
getColumn(int columnId,
int fillOptions)
Returns SMColumn object for the specified columnId.
|
SMColumn |
getColumn(int tableId,
java.lang.String columnName,
int fillOptions)
Returns SMColumn object for the specified columnName of a particular
table whose tableId also specified.
|
java.lang.String |
getColumnAs(int columnId,
int fillOptions,
java.lang.String outputFormat)
Returns SMColumn object for the specified columnId.
|
java.lang.String |
getColumnAs(int columnId,
java.lang.String outputFormat)
Returns SMColumn object as String in the specified outputFormat for the
specified columnId.
|
java.lang.String |
getColumnAs(int tableId,
java.lang.String columnName,
int fillOptions,
java.lang.String outputFormat)
Returns SMColumn object for the specified columnName of a particular
table whose tableId also specified.
|
java.lang.String |
getColumnAs(int tableId,
java.lang.String columnName,
java.lang.String outputFormat)
Returns SMColumn Object for the specified tableId and columnName.
|
SMColumn |
getColumnByTableId(int tableId,
java.lang.String columnName)
Returns SMColumn Object for the specified tableId and columnName.
|
int |
getColumnId(int tableId,
java.lang.String columnName)
Returns the columnId for the specified tableId and columnName.
|
int |
getColumnId(java.lang.String systemName,
java.lang.String environmentName,
java.lang.String tableName,
java.lang.String columnName)
Returns the columnId for the specified environmentName, systemName,
tableName and columnName.
|
java.lang.String |
getColumnIdAs(int tableId,
java.lang.String columnName,
java.lang.String outputFormat)
Returns the columnId as String in the specified outputFormat for the
specified tableId and columnName.
|
java.lang.String |
getColumnIdAs(java.lang.String systemName,
java.lang.String environmentName,
java.lang.String tableName,
java.lang.String columnName,
java.lang.String outputFormat)
Returns the columnId as String in the specified outputFormat for the
specified environmentName, systemName,tableName and columnName.
|
java.util.List<SMColumn> |
getColumns(int tableId)
Returns all the associated columns of the particular table as a list of
column objects , for which specifying the tableId is mandatory in order
to retrieve the columns.
|
java.util.List<SMColumn> |
getColumns(int tableId,
int fillOptions)
Returns all the associated columns of the particular table as a list of
column objects , for which specifying the tableId and fillOptions
parameters are mandatory in order to retrieve the columns.
|
java.lang.String |
getColumnsAs(int tableId,
int fillOptions,
java.lang.String outputFormat)
Returns all the associated columns of the particular table as a list of
column objects , for which specifying the tableId and fillOptions
parameters are mandatory in order to retrieve the columns.
|
java.lang.String |
getColumnsAs(int tableId,
java.lang.String outputFormat)
Returns the columns of the table as String for the specified tableId in
the specified outputFormat.
|
Document |
getDocument(Node.NodeType nodeType,
int docId)
Returns the Document object for the specified docId of nodeType.
|
java.lang.String |
getDocumentAs(java.lang.String nodeType,
int docId,
java.lang.String outputFormat)
Returns the Document object for the specified docId of nodeType.
|
java.util.ArrayList<Document> |
getDocuments(Node.NodeType nodeType,
java.util.List<java.lang.Integer> docIds)
Returns the List of Document object for the specified List of docId's of the nodeType.
|
java.lang.String |
getDocumentsAs(java.lang.String nodeType,
java.lang.String docIdsJsonArray,
java.lang.String outputFormat)
Returns the List of Document object for the specified List of docId's of
the nodeType.
|
SMEnvironment |
getEnvironment(int environmentId)
Returns SMEnvironment Object for the specified environmentId.Specifying
the environmentId is mandatory.
|
SMEnvironment |
getEnvironment(int environmentId,
boolean fillMetadata)
Returns SMEnvironment Object for the specified environmentId.Specifying
the environmentId is mandatory.
|
SMEnvironment |
getEnvironment(int environmentId,
boolean fillMetadata,
boolean useReferenceId)
Returns SMEnvironment Object for the specified environmentId.Specifying
the environmentId is mandatory.
|
java.lang.String |
getEnvironmentAs(int environmentId,
boolean fillMetadata,
boolean useReferenceId,
java.lang.String outputFormat)
Returns SMEnvironment Object for the specified environmentId.Specifying
the environmentId is mandatory.
|
java.lang.String |
getEnvironmentAs(int environmentId,
java.lang.String outputFormat)
Returns SMEnvironment Object for the specified environmentId in the
specified outputFormat.
|
java.lang.String |
getEnvironmentAs(int systemId,
java.lang.String environmentName,
java.lang.String outputFormat)
Returns SMEnvironment Object for the specified systemId and
environmentName in the specified outputFormat.
|
SMEnvironment |
getEnvironmentBySystemId(int systemId,
java.lang.String environmentName)
Returns SMEnvironment Object for the specified systemId and
environmentName.
|
DBProperties |
getEnvironmentConnectionProperties(SMEnvironment environment)
Returns DBProperties Object for the specified SMEnvironment object.
|
java.lang.String |
getEnvironmentConnectionPropertiesAs(java.lang.String smEnvironmentObjJson,
java.lang.String outputFormat)
Returns DBProperties Object for the specified SMEnvironment object in
JSON in the specified outputFormat.
|
java.util.ArrayList<Document> |
getEnvironmentDocuments(int environmentId)
Returns the List of Document objects for the specified environmentId.
|
java.lang.String |
getEnvironmentDocumentsAs(int environmentId,
java.lang.String outputFormat)
Returns the List of Document objects for the specified environmentId.
|
int |
getEnvironmentId(int systemId,
java.lang.String environmentName)
Returns the environmentId for the specified systemId and environmentName.
|
int |
getEnvironmentId(java.lang.String systemName,
java.lang.String environmentName)
Returns the environmentId for the specified systemName and
environmentName.
|
java.lang.String |
getEnvironmentIdAs(int systemId,
java.lang.String environmentName,
java.lang.String outputFormat)
Returns the environmentId for the specified systemId and environmentName
in the specified outputFormat.
|
java.lang.String |
getEnvironmentIdAs(java.lang.String systemName,
java.lang.String environmentName,
java.lang.String outputFormat)
Returns the environmentId for the specified systemName and
environmentName in the specific outputFormat.
|
java.util.ArrayList<SMEnvironment> |
getEnvironments(int systemId)
Returns the SMEnvironment Object List for the specified systemId.
|
java.lang.String |
getEnvironmentsAs(int systemId,
java.lang.String outputFormat)
Returns the SMEnvironment Object List for the specified systemId.
|
java.util.ArrayList<SMTable> |
getEnvironmentTables(int environmentId)
Returns the List of tables for the specified environmentId.
|
java.lang.String |
getEnvironmentTablesAs(int environmentId,
java.lang.String outputFormat)
Returns the List of tables for the specified environmentId.
|
SMIndex |
getIndex(int indexId)
Returns SMIndex Object for the specified indexId.
|
SMIndex |
getIndex(int indexId,
int fillOptions)
Returns SMIndex Object for the specified indexId.Specifying the indexId
is mandatory.
|
SMIndex |
getIndex(int tableId,
java.lang.String indexName)
Returns SMIndex Object for the specified tableId and indexName.
|
SMIndex |
getIndex(int tableId,
java.lang.String indexName,
int fillOptions)
Returns SMIndex Object for the specified tableId and indexName.
|
SMIndex |
getIndex(Node.NodeType nodeType,
int nodeId,
java.lang.String indexName)
Returns SMIndex object for the specified nodeId of nodeType and
indexName.
|
SMIndex |
getIndex(Node.NodeType nodeType,
int nodeId,
java.lang.String indexName,
int fillOptions)
Returns SMIndex object for the specified nodeId of nodeType and
indexName.
|
java.lang.String |
getIndexAs(int indexId,
int fillOptions,
java.lang.String outputFormat)
Returns SMIndex Object for the specified indexId in the specified
outputFormat.
|
java.lang.String |
getIndexAs(int tableId,
java.lang.String indexName,
int fillOptions,
java.lang.String outputFormat)
Returns SMIndex Object for the specified tableId and indexName.Specifying
the tableId and indexName are mandatory.
|
java.lang.String |
getIndexAs(java.lang.String nodeType,
int nodeId,
java.lang.String indexName,
int fillOptions,
java.lang.String outputFormat)
Returns SMIndex object for the specified nodeId of nodeType and
indexName.
|
java.util.List<SMColumn> |
getIndexColumns(int tableId,
java.lang.String indexName,
int fillOptions)
Returns List of SMColumn objects for the specified tableId of which
columns have the specified indexName as index where each column object
contains details like column name,column datatype,column length and
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 . |
java.lang.String |
getIndexColumnsAs(int tableId,
java.lang.String indexName,
int fillOptions,
java.lang.String outputFormat)
Returns List of SMColumn objects for the specified tableId of which
columns have the specified indexName as index where each column object
contains details like column name,column datatype,column length and
column precision etc..
|
java.util.List<SMIndex> |
getIndexes(int tableId)
Returns list of SMIndex Objects for the specified tableId.
|
java.util.List<SMIndex> |
getIndexes(int tableId,
int fillOptions)
Returns list of SMIndex Objects for the specified tableId.
|
java.util.List<SMIndex> |
getIndexes(Node.NodeType nodeType,
int nodeId)
Returns the list of SMIndex objects for the specified nodeId of nodeType.
|
java.util.List<SMIndex> |
getIndexes(Node.NodeType nodeType,
int nodeId,
int fillOptions)
Returns the list of SMIndex objects for the specified nodeId of nodeType.
|
java.lang.String |
getIndexesAs(int tableId,
int fillOptions,
java.lang.String outputFormat)
Returns list of SMIndex Objects for the specified tableId.
|
java.lang.String |
getIndexesAs(java.lang.String nodeType,
int nodeId,
int fillOptions,
java.lang.String outputFormat)
Returns the list of SMIndex objects for the specified nodeId of nodeType.
|
SMSystem |
getSystem(int systemId)
Returns SMSystem Object for the specified systemId.
|
SMSystem |
getSystem(java.lang.String systemName)
Returns SMSystem Object for the specified systemName.Specifying the
systemName is mandatory.
|
java.lang.String |
getSystemAs(int systemId,
java.lang.String outputFormat)
Returns SMSystem Object for the specified systemId in the specified
outputFormat.
|
java.lang.String |
getSystemAs(java.lang.String systemName,
java.lang.String outputFormat)
Returns SMSystem Object for the specified systemName in the specified
outputFormat.
|
java.util.ArrayList<Document> |
getSystemDocuments(int systemId)
Returns the list of systemDocuments for the specified systemId.
|
java.lang.String |
getSystemDocumentsAs(int systemId,
java.lang.String outputFormat)
Returns the list of systemDocuments for the specified systemId in the
specified outputFormat.
|
int |
getSystemId(java.lang.String systemName)
Returns the systemId for the specified systemName.
|
java.lang.String |
getSystemIdAs(java.lang.String systemName,
java.lang.String outputFormat)
Returns the systemId for the specified systemName.
|
java.util.ArrayList<SMSystem> |
getSystems()
Returns the List of SMSystems along with all the details regarding each
system.
|
java.lang.String |
getSystemsAs(java.lang.String outputFormat)
Returns the List of SMSystems along with the details of each in the
specified outputFormat.
|
SMTable |
getTable(int tableId)
Returns SMTable object for the specified tableId.
|
SMTable |
getTable(int tableId,
int fillOptions)
Returns SMTable object for the specified tableId with fillOptions.
|
java.lang.String |
getTableAs(int tableId,
int fillOptions,
java.lang.String outputFormat)
Returns SMTable object for the specified tableId with fillOptions.
|
java.lang.String |
getTableAs(int tableId,
java.lang.String outputFormat)
Returns String of SMTable object in JSON format for the specified
tableId.
|
java.lang.String |
getTableAs(int environmentId,
java.lang.String tableName,
java.lang.String outputFormat)
Returns String of SMTable object in specified outputFormat for the
specified environmentId and tableName.
|
SMTable |
getTableByEnvironmentId(int environmentId,
java.lang.String tableName)
Returns SMTable object for the specified environmentId and tableName.
|
java.util.ArrayList<SMColumn> |
getTableColumns(int tableId)
Deprecated.
since 8.2.1
|
java.lang.String |
getTableColumnsAs(int tableId,
java.lang.String outputFormat)
Deprecated.
since 8.2.1 - instead of this use
getColumnsAs(int, java.lang.String) |
int |
getTableId(int environmentId,
java.lang.String tableName)
Returns the tableId for the specified environmentId and tableName.
|
int |
getTableId(java.lang.String systemName,
java.lang.String environmentName,
java.lang.String tableName)
Returns the tableId for the specified systemName, environmentName and
tableName.
|
java.lang.String |
getTableIdAs(int environmentId,
java.lang.String tableName,
java.lang.String outputFormat)
Returns the tableId as String for the specified environmentId and
tableName in the specific outputFormat.
|
java.lang.String |
getTableIdAs(java.lang.String systemName,
java.lang.String environmentName,
java.lang.String tableName,
java.lang.String outputFormat)
Returns the tableId as String for the specified systemName,
environmentName and tableName in the specific outputFormat.
|
java.util.List<CodeValue> |
getValidValues(int columnId)
Returns the List of CodeValue objects for the specified columnId where
each CodeValue object contains code name,code value,code description and
codeset name in which codeValue is present etc....
|
java.util.List<CodeValue> |
getValidValues(int columnId,
int fillOptions)
Returns the List of CodeValue objects for the specified columnId.
|
java.lang.String |
getValidValuesAs(int columnId,
int fillOptions,
java.lang.String outputFormat)
Returns the List of CodeValue objects for the specified columnId.
|
java.lang.String |
getValidValuesAs(int columnId,
java.lang.String outputFormat)
Returns the List of CodeValue objects for the specified columnId where
each CodeValue object contains code name,code value,code description and
codeset name in which codeValue is present etc....
|
RequestStatus |
importEnvironment(int environmentId,
DBHelper dbHelper,
DBProperties.Operation dbOperation,
APIConstants.FileExtension fileExtension)
Imports the environment on the specified environmentId.
|
java.lang.String |
importEnvironmentAs(int environmentId,
java.lang.String dbHelperObjJson,
java.lang.String dbOperation,
java.lang.String fileExtension,
java.lang.String outputFormat)
Imports the environment on the specified environmentId.
|
java.util.List<SMEnvironment> |
loadDataAssets(int systemId,
java.lang.String visible,
boolean fillExtendedProperties,
boolean isHTML) |
DBEnvironment |
loadEnvironment(int systemId,
java.lang.String environmentName,
boolean useRefrenceId)
Loads the Environment for the specified systemId, environmentName and
useReferenceId.
|
java.lang.String |
loadEnvironmentAs(int systemId,
java.lang.String environmentName,
boolean useRefrenceId,
java.lang.String outputFormat)
Loads the Environment for the specified systemId, environmentName and
useReferenceId.
|
org.json.JSONObject |
loadNewDataAssetCofig(int systemId,
boolean isHTML,
java.lang.String visibility) |
RequestStatus |
publishColumn(int columnId)
Column is published for the specified columnId.
|
java.lang.String |
publishColumnAs(int columnId,
java.lang.String outputFormat)
Column is published for the specified columnId.
|
RequestStatus |
publishColumns(java.util.List<java.lang.Integer> columnIds)
Columns are published for the specified columnIds, specifying the list of
columnIds are mandatory.
|
java.lang.String |
publishColumnsAs(java.lang.String columnIdsJsonArray,
java.lang.String outputFormat)
Columns are published for the specified columnIds, specifying the list of
columnIds are mandatory.
|
RequestStatus |
publishEnvironments(java.util.List<java.lang.Integer> environmentIds)
Environments are published for the specified environmentIds, specifying
the list of environmentIds are mandatory.
|
RequestStatus |
publishNode(Node.NodeType nodeType,
int nodeId)
Node is published for the specified nodeId.
|
java.lang.String |
publishNodeAs(java.lang.String nodeType,
int nodeId,
java.lang.String outputFormat)
Node is published for the specified nodeId.
|
RequestStatus |
publishNodes(Node.NodeType nodeType,
java.util.List<java.lang.Integer> nodeIds)
Nodes are published for the specified nodeIds.
|
java.lang.String |
publishNodesAs(java.lang.String nodeType,
java.lang.String nodeIdsJsonArray,
java.lang.String outputFormat)
Nodes are published for the specified nodeIds.
|
RequestStatus |
publishTable(int tableId)
Table is published for the specified tableId.
|
java.lang.String |
publishTableAs(int tableId,
java.lang.String outputFormat)
Table is published for the specified tableId.
|
RequestStatus |
publishTables(java.util.List<java.lang.Integer> tableIds)
Tables are published for the specified tableIds, specifying the list of
tableIds are mandatory.
|
java.lang.String |
publishTablesAs(java.lang.String tableIdsJsonArray,
java.lang.String outputFormat)
Tables are published for the specified tableIds, specifying the list of tableIds are mandatory.
|
RequestStatus |
saveEnvironment(DBEnvironment dbEnvironment,
DBProperties.Operation operation,
boolean useReferenceId)
Deprecated.
since 9.0
|
java.lang.String |
saveEnvironmentAs(java.lang.String dbEnvironmentObjJson,
java.lang.String operation,
boolean useReferenceId,
java.lang.String outputFormat)
Deprecated.
since 9.0
|
RequestStatus |
saveNewDataAsset(int systemId,
org.json.JSONObject datasetDetails) |
DBEnvironment |
scanEnvironment(DBHelper dbHelper)
Loads an Environment for the specified dbHelper Object.
|
java.lang.String |
scanEnvironmentAs(java.lang.String dbHelperObjJson,
java.lang.String outputFormat)
Loads an Environment for the specified dbHelper Object.
|
RequestStatus |
scanIntoEnvironment(int environmentId,
DBHelper dbHelper,
DBProperties.Operation dbOperation)
Scan and save the environment meta data into the specified environmentId
by specifying the dbOperation and dbHelper object.
|
java.lang.String |
scanIntoEnvironmentAs(int environmentId,
java.lang.String dbHelperJson,
java.lang.String dbOperation,
java.lang.String outputFormat)
Scan and save the environment meta data into the specified environmentId
by specifying the dbOperation and dbHelper object in the form of json.
|
RequestStatus |
unassignExistingCodesets(Node.NodeType nodeType,
int nodeId)
Unassigns Existing Codesets for the specified nodeId of nodeType.
|
java.lang.String |
unassignExistingCodesetsAs(java.lang.String nodeType,
int nodeId,
java.lang.String outputFormat)
Unassigns ExistingCodesets for the specified nodeId of nodeType.
|
RequestStatus |
updateColumn(SMColumn column,
boolean useReferenceId)
Updates the Column for the specified SMColumn Object and useReferenceId.
|
java.lang.String |
updateColumnAs(java.lang.String smColumnObjJson,
boolean useReferenceId,
java.lang.String outputFormat)
Updates the Column for the specified SMColumn Object in Json and
useReferenceId.
|
RequestStatus |
updateDataAsset(int systemId,
int environmentId,
org.json.JSONObject datasetDetails) |
RequestStatus |
updateDocument(Node.NodeType nodeType,
Document document)
Document is updated as specified in Document Object of the given nodeType.
|
java.lang.String |
updateDocumentAs(java.lang.String nodeType,
java.lang.String documentObjJson,
java.lang.String outputFormat)
Document is updated as specified as Document Object of the given
nodeType.
|
RequestStatus |
updateEnvironment(SMEnvironment environment)
Updates a System Environment for the specified SMEnvironment object,
where all the environment details can be updated.
|
java.lang.String |
updateEnvironmentAs(java.lang.String smEnvironmentObjJson,
java.lang.String outputFormat)
Updates a System Environment for the specified SMEnvironment object in
JSON, where all the environment details can be updated except for the
environmentName.
|
RequestStatus |
updateEnvironmentMetadata(DBEnvironment dbEnvironment,
DBProperties.Operation operation,
boolean useReferenceId)
Saves the environment for the specified DBEnvironment Object,
DBProperties and useReferenceId.
|
java.lang.String |
updateEnvironmentMetadataAs(java.lang.String dbEnvironmentObjJson,
java.lang.String operation,
boolean useReferenceId,
java.lang.String outputFormat)
Saves the environment for the specified DBEnvironment Object,
DBProperties and useReferenceId.
|
RequestStatus |
updateIndex(SMIndex index)
Updates the index for the specified SMIndex object.
|
java.lang.String |
updateIndexAs(java.lang.String jsonSMIndex,
java.lang.String outputFormat)
Updates the index for the specified SMIndex object.
|
RequestStatus |
updateIndexes(java.util.List<SMIndex> indexes)
Updates the List of indexes for the specified SMIndex Objects.
|
java.lang.String |
updateIndexesAs(java.lang.String jsonArraySMIndex,
java.lang.String outputFormat)
Updates the List of indexes for the specified SMIndex Objects.
|
RequestStatus |
updateSystem(SMSystem system)
Updates the system for the specified SMSystem object.i.e when provided
with system details, this method updates the respective information of
the system.
|
java.lang.String |
updateSystemAs(java.lang.String smSystemObjJson,
java.lang.String outputFormat)
Updates the system for the specified SMSystem object.i.e when provided
with system details, this method updates the respective information of
the system.
|
RequestStatus |
updateTable(SMTable table,
boolean useReferenceId)
Updates Table for the specified SMTable Object and useReferenceId.
|
java.lang.String |
updateTableAs(java.lang.String smTableObjJson,
boolean useReferenceId,
java.lang.String outputFormat)
Updates Table for the specified SMTable Object and useReferenceId.
|
RequestStatus |
versionEnvironment(int environmentId,
java.lang.String changeDescription,
java.lang.String versionLabel)
Versions the environment for the specified environmentId.
|
java.lang.String |
versionEnvironmentAs(int environmentId,
java.lang.String changeDescription,
java.lang.String versionLabel,
java.lang.String outputFormat)
Versions the environment for the specified environmentId.
|
public SystemManagerUtil(java.lang.String token)
public SystemManagerUtil(java.lang.String tokenType, java.lang.String token)
public RequestStatus createSystem(SMSystem system)
system
- SMSystemobjectpublic java.util.ArrayList<SMSystem> getSystems() throws java.lang.Exception
java.lang.Exception
public SMSystem getSystem(java.lang.String systemName) throws java.lang.Exception
systemName
- Stringjava.lang.Exception
public SMSystem getSystem(int systemId) throws java.lang.Exception
systemId
- intjava.lang.Exception
public int getSystemId(java.lang.String systemName) throws java.lang.Exception
systemName
- Stringjava.lang.Exception
public java.util.ArrayList<Document> getSystemDocuments(int systemId) throws java.lang.Exception
systemId
- intjava.lang.Exception
public RequestStatus updateSystem(SMSystem system)
system
- SMSystemobjectpublic RequestStatus deleteSystem(int systemId)
systemId
- intpublic RequestStatus createEnvironment(SMEnvironment environment) throws java.lang.Exception
environment
- SMEnvironmentobjectjava.lang.Exception
public java.util.ArrayList<SMEnvironment> getEnvironments(int systemId) throws java.lang.Exception
systemId
- intjava.lang.Exception
public SMEnvironment getEnvironment(int environmentId) throws java.lang.Exception
environmentId
- intjava.lang.Exception
public SMEnvironment getEnvironmentBySystemId(int systemId, java.lang.String environmentName) throws java.lang.Exception
systemId
- intenvironmentName
- Stringjava.lang.Exception
public DBProperties getEnvironmentConnectionProperties(SMEnvironment environment) throws java.lang.Exception
environment
- SMEnvironmentobjectjava.lang.Exception
public int getEnvironmentId(int systemId, java.lang.String environmentName) throws java.lang.Exception
systemId
- intenvironmentName
- StringDaoException
java.lang.Exception
public int getEnvironmentId(java.lang.String systemName, java.lang.String environmentName) throws java.lang.Exception
systemName
- StringenvironmentName
- Stringjava.lang.Exception
public RequestStatus updateEnvironment(SMEnvironment environment)
environment
- SMEnvironmentobjectpublic RequestStatus deleteEnvironment(int environmentId)
environmentId
- intpublic RequestStatus createTable(SMTable table)
table
- SMTablepublic SMTable getTable(int tableId) throws java.lang.Exception
tableId
- intDaoException
java.lang.Exception
public SMTable getTableByEnvironmentId(int environmentId, java.lang.String tableName) throws java.lang.Exception
environmentId
- inttableName
- StringDaoException
java.lang.Exception
public int getTableId(int environmentId, java.lang.String tableName) throws java.lang.Exception
environmentId
- inttableName
- StringDaoException
java.lang.Exception
public int getTableId(java.lang.String systemName, java.lang.String environmentName, java.lang.String tableName) throws java.lang.Exception
systemName
- StringenvironmentName
- StringtableName
- StringDaoException
java.lang.Exception
public java.util.ArrayList<SMTable> getEnvironmentTables(int environmentId) throws java.lang.Exception
environmentId
- intDaoException
java.lang.Exception
public RequestStatus updateTable(SMTable table, boolean useReferenceId)
table
- SMTableuseReferenceId
- booleanpublic RequestStatus deleteTable(int tableId)
tableId
- intpublic RequestStatus createColumn(SMColumn column)
column
- SMColumnpublic SMColumn getColumn(int columnId) throws java.lang.Exception
columnId
- intDaoException
java.lang.Exception
public SMColumn getColumnByTableId(int tableId, java.lang.String columnName) throws java.lang.Exception
tableId
- intcolumnName
- StringDaoException
java.lang.Exception
public int getColumnId(int tableId, java.lang.String columnName) throws java.lang.Exception
tableId
- intcolumnName
- Stringjava.lang.Exception
public int getColumnId(java.lang.String systemName, java.lang.String environmentName, java.lang.String tableName, java.lang.String columnName) throws java.lang.Exception
systemName
- StringenvironmentName
- StringtableName
- StringcolumnName
- Stringjava.lang.Exception
public java.util.ArrayList<SMColumn> getTableColumns(int tableId) throws java.lang.Exception
tableId
- intjava.lang.Exception
public RequestStatus updateColumn(SMColumn column, boolean useReferenceId)
column
- SMColumnuseReferenceId
- booleanpublic RequestStatus deleteColumn(int columnId)
columnId
- intpublic DBEnvironment loadEnvironment(int systemId, java.lang.String environmentName, boolean useRefrenceId) throws java.lang.Exception
If the useReferenceId is true, the environment is loaded based on checking the table reference id which is set to the tables in the specific environment. If the value is false, the environment gets loaded with out checking the table referenceId which is set to the tables.
systemId
- intenvironmentName
- StringuseRefrenceId
- booleanjava.lang.Exception
public DBEnvironment scanEnvironment(DBHelper dbHelper) throws java.lang.Exception
DBProperties.DatabaseType
. Depending on this value,
mandatory values will vary from one database to other.
scanCriteria - This defines the selection criteria of
objects(TABLES/VIEWS/SYNONYMS) 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 or if the scanCriteria value is EXCLUDE_SELECTION then
apart from selected objects, the rest of the objects from the database
are loaded or if the scanCriteria value is ALL then all the objects in
the database are loaded into environment. Here objects refers to
TABLES/VIEWS/SYNONYMS.
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.
erwinModelType & readLogicalColumns - These properties from the dbHelper
object are used for only ERWIN or ERWIN9 file based databases.
erwinModelType defines the order in which the tables are displayed and
readLogicalColumns value defines whether to skip logical columns or not.
The value of erwinModelType value can be either PHYSICAL OR LOGICAL (For
values reference at com.ads.mm.xml.erwin.ERWinBase.ModelType
)).
ERWinBase.ModelType's default value is PHYSICAL.
The value of readLogicalColumns accepts boolean value true or false.
If environment is loaded successfully, DBEnvironment object will be
returned.
Sample input script for this:
function execute()
{
var dbHelper = new DBHelper();
dbHelper.setDbUrl("jdbc:sqlserver://hostname:1433;databaseName=dbname");
dbHelper.setDbDriver("com.microsoft.sqlserver.jdbc.SQLServerDriver");
dbHelper.setDbUserName("username");
dbHelper.setDbPassword("***");
dbHelper.setDbName("dnname");
dbHelper.setDbSchema("schemaname");
dbHelper.setDatabaseType(DBProperties.DatabaseType.SQLSERVER);
dbHelper.setReadColumns(true);
dbHelper.setReadComments(false);
dbHelper.setReadTables(true);
dbHelper.setReadViews(false);
dbHelper.setReadSynonyms(false);
dbHelper.setIpAddress("hostname");
dbHelper.setFilePath(""); //For filebased databases
dbHelper.setFilePathType(APIConstants.FilePathType.RELATIVE); //For filebased databases
dbHelper.setERwinModelType(ERWinBase.ModelType.PHYSICAL); //For erwin database
dbHelper.setReadLogicalColumns(false);
dbHelper.setScanCriteria(DBHelper.ScanCriteria.INCLUDE_SELECTION);
var selectedTablesMap = new HashMap();
var selList = new ArrayList();
selList.add("ADS_FORM");
selectedTablesMap.put("dbo",selList);
dbHelper.setSelectedTables(selectedTablesMap);
var dBEnvironment = smutil.scanEnvironment(dbHelper);
return dBEnvironment;
}
dbHelper
- DBHelperjava.lang.Exception
public RequestStatus saveEnvironment(DBEnvironment dbEnvironment, DBProperties.Operation operation, boolean useReferenceId)
DBEnvironment Object specifies the options update, insert, validate,
invalidate and skip depending on the databaseType including which it
gives the table count,views count and synonyms count.
DBProperties Object specifies the operation modes in which the
environment will be saved i.e fresh upload, update append and append
modes.
Simple append mode is used when environment is save 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.
useReferenceId value is set to true or false depending on the databaseType in which the environment is saved. If environment is saved successfully, RequestStatus.isRequestSuccess() will return true otherwise false.
dbEnvironment
- DBEnvironmentoperation
- DBPropertiesuseReferenceId
- booleanpublic java.lang.String createSystemAs(java.lang.String smSystemObjJson, java.lang.String outputFormat)
smSystemObjJson
- JSON StringoutputFormat
- String - Valid values: JSON or XML
Sample 'smSystemObjJson' JSON :
{
"systemName": "",
"systemPrimaryMoveType": "",
"systemDescriptionLong": "",
"fileManagmentSystemType": "",
"serverPlatform": "",
"systemOwnerEmail": "",
"specialInsructionsComments": "",
"esbQManagerName": "",
"endOfDayDefinition": "",
"serverOSVersion": "",
"totalDBSizeInGB": "",
"dbmsPlatform": "",
"dailyBatchExtractWindow": "",
"dbmsVersion": ""
}
public java.lang.String getSystemsAs(java.lang.String outputFormat)
outputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getSystemAs(java.lang.String systemName, java.lang.String outputFormat)
systemName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getSystemAs(int systemId, java.lang.String outputFormat)
systemId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getSystemDocumentsAs(int systemId, java.lang.String outputFormat)
systemId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getSystemIdAs(java.lang.String systemName, java.lang.String outputFormat)
systemName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String updateSystemAs(java.lang.String smSystemObjJson, java.lang.String outputFormat)
smSystemObjJson
- JSONoutputFormat
- String - Valid values: JSON or XML
Sample 'smSystemObjJson' JSON :
{
"systemName": "",
"systemId":0,
"systemPrimaryMoveType": "",
"systemDescriptionLong": "",
"fileManagmentSystemType": "",
"serverPlatform": "",
"systemOwnerEmail": "",
"specialInsructionsComments": "",
"esbQManagerName": "",
"endOfDayDefinition": "",
"serverOSVersion": "",
"totalDBSizeInGB": "",
"dbmsPlatform": "",
"dailyBatchExtractWindow": "",
"dbmsVersion": ""
}
public java.lang.String deleteSystemAs(int systemId, java.lang.String outputFormat)
systemId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String createEnvironmentAs(java.lang.String smEnvironmentObjJson, java.lang.String outputFormat)
smEnvironmentObjJson
- in JSON formatoutputFormat
- String - Valid values: JSON or XML
Sample 'smEnvironmentObjJson' JSON :
{
"displayViewsInScan": false,
"databaseOptions": null,
"databaseName": "",
"productionSystemName": "",
"workflowStatus": "",
"maximumNoOfConnectionsPerPartition": 5,
"passwordEncrypted": true,
"systemEnvironmentType": "",
"sapClient": "000",
"modelFileName": null,
"databasePoolType": null,
"extendedProperties": null,
"tables": [],
"systemName": "",
"environmentNotes": "",
"draft": 0,
"kerberosPrincipal": null,
"sshPort": 0,
"intendedUseDescription": "",
"rowDelimiter": "\\n",
"visibility": 1,
"productionSystemId": "1",
"noOfPartitions": 2,
"version": "1.00",
"dataFileName": null,
"dataStewardName": "",
"dataProfileScoreId": 0,
"serverPlatform": "",
"versionLabel": "",
"fileManagementSystemType": "",
"schemas": [],
"databaseInstanceSchema": "",
"systemEnvironmentName": "",
"databasePort": "",
"lastLoadingTime": 1554716759883,
"status": "",
"environmentType": "",
"databaseIPAddress": "",
"fieldDelimiter": ",",
"dataStewardChecked": false,
"databaseUserName": "",
"databaseDomain": "",
"environmentId": 0,
"sapScanTables": "",
"systemNumber": "00",
"dataFile": null,
"databaseURL": "",
"systemId": 0,
"sapDestination": null,
"changeDescription": "",
"dataProfileScore": null,
"modelFile": "",
"fileLocation": "",
"productionEnvironmentName": "",
"specialApprovalContvyInstructions": "",
"userId": "",
"displayTablesInScan": true,
"displaySynonymsInScan": false,
"databaseType": "SqlServer",
"minimumNoOfConnectionsPerPartition": 3,
"serverOSVersion": "",
"databasePassword": "",
"databaseDriver": "",
"authenticationType": null,
"systemEnvironmentId": 0
}
public java.lang.String getEnvironmentsAs(int systemId, java.lang.String outputFormat)
systemId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getEnvironmentAs(int environmentId, java.lang.String outputFormat)
environmentId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getEnvironmentAs(int systemId, java.lang.String environmentName, java.lang.String outputFormat)
systemId
- intenvironmentName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getEnvironmentConnectionPropertiesAs(java.lang.String smEnvironmentObjJson, java.lang.String outputFormat)
smEnvironmentObjJson
- JSONoutputFormat
- String - Valid values: JSON or XML
Sample 'smEnvironmentObjJson' JSON :
{
"displayViewsInScan": false,
"databaseOptions": null,
"databaseName": "",
"productionSystemName": "",
"workflowStatus": "",
"maximumNoOfConnectionsPerPartition": 5,
"passwordEncrypted": true,
"systemEnvironmentType": "",
"sapClient": "000",
"modelFileName": null,
"databasePoolType": null,
"extendedProperties": null,
"tables": [],
"systemName": "",
"environmentNotes": "",
"draft": 0,
"kerberosPrincipal": null,
"sshPort": 0,
"intendedUseDescription": "",
"rowDelimiter": "\\n",
"visibility": 1,
"productionSystemId": "",
"noOfPartitions": 2,
"version": "1.00",
"dataFileName": null,
"dataStewardName": "",
"dataProfileScoreId": 0,
"serverPlatform": "",
"versionLabel": "",
"fileManagementSystemType": "",
"schemas": [],
"databaseInstanceSchema": "",
"systemEnvironmentName": "",
"databasePort": "",
"lastLoadingTime": 1554716759883,
"status": "",
"environmentType": "",
"databaseIPAddress": "",
"fieldDelimiter": ",",
"dataStewardChecked": false,
"databaseUserName": "",
"databaseDomain": "",
"environmentId": 0,
"sapScanTables": "",
"systemNumber": "00",
"dataFile": null,
"databaseURL": "",
"systemId": 0,
"sapDestination": null,
"changeDescription": "",
"dataProfileScore": null,
"modelFile": "",
"fileLocation": "",
"productionEnvironmentName": "",
"specialApprovalContvyInstructions": "",
"userId": "",
"displayTablesInScan": true,
"displaySynonymsInScan": false,
"databaseType": "SqlServer",
"minimumNoOfConnectionsPerPartition": 3,
"serverOSVersion": "",
"databasePassword": "",
"databaseDriver": "",
"authenticationType": null,
"systemEnvironmentId": 0
}
public java.lang.String getEnvironmentIdAs(int systemId, java.lang.String environmentName, java.lang.String outputFormat)
systemId
- intenvironmentName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getEnvironmentIdAs(java.lang.String systemName, java.lang.String environmentName, java.lang.String outputFormat)
systemName
- StringenvironmentName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String updateEnvironmentAs(java.lang.String smEnvironmentObjJson, java.lang.String outputFormat)
smEnvironmentObjJson
- in JSON formatoutputFormat
- String - Valid values: JSON or XML
Sample 'smEnvironmentObjJson' JSON :
{
"displayViewsInScan": false,
"databaseOptions": null,
"databaseName": "",
"productionSystemName": "",
"workflowStatus": "",
"maximumNoOfConnectionsPerPartition": 5,
"passwordEncrypted": true,
"systemEnvironmentType": "",
"sapClient": "000",
"modelFileName": null,
"databasePoolType": null,
"extendedProperties": null,
"tables": [],
"systemName": "",
"environmentNotes": "",
"draft": 0,
"kerberosPrincipal": null,
"sshPort": 0,
"intendedUseDescription": "",
"rowDelimiter": "\\n",
"visibility": 1,
"productionSystemId": "",
"noOfPartitions": 2,
"version": "1.00",
"dataFileName": null,
"dataStewardName": "",
"dataProfileScoreId": 0,
"serverPlatform": "",
"versionLabel": "",
"fileManagementSystemType": "",
"schemas": [],
"databaseInstanceSchema": "",
"systemEnvironmentName": "",
"databasePort": "",
"lastLoadingTime": 1554716759883,
"status": "",
"environmentType": "",
"databaseIPAddress": "",
"fieldDelimiter": ",",
"dataStewardChecked": false,
"databaseUserName": "",
"databaseDomain": "",
"environmentId": 0,
"sapScanTables": "",
"systemNumber": "00",
"dataFile": null,
"databaseURL": "",
"systemId": 0,
"sapDestination": null,
"changeDescription": "",
"dataProfileScore": null,
"modelFile": "",
"fileLocation": "",
"productionEnvironmentName": "",
"specialApprovalContvyInstructions": "",
"userId": "",
"displayTablesInScan": true,
"displaySynonymsInScan": false,
"databaseType": "SqlServer",
"minimumNoOfConnectionsPerPartition": 3,
"serverOSVersion": "",
"databasePassword": "",
"databaseDriver": "",
"authenticationType": null,
"systemEnvironmentId": 0
}
public java.lang.String deleteEnvironmentAs(int environmentId, java.lang.String outputFormat)
environmentId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String scanEnvironmentAs(java.lang.String dbHelperObjJson, java.lang.String outputFormat)
DBProperties.DatabaseType
. Depending on this value,
mandatory values will vary from one database to other.
scanCriteria - This defines the selection criteria of
objects(TABLES/VIEWS/SYNONYMS) 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 or if the scanCriteria value is EXCLUDE_SELECTION then
apart from selected objects, the rest of the objects from the database
are loaded or if the scanCriteria value is ALL then all the objects in
the database are loaded into environment. Here objects refers to
TABLES/VIEWS/SYNONYMS.
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.
erwinModelType & readLogicalColumns - These properties from the dbHelper
object are used for only ERWIN or ERWIN9 file based databases.
erwinModelType defines the order in which the tables are displayed and
readLogicalColumns value defines whether to skip logical columns or not.
The value of erwinModelType value can be either PHYSICAL OR LOGICAL (For
values reference at com.ads.mm.xml.erwin.ERWinBase.ModelType
)).
ERWinBase.ModelType's default value is PHYSICAL.
The value of readLogicalColumns accepts boolean value true or false.
If environment is loaded successfully, DBEnvironment object will be returned in the form of json/xml depending on the output format.
dbHelperObjJson
- - dbHelper Object - JSON formatoutputFormat
- String - Valid values: JSON or XML
Sample 'dbHelperObjJson' JSON :
{
"dbUrl": "jdbc:sqlserver://hostname:1433;databaseName=database_name",
"dbDriver": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
"dbUserName": "user name",
"dbPassword": "******",
"dbName": "database name",
"dbSchema": "schema name",
"databaseType": "SQLSERVER",
"scanCriteria": "INCLUDE_SELECTION",
"readColumns": true,
"readComments": false,
"readTables": true,
"readViews": true,
"readSynonyms": true,
"readLogicalColumns": false,
"selectedTables": {
"dbo": [
"ADS_FORM"
]
},
"selectedViews": {},
"selectedSynonyms": {},
"autoCommit": true,
"filePath": "D:\\files to scan\\ERWin\\Demo Model1_10.xml", ==> (for file
based databases)
"filePathType":"RELATIVE"
"erwinModelType": "PHYSICAL", ==> (for erwin database)
"useReferenceId": false ==> (for erwin & cwm databases)
}
public java.lang.String loadEnvironmentAs(int systemId, java.lang.String environmentName, boolean useRefrenceId, java.lang.String outputFormat)
If the useReferenceId is true, the environment is loaded based on checking the table reference id which is set to the tables in the specific environment. If the value is false, the environment gets loaded with out checking the table referenceId which is set to the tables.
outputFormat can be either dbHelperObj or XML. If outputFormat is not specified, by default the method will return the dbHelperObj String.
systemId
- intenvironmentName
- StringuseRefrenceId
- booleanoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String saveEnvironmentAs(java.lang.String dbEnvironmentObjJson, java.lang.String operation, boolean useReferenceId, java.lang.String outputFormat)
DBEnvironment Object specifies the options update, insert, validate,
invalidate and skip depending on the databaseType including which it
gives the table count,views count and synonyms count.
DBProperties Object specifies the operation modes in which the
environment will be saved i.e fresh upload, update append and append
modes.
simple append mode is used when environment is save 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.
useReferenceId value is set to true or false depending on the
databaseType in which the environment is saved. If environment is saved
successfully, RequestStatus.isRequestSuccess() will return true otherwise
false.
outputFormat can be either dbHelperObj or XML. If outputFormat is not specified,
by default the method will return the dbHelperObj String.
dbEnvironmentObjJson
- dbEnvironment Objectoperation
- DBProperties.OperationuseReferenceId
- booleanoutputFormat
- String - Valid values: JSON or XML
Sample 'dbEnvironmentObjJson' JSON :
{
"environmentName": "",
"system": {
"systemId": 0
},
"schemas": {
"dbo": {
"schemaName": "",
"viewMap": {},
"synonymMap": {},
"tableMap": {
"dbo.table1": {
"tableName": "",
"tableComments": "",
"createdBy": "",
"createdDateTime": 1428994708798,
"lastModifiedBy": "",
"lastModifiedDateTime": 1428994708798,
"tableType": "",
"columnMap": {
"column1": {
"columnName": "",
"datatype": "",
"length": "50",
"precision": "20",
"createdBy": "",
"createdDatetime": 1428994708798,
"lastModifiedBy": "",
"lastModifiedDatetime": 1428994708798,
"scale": "10"
}
}
}
}
}
}
}
public java.lang.String createTableAs(java.lang.String smTableObjJson, java.lang.String outputFormat)
smTableObjJson
- smTable - Object - JSON formatoutputFormat
- String - Valid values: JSON or XML
Sample 'smTableObjJson' JSON :
{
"expandedLogicalName": "",
"physicalTableName": "",
"workflowStatus": "",
"columns": [],
"actualTableName": null,
"tableComments": null,
"tableAlias": null,
"associatedBusinessTermId": 0,
"schemaName": "",
"declarationPath": "",
"stmid": 0,
"referenceId": null,
"tableName": "",
"tableClass": null,
"valid": true,
"tableType": "",
"extendedProperties": [],
"environmentId": 0,
"logicalTableName": null,
"userDefined10": "",
"parentTable": null,
"marked": false,
"systemId": 0,
"rootTable": true,
"tableDefinition": null,
"columnIndexes": [],
"tableReferenceId": null,
"associatedBusinessTerm": "",
"dataStewardName": null,
"dataProfileScoreId": 0,
"environment": null,
"totalRowsCount": 0,
"userDefined8": "",
"userDefined9": "",
"metadataSource": "",
"userDefined6": "",
"userDefined7": "",
"userDefined4": "",
"userDefined5": "",
"tableId": 0,
"userDefined2": "",
"systemEnvironmentName": "",
"usedInGapAnalysis": true,
"userDefined3": "",
"userDefined1": "",
"fileType": null,
"status": ""
}
public java.lang.String getTableAs(int tableId, java.lang.String outputFormat)
tableId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getTableAs(int environmentId, java.lang.String tableName, java.lang.String outputFormat)
environmentId
- inttableName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getTableIdAs(int environmentId, java.lang.String tableName, java.lang.String outputFormat)
environmentId
- inttableName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getTableIdAs(java.lang.String systemName, java.lang.String environmentName, java.lang.String tableName, java.lang.String outputFormat)
systemName
- StringenvironmentName
- StringtableName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getEnvironmentTablesAs(int environmentId, java.lang.String outputFormat)
environmentId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String updateTableAs(java.lang.String smTableObjJson, boolean useReferenceId, java.lang.String outputFormat)
smTableObjJson
- useReferenceId
- booleanoutputFormat
- String - Valid values: JSON or XML
Sample 'smTableObjJson' JSON :
{
"expandedLogicalName": "",
"physicalTableName": "",
"workflowStatus": "",
"columns": [],
"actualTableName": null,
"tableComments": null,
"tableAlias": null,
"associatedBusinessTermId": 0,
"schemaName": "",
"declarationPath": "",
"stmid": 0,
"referenceId": null,
"tableName": "",
"tableClass": null,
"valid": true,
"tableType": "",
"extendedProperties": [],
"environmentId": 0,
"logicalTableName": null,
"userDefined10": "",
"parentTable": null,
"marked": false,
"systemId": 0,
"rootTable": true,
"tableDefinition": null,
"columnIndexes": [],
"tableReferenceId": null,
"associatedBusinessTerm": "",
"dataStewardName": null,
"dataProfileScoreId": 0,
"environment": null,
"totalRowsCount": 0,
"userDefined8": "",
"userDefined9": "",
"metadataSource": "",
"userDefined6": "",
"userDefined7": "",
"userDefined4": "",
"userDefined5": "",
"tableId": 0,
"userDefined2": "",
"systemEnvironmentName": "",
"usedInGapAnalysis": true,
"userDefined3": "",
"userDefined1": "",
"fileType": null,
"status": ""
}
public java.lang.String deleteTableAs(int tableId, java.lang.String outputFormat)
tableId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String createColumnAs(java.lang.String smColumnObjJson, java.lang.String outputFormat)
smColumnObjJson
- in JSON formatoutputFormat
- String - Valid values: JSON or XML
Sample 'smColumnObjJson' JSON :
{
"columnLength": "0",
"logicalColumnName": null,
"columnETLDefaultValue": null,
"workflowStatus": "",
"columnDefinition": null,
"associatedBusinessTermId": 0,
"foreignKeyTableName": null,
"validValues": [],
"declarationPath": "",
"columnAlias": null,
"tableName": "",
"minimumValue": null,
"extendedProperties": [],
"userDefined10": "",
"dataProfileEndDate": null,
"dataProfileJobFailReason": null,
"columnScale": "0",
"columnPrecision": "0",
"columnDBDefaultValue": null,
"includeInDataProfile": null,
"columnDatatype": "",
"dataProfileJobState": null,
"stcmid": 0,
"naturalKeyFlag": false,
"physicalColumnName": "",
"dataProfileScoreId": 0,
"dataStewardName": null,
"columnType": "",
"sdiClassificationName": "",
"userDefined8": "",
"userDefined9": "",
"metadataSource": "",
"userDefined6": "",
"userDefined7": "",
"userDefined4": "",
"userDefined5": "",
"userDefined2": "",
"usedInGapAnalysis": true,
"userDefined3": "",
"userDefined1": "",
"sdiFlag": false,
"status": "",
"columnComments": null,
"expandedLogicalName": "",
"businessKeyFlag": false,
"columnId": 0,
"valid": true,
"xpath": null,
"environmentId": 0,
"table": null,
"insertOrder": 1,
"dataProfileScore": null,
"columnIndexes": [],
"sdiDescription": null,
"percentNullValue": null,
"dataProfileStartDate": null,
"columnNullableFlag": true,
"associatedBusinessTerm": "",
"foreignKeyColumnName": null,
"columnDataDomain": null,
"columnIdentityFlag": false,
"foreignKeyFlag": false,
"fileStartingPosition": null,
"columnClass": null,
"tableId": 0,
"storageType": null,
"primaryKeyFlag": false,
"sdiClassificationId": "",
"maximumValue": null,
"columnName": "",
"columnReferenceId": null
}
public java.lang.String getColumnAs(int columnId, java.lang.String outputFormat)
columnId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getColumnAs(int tableId, java.lang.String columnName, java.lang.String outputFormat)
tableId
- intcolumnName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getColumnIdAs(int tableId, java.lang.String columnName, java.lang.String outputFormat)
tableId
- intcolumnName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getColumnIdAs(java.lang.String systemName, java.lang.String environmentName, java.lang.String tableName, java.lang.String columnName, java.lang.String outputFormat)
systemName
- StringenvironmentName
- StringtableName
- StringcolumnName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getTableColumnsAs(int tableId, java.lang.String outputFormat)
getColumnsAs(int, java.lang.String)
tableId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String updateColumnAs(java.lang.String smColumnObjJson, boolean useReferenceId, java.lang.String outputFormat)
smColumnObjJson
- in JSON formatuseReferenceId
- booleanoutputFormat
- String - Valid values: JSON or XML
Sample 'smColumnObjJson' JSON :
{
"columnLength": "0",
"logicalColumnName": null,
"columnETLDefaultValue": null,
"workflowStatus": "",
"columnDefinition": null,
"associatedBusinessTermId": 0,
"foreignKeyTableName": null,
"validValues": [],
"declarationPath": "",
"columnAlias": null,
"tableName": "",
"minimumValue": null,
"extendedProperties": [],
"userDefined10": "",
"dataProfileEndDate": null,
"dataProfileJobFailReason": null,
"columnScale": "0",
"columnPrecision": "0",
"columnDBDefaultValue": null,
"includeInDataProfile": null,
"columnDatatype": "",
"dataProfileJobState": null,
"stcmid": 0,
"naturalKeyFlag": false,
"physicalColumnName": "",
"dataProfileScoreId": 0,
"dataStewardName": null,
"columnType": "",
"sdiClassificationName": "",
"userDefined8": "",
"userDefined9": "",
"metadataSource": "",
"userDefined6": "",
"userDefined7": "",
"userDefined4": "",
"userDefined5": "",
"userDefined2": "",
"usedInGapAnalysis": true,
"userDefined3": "",
"userDefined1": "",
"sdiFlag": false,
"status": "",
"columnComments": null,
"expandedLogicalName": "",
"businessKeyFlag": false,
"columnId": 0,
"valid": true,
"xpath": null,
"environmentId": 0,
"table": null,
"insertOrder": 1,
"dataProfileScore": null,
"columnIndexes": [],
"sdiDescription": null,
"percentNullValue": null,
"dataProfileStartDate": null,
"columnNullableFlag": true,
"associatedBusinessTerm": "",
"foreignKeyColumnName": null,
"columnDataDomain": null,
"columnIdentityFlag": false,
"foreignKeyFlag": false,
"fileStartingPosition": null,
"columnClass": null,
"tableId": 0,
"storageType": null,
"primaryKeyFlag": false,
"sdiClassificationId": "",
"maximumValue": null,
"columnName": "",
"columnReferenceId": null
}
public java.lang.String deleteColumnAs(int columnId, java.lang.String outputFormat)
columnId
- intoutputFormat
- String - Valid values: JSON or XMLpublic RequestStatus addDocument(int nodeId, Node.NodeType nodeType, Document document)
nodeId
- intnodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTdocument
- Document Objectpublic RequestStatus addDocument(java.lang.String nodeName, int parentNodeId, Node.NodeType parentNodeType, Document document)
nodeName
- StringparentNodeId
- intparentNodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTdocument
- Document Objectpublic RequestStatus deleteDocuments(int nodeId, Node.NodeType nodeType)
nodeId
- intnodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENT.public RequestStatus deleteDocuments(java.lang.String nodeName, int parentNodeId, Node.NodeType parentNodeType)
nodeName
- StringparentNodeId
- intparentNodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTpublic RequestStatus deleteSystemDocuments(int systemId)
systemId
- intpublic RequestStatus deleteSystemDocuments(java.lang.String systemName)
systemName
- Stringpublic RequestStatus deleteEnvironmentDocuments(int environmentId)
environmentId
- intpublic RequestStatus deleteEnvironmentDocuments(int systemId, java.lang.String environmentName)
systemId
- intenvironmentName
- Stringpublic RequestStatus deleteDocument(Node.NodeType nodeType, int docId)
nodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTdocId
- intpublic Document getDocument(Node.NodeType nodeType, int docId) throws java.lang.Exception
nodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTdocId
- intjava.lang.Exception
public java.util.ArrayList<Document> getDocuments(Node.NodeType nodeType, java.util.List<java.lang.Integer> docIds) throws java.lang.Exception
nodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTdocIds
- Listjava.lang.Exception
public java.util.ArrayList<Document> getEnvironmentDocuments(int environmentId) throws java.lang.Exception
environmentId
- intDaoException
java.lang.Exception
public RequestStatus deleteDocuments(Node.NodeType nodeType, java.util.List<java.lang.Integer> docIds)
nodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTdocIds
- Listpublic RequestStatus updateDocument(Node.NodeType nodeType, Document document)
nodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTdocument
- Document Objectpublic RequestStatus cloneEnvironment(java.lang.String srcSystemName, java.lang.String srcEnvironmentName, java.lang.String tgtSystemName, java.lang.String tgtEnvironmentName)
srcSystemName
- StringsrcEnvironmentName
- StringtgtSystemName
- StringtgtEnvironmentName
- Stringpublic RequestStatus cloneEnvironment(int srcSystemId, java.lang.String srcEnvironmentName, int tgtSystemId, java.lang.String tgtEnvironmentName)
srcSystemId
- intsrcEnvironmentName
- StringtgtSystemId
- inttgtEnvironmentName
- Stringpublic RequestStatus cloneEnvironment(int environmentId, java.lang.String tgtSystemName, java.lang.String tgtEnvironmentName)
environmentId
- inttgtSystemName
- StringtgtEnvironmentName
- Stringpublic java.lang.String addDocumentAs(int nodeId, java.lang.String nodeType, java.lang.String documentJsonObj, java.lang.String outputFormat)
outputFormat
- String - Valid values: JSON or XMLnodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTnodeId
- intdocumentJsonObj
- String Document Object.
Sample 'documentJsonObj' JSON :
{
"documentIntendedPurpose": "",
"userData": null,
"documentReferenceNumber": "",
"documentType": "",
"documentName": "",
"documentApprovedBy": "",
"documentObject": "",
"approvalRequired": false,
"documentOwner": "",
"documentLink": "",
"documentId": 0,
"documentReference": "",
"documentStatus": "",
"documentApprovedDate": 1460701213000
}
public java.lang.String addDocumentAs(java.lang.String nodeName, int parentNodeId, java.lang.String parentNodeType, java.lang.String documentObjJson, java.lang.String outputFormat)
outputFormat
- String - Valid values: JSON or XMLnodeName
- StringparentNodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTparentNodeId
- intdocumentObjJson
- String Document Object.
Sample 'documentObjJson' JSON :
{
"documentIntendedPurpose": "",
"userData": null,
"documentReferenceNumber": "",
"documentType": "",
"documentName": "",
"documentApprovedBy": "",
"documentObject": "",
"approvalRequired": false,
"documentOwner": "",
"documentLink": "",
"documentId": 0,
"documentReference": "",
"documentStatus": "",
"documentApprovedDate": 1460701213000
}
public java.lang.String deleteDocumentsAs(int nodeId, java.lang.String nodeType, java.lang.String outputFormat)
nodeId
- intnodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENToutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String deleteDocumentsAs(java.lang.String nodeName, int parentNodeId, java.lang.String parentNodeType, java.lang.String outputFormat)
nodeName
- StringparentNodeId
- intparentNodeType
- Node Object - valid types - SM_SYSTEM,
SM_ENVIRONMENToutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String deleteSystemDocumentsAs(int systemId, java.lang.String outputFormat)
systemId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String deleteSystemDocumentsAs(java.lang.String systemName, java.lang.String outputFormat)
systemName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String deleteEnvironmentDocumentsAs(int environmentId, java.lang.String outputFormat)
environmentId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String deleteEnvironmentDocumentsAs(int systemId, java.lang.String environmentName, java.lang.String outputFormat)
systemId
- intenvironmentName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String deleteDocumentAs(java.lang.String nodeType, int docId, java.lang.String outputFormat)
nodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTdocId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getDocumentAs(java.lang.String nodeType, int docId, java.lang.String outputFormat)
nodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTdocId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getDocumentsAs(java.lang.String nodeType, java.lang.String docIdsJsonArray, java.lang.String outputFormat)
nodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTdocIdsJsonArray
- ListoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getEnvironmentDocumentsAs(int environmentId, java.lang.String outputFormat)
environmentId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String deleteDocumentsAs(java.lang.String nodeType, java.lang.String docIdsJsonArray, java.lang.String outputFormat)
nodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTdocIdsJsonArray
- ListoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String updateDocumentAs(java.lang.String nodeType, java.lang.String documentObjJson, java.lang.String outputFormat)
nodeType
- Node Object - valid types - SM_SYSTEM, SM_ENVIRONMENTdocumentObjJson
- DocumentoutputFormat
- String - Valid values: JSON or XML
Sample 'documentJsonObj' JSON :
{
"documentIntendedPurpose": "",
"userData": null,
"documentReferenceNumber": "",
"documentType": "",
"documentName": "",
"documentApprovedBy": "",
"documentObject": "",
"approvalRequired": false,
"documentOwner": "",
"documentLink": "",
"documentId": 0,
"documentReference": "",
"documentStatus": "",
"documentApprovedDate": 1460701213000
}
public java.lang.String cloneEnvironmentAs(java.lang.String srcSystemName, java.lang.String srcEnvironmentName, java.lang.String tgtSystemName, java.lang.String tgtEnvironmentName, java.lang.String outputFormat)
srcSystemName
- StringsrcEnvironmentName
- StringtgtSystemName
- StringtgtEnvironmentName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String cloneEnvironmentAs(int srcSystemId, java.lang.String srcEnvironmentName, int tgtSystemId, java.lang.String tgtEnvironmentName, java.lang.String outputFormat)
srcSystemId
- intsrcEnvironmentName
- StringtgtSystemId
- inttgtEnvironmentName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String cloneEnvironmentAs(int environmentId, java.lang.String tgtSystemName, java.lang.String tgtEnvironmentName, java.lang.String outputFormat)
environmentId
- inttgtSystemName
- StringtgtEnvironmentName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic SMEnvironment getEnvironment(int environmentId, boolean fillMetadata) throws java.lang.Exception
environmentId
- intfillMetadata
- booleanjava.lang.Exception
public SMEnvironment getEnvironment(int environmentId, boolean fillMetadata, boolean useReferenceId) throws java.lang.Exception
environmentId
- intfillMetadata
- booleanuseReferenceId
- booleanjava.lang.Exception
public java.lang.String getEnvironmentAs(int environmentId, boolean fillMetadata, boolean useReferenceId, java.lang.String outputFormat) throws java.lang.Exception
environmentId
- intfillMetadata
- booleanuseReferenceId
- booleanoutputFormat
- String - Valid values: JSON or XMLjava.lang.Exception
public java.util.List<SMColumn> getColumns(int tableId) throws java.lang.Exception
tableId
- intjava.lang.Exception
public SMColumn getColumn(int columnId, int fillOptions) throws java.lang.Exception
APIConstants.SMFillOptions
.
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.columnId
- intfillOptions
- APIConstants.SMFillOptions
intjava.lang.Exception
public java.util.List<SMColumn> getColumns(int tableId, int fillOptions) throws java.lang.Exception
APIConstants.SMFillOptions
.
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.tableId
- intfillOptions
- APIConstants.SMFillOptions
intjava.lang.Exception
- if tableId is invalid or user does not have permission.public SMColumn getColumn(int tableId, java.lang.String columnName, int fillOptions) throws java.lang.Exception
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.
Specifying the tableId, columnName and fillOptions are mandatory.tableId
- intcolumnName
- StringfillOptions
- APIConstants.SMFillOptions
intjava.lang.Exception
public java.util.List<SMColumn> getIndexColumns(int tableId, java.lang.String indexName, int fillOptions) throws java.lang.Exception
APIConstants.SMFillOptions
.
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.
Specifying the tableId ,indexName and fillOptions are mandatory.tableId
- intindexName
- StringfillOptions
- APIConstants.SMFillOptions
intjava.lang.Exception
public SMTable getTable(int tableId, int fillOptions) throws DaoException, java.lang.Exception
APIConstants.SMFillOptions
.
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)).
Specifying the tableId and fillOptions are mandatory in order to fetch
the table details.tableId
- intfillOptions
- APIConstants.SMFillOptions
intDaoException
java.lang.Exception
public RequestStatus addIndex(SMIndex index)
index
- SMIndexpublic RequestStatus addIndex(int columnId, SMIndex index)
columnId
- intindex
- SMIndexpublic RequestStatus addIndexes(java.util.List<SMIndex> indexes)
indexes
- Listpublic RequestStatus addIndexes(int columnId, java.util.List<SMIndex> indexes)
columnId
- intindexes
- Listpublic RequestStatus updateIndex(SMIndex index)
index
- SMIndexpublic RequestStatus updateIndexes(java.util.List<SMIndex> indexes)
indexes
- Listpublic RequestStatus deleteIndexById(int indexId)
indexId
- intpublic RequestStatus deleteIndex(SMIndex index)
index
- SMIndexpublic RequestStatus deleteIndexesById(java.util.List<java.lang.Integer> indexIds)
indexIds
- Listpublic RequestStatus deleteIndexes(java.util.List<SMIndex> indexes)
indexes
- Listpublic RequestStatus deleteIndexes(Node.NodeType nodeType, int nodeId)
nodeType
- Node Object - valid types - SM_TABLE, SM_COLUMNnodeId
- intpublic SMIndex getIndex(int indexId) throws java.lang.Exception
indexId
- intjava.lang.Exception
public SMIndex getIndex(int tableId, java.lang.String indexName) throws java.lang.Exception
tableId
- intindexName
- Stringjava.lang.Exception
public java.util.List<SMIndex> getIndexes(int tableId) throws java.lang.Exception
tableId
- intjava.lang.Exception
public java.util.List<SMIndex> getIndexes(Node.NodeType nodeType, int nodeId) throws java.lang.Exception
nodeType
- Node Object - valid types - SM_TABLE, SM_COLUMNnodeId
- intjava.lang.Exception
public SMIndex getIndex(Node.NodeType nodeType, int nodeId, java.lang.String indexName) throws java.lang.Exception
nodeType
- Node Object - valid types - SM_TABLE, SM_COLUMNnodeId
- intindexName
- Stringjava.lang.Exception
public SMIndex getIndex(int indexId, int fillOptions) throws java.lang.Exception
APIConstants.SMFillOptions
.
APIConstants.SMFillOptions.INDEX_COLUMN_ASSOCIATES
Based on the value passed its related data is returned within the SMIndex
object. For example if you want to get associated column objects of the
index,then fillOptions parameter value will be INDEX_COLUMN_ASSOCIATES
value i.e 128.indexId
- intfillOptions
- APIConstants.SMFillOptions
intjava.lang.Exception
public SMIndex getIndex(int tableId, java.lang.String indexName, int fillOptions) throws java.lang.Exception
APIConstants.SMFillOptions
.
APIConstants.SMFillOptions.INDEX_COLUMN_ASSOCIATES
Based on the value passed its related data is returned within the
SMIndex object. For example if you want to get associated column objects of the
index,then fillOptions
parameter value will be INDEX_COLUMN_ASSOCIATES value i.e 128.tableId
- intindexName
- StringfillOptions
- APIConstants.SMFillOptions
intjava.lang.Exception
public java.util.List<SMIndex> getIndexes(int tableId, int fillOptions) throws java.lang.Exception
APIConstants.SMFillOptions
.
APIConstants.SMFillOptions.INDEX_COLUMN_ASSOCIATES
Based on the value passed its related data is returned within the
SMIndex object. For example if you want to get associated column objects
of the index ,then fillOptions parameter value will be
INDEX_COLUMN_ASSOCIATES value i.e 128.tableId
- intfillOptions
- APIConstants.SMFillOptions
intjava.lang.Exception
public java.util.List<SMIndex> getIndexes(Node.NodeType nodeType, int nodeId, int fillOptions) throws java.lang.Exception
APIConstants.SMFillOptions
.
APIConstants.SMFillOptions.INDEX_COLUMN_ASSOCIATES
Based on the value passed its related data is returned within the
SMIndex object. For example if you want to get associated column objects
of the index,then fillOptions parameter value will be
INDEX_COLUMN_ASSOCIATES value i.e 128.
nodeType
- Node Object - valid types - SM_TABLE, SM_COLUMNnodeId
- intfillOptions
- APIConstants.SMFillOptions
intjava.lang.Exception
public SMIndex getIndex(Node.NodeType nodeType, int nodeId, java.lang.String indexName, int fillOptions) throws java.lang.Exception
APIConstants.SMFillOptions
.
APIConstants.SMFillOptions.INDEX_COLUMN_ASSOCIATES
Based on the value passed its related data is returned within the
SMIndex object. For example if you want to get associated column objects
of the index,then fillOptions parameter value will be
INDEX_COLUMN_ASSOCIATES value i.e 128.
nodeType
- Node Object - valid types - SM_TABLE, SM_COLUMNnodeId
- intindexName
- StringfillOptions
- APIConstants.SMFillOptions
intjava.lang.Exception
public java.util.List<Codeset> getAssignedCodesets(int columnId) throws java.lang.Exception
columnId
- intjava.lang.Exception
public java.util.List<Codeset> getAssignedCodesets(int columnId, int fillOptions) throws java.lang.Exception
APIConstants.SMFillOptions
.
com.ads.api.beans.common.APIConstants.SMFillOptions#CODE_VALUES
or com.ads.api.beans.common.APIConstants.SMFillOptions#CODE_VALUE_EXTENDED_PROPERTIES
Based on the value passed its related data is returned within the Codeset object and
if you want to get codeValues and codeValue extended properties then
fillOptions parameter value will be addition of
CODE_VALUES value and CODE_VALUE_EXTENDED_PROPERTIES value i.e 32+64=96 and so on.
Specification of columnId,fillOptions are mandatory.columnId
- intfillOptions
- APIConstants.SMFillOptions
intjava.lang.Exception
public java.util.List<CodeValue> getValidValues(int columnId) throws java.lang.Exception
columnId
- intjava.lang.Exception
public java.util.List<CodeValue> getValidValues(int columnId, int fillOptions) throws java.lang.Exception
APIConstants.SMFillOptions
.
com.ads.api.beans.common.APIConstants.SMFillOptions#CODE_VALUE_EXTENDED_PROPERTIES
whose value is 64.
If fillOptions parameter value is passed as 64 then codeValue's
extended properties are returned within the
CodeValue object.
If CodeValue's extended properties are not required then pass 0(zero)
which is default value for fillOptions.
columnId
- intfillOptions
- APIConstants.SMFillOptions
intjava.lang.Exception
public RequestStatus assignCodeset(int columnId, Codeset codeset)
columnId
- intcodeset
- public RequestStatus assignCodesets(int columnId, java.util.List<Codeset> codesets)
columnId
- intcodesets
- Listpublic RequestStatus assignCodesets(int columnId, java.util.List<java.lang.Integer> codeSetIds, boolean unassignExisting)
columnId
- intcodeSetIds
- ListunassignExisting
- booleanpublic RequestStatus unassignExistingCodesets(Node.NodeType nodeType, int nodeId)
nodeType
- Node Object - valid types - SM_TABLE, SM_COLUMNnodeId
- intpublic java.lang.String getColumnAs(int tableId, java.lang.String columnName, int fillOptions, java.lang.String outputFormat) throws java.lang.Exception
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.
tableId
- intcolumnName
- StringfillOptions
- APIConstants.SMFillOptions
intoutputFormat
- String - Valid values: JSON or XMLjava.lang.Exception
public java.lang.String getColumnAs(int columnId, int fillOptions, java.lang.String outputFormat) throws java.lang.Exception
APIConstants.SMFillOptions
.
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.
columnId
- intfillOptions
- APIConstants.SMFillOptions
intoutputFormat
- String - Valid values: JSON or XMLjava.lang.Exception
public java.lang.String getColumnsAs(int tableId, int fillOptions, java.lang.String outputFormat) throws java.lang.Exception
APIConstants.SMFillOptions
.
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.
tableId
- intfillOptions
- APIConstants.SMFillOptions
intoutputFormat
- String - Valid values: JSON or XMLjava.lang.Exception
public java.lang.String getColumnsAs(int tableId, java.lang.String outputFormat)
tableId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getIndexColumnsAs(int tableId, java.lang.String indexName, int fillOptions, java.lang.String outputFormat) throws java.lang.Exception
APIConstants.SMFillOptions
.
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.
tableId
- intindexName
- StringfillOptions
- APIConstants.SMFillOptions
intoutputFormat
- String - Valid values: JSON or XMLjava.lang.Exception
public java.lang.String getTableAs(int tableId, int fillOptions, java.lang.String outputFormat) throws java.lang.Exception
APIConstants.SMFillOptions
.
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)).
Specifying the tableId and fillOptions are mandatory in order to fetch
the table details.
tableId
- intfillOptions
- APIConstants.SMFillOptions
intoutputFormat
- String - Valid values: JSON or XMLjava.lang.Exception
public java.lang.String addIndexAs(java.lang.String jsonSMIndex, java.lang.String outputFormat)
jsonSMIndex
- String - smIndex ObjectoutputFormat
- String - Valid values: JSON or XML
Sample 'jsonSMIndex' JSON :
{
"id":0,
"tableId":0,
"name": "",
"owner": "",
"uniqueness": "",
"sortOrder": "",
"type": "",
"ordinalPosition": 0,
"columns": [
{
"columnId": 0
}
]
}
public java.lang.String addIndexAs(int columnId, java.lang.String jsonSMIndex, java.lang.String outputFormat)
columnId
- intjsonSMIndex
- StringoutputFormat
- String - Valid values: JSON or XML
Sample 'jsonSMIndex' JSON :
{
"id":0,
"tableId":0,
"name": "",
"owner": "",
"uniqueness": "",
"sortOrder": "",
"type": "",
"ordinalPosition": 0,
"columns": [
{
"columnId": 0
}
]
}
public java.lang.String addIndexesAs(java.lang.String jsonArraySMIndex, java.lang.String outputFormat)
jsonArraySMIndex
- String - smIndex Object listoutputFormat
- String - Valid values: JSON or XML
Sample 'jsonArraySMIndex' JSON :
[
{
"id":0,
"tableId":0,
"name": "",
"owner": "",
"uniqueness": "",
"sortOrder": "",
"type": "test",
"ordinalPosition": 0,
"columns": [
{
"columnId": 0
}
]
},
{
"id":0,
"tableId":0,
"name": "",
"owner": "",
"uniqueness": "",
"sortOrder": "",
"type": "",
"ordinalPosition": 0,
"columns": [
{
"columnId": 0
}
]
}
]
public java.lang.String addIndexesAs(int columnId, java.lang.String jsonArraySMIndex, java.lang.String outputFormat)
columnId
- intjsonArraySMIndex
- StringoutputFormat
- String - Valid values: JSON or XML
Sample 'jsonArraySMIndex' JSON :
[
{
"id":0,
"tableId":0,
"name": "",
"owner": "",
"uniqueness": "",
"sortOrder": "",
"type": "",
"ordinalPosition": 0,
},
{
"id":0,
"tableId":0,
"name": "",
"owner": "",
"uniqueness": "",
"sortOrder": "",
"type": "",
"ordinalPosition": 0,
}
]
public java.lang.String updateIndexAs(java.lang.String jsonSMIndex, java.lang.String outputFormat)
jsonSMIndex
- String - smIndex ObjectoutputFormat
- String - Valid values: JSON or XML
Sample 'jsonSMIndex' JSON :
{
"id":0, "tableId":0, "name": "",
"owner": "",
"uniqueness": "",
"sortOrder": "",
"type": "",
"ordinalPosition": 0,
"columns": [
{
"columnId": 0
}
]
}
public java.lang.String updateIndexesAs(java.lang.String jsonArraySMIndex, java.lang.String outputFormat)
jsonArraySMIndex
- String - smIndex objects listoutputFormat
- String - Valid values: JSON or XML
Sample 'jsonArraySMIndex' JSON :
[
{
"id":0,
"tableId":0,
"name": "",
"owner": "",
"uniqueness": "",
"sortOrder": "",
"type": "",
"ordinalPosition": 0,
"columns": [
{
"columnId": 0
}
]
},
{
"id":0,
"tableId":0,
"name": "",
"owner": "",
"uniqueness": "",
"sortOrder": "",
"type": "",
"ordinalPosition": 0,
"columns": [
{
"columnId": 0
}
]
}
]
public java.lang.String deleteIndexByIdAs(int indexId, java.lang.String outputFormat)
indexId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String deleteIndexAs(java.lang.String jsonSMIndex, java.lang.String outputFormat)
jsonSMIndex
- String - smIndex ObjectoutputFormat
- String - Valid values: JSON or XML
Sample 'jsonSMIndex' JSON :
{
"id":0,
"tableId":0,
"name": "",
"owner": "",
"uniqueness": "",
"sortOrder": "",
"type": "",
"ordinalPosition": 0
}
public java.lang.String deleteIndexesByIdsAs(java.lang.String jsonArrayIndexId, java.lang.String outputFormat)
jsonArrayIndexId
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String deleteIndexesAs(java.lang.String jsonArraySMIndex, java.lang.String outputFormat)
jsonArraySMIndex
- StringoutputFormat
- String - Valid values: JSON or XML
Sample 'jsonArraySMIndex' JSON :
[
{
"id":0,
"tableId":0,
"name": "",
"owner": "",
"uniqueness": "",
"sortOrder": "",
"type": "",
"ordinalPosition": 0,
"columns": [
{
"columnId": 0
}
]
},
{
"id":0,
"tableId":0,
"name": "",
"owner": "",
"uniqueness": "",
"sortOrder": "",
"type": "",
"ordinalPosition": 0,
"columns": [
{
"columnId": 0
}
]
}
]
public java.lang.String deleteIndexesAs(java.lang.String nodeType, int nodeId, java.lang.String outputFormat)
nodeType
- Node Object - valid types - SM_TABLE, SM_COLUMNnodeId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getIndexAs(int indexId, int fillOptions, java.lang.String outputFormat)
APIConstants.SMFillOptions
.
APIConstants.SMFillOptions.INDEX_COLUMN_ASSOCIATES
Based on the value passed its related data is returned within the
SMIndex object. for example if you want to get column objects then fillOptions
parameter value will be INDEX_COLUMN_ASSOCIATES value i.e 128.
indexId
- intfillOptions
- APIConstants.SMFillOptions
intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getIndexAs(int tableId, java.lang.String indexName, int fillOptions, java.lang.String outputFormat)
APIConstants.SMFillOptions
.
APIConstants.SMFillOptions.INDEX_COLUMN_ASSOCIATES
Based on the value passed its related data is returned within the
SMIndex object. for example if you want to get column objects then fillOptions
parameter value will be INDEX_COLUMN_ASSOCIATES value i.e 128.
tableId
- intindexName
- StringfillOptions
- APIConstants.SMFillOptions
intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getIndexesAs(int tableId, int fillOptions, java.lang.String outputFormat)
APIConstants.SMFillOptions
.
APIConstants.SMFillOptions.INDEX_COLUMN_ASSOCIATES
Based on the value passed its related data is returned within the
SMIndex object. for example if you want to get column objects then fillOptions
parameter value will be INDEX_COLUMN_ASSOCIATES value i.e 128.
tableId
- intfillOptions
- APIConstants.SMFillOptions
intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getIndexesAs(java.lang.String nodeType, int nodeId, int fillOptions, java.lang.String outputFormat)
APIConstants.SMFillOptions
.
APIConstants.SMFillOptions.INDEX_COLUMN_ASSOCIATES
Based on the value passed its related data is returned within the
SMIndex object. for example if you want to get column objects then fillOptions
parameter value will be INDEX_COLUMN_ASSOCIATES value i.e 128.
nodeType
- Node Object - valid types - SM_TABLE, SM_COLUMNnodeId
- intfillOptions
- APIConstants.SMFillOptions
intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getIndexAs(java.lang.String nodeType, int nodeId, java.lang.String indexName, int fillOptions, java.lang.String outputFormat)
APIConstants.SMFillOptions
.
APIConstants.SMFillOptions.INDEX_COLUMN_ASSOCIATES
Based on the value passed its related data is returned within the
SMIndex object. for example if you want to get column objects then fillOptions
parameter value will be INDEX_COLUMN_ASSOCIATES value i.e 128.
nodeType
- Node Object - valid types - SM_TABLE, SM_COLUMNnodeId
- intindexName
- StringfillOptions
- APIConstants.SMFillOptions
intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getAssignedCodesetsAs(int columnId, java.lang.String outputFormat)
columnId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getAssignedCodesetsAs(int columnId, int fillOptions, java.lang.String outputFormat)
APIConstants.SMFillOptions
.
com.ads.api.beans.common.APIConstants.SMFillOptions.CODE_VALUES
or com.ads.api.beans.common.APIConstants.SMFillOptions.CODE_VALUE_EXTENDED_PROPERTIES
Based on the value passed its related data is returned within the Codeset object and
if you want to get codeValues and codeValue extended properties then
fillOptions parameter value will be addition of
CODE_VALUES value and CODE_VALUE_EXTENDED_PROPERTIES value i.e 32+64=96 and so on.
Specification of columnId,fillOptions flag are mandatory.
columnId
- intfillOptions
- APIConstants.SMFillOptions
intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getValidValuesAs(int columnId, java.lang.String outputFormat)
columnId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getValidValuesAs(int columnId, int fillOptions, java.lang.String outputFormat)
APIConstants.SMFillOptions
.
columnId
- intfillOptions
- APIConstants.SMFillOptions
intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String assignCodesetAs(int columnId, java.lang.String jsonCodeset, java.lang.String outputFormat)
columnId
- intjsonCodeset
- StringoutputFormat
- String - Valid values: JSON or XML
Sample 'jsonCodeset' 'JSON :
{
"changedDescription": "",
"releaseFlag": false,
"codeValues": [],
"description": " ",
"published": false,
"version": 0,
"versionLabel": "",
"lockedBy": "",
"name": "",
"id": 0,
"publishEnvironments": [],
"categoryId": 0,
"status": ""
}
public java.lang.String assignCodesetsAs(int columnId, java.lang.String jsonArrayCodeset, java.lang.String outputFormat)
columnId
- intjsonArrayCodeset
- StringoutputFormat
- String - Valid values: JSON or XML
Sample 'jsonArrayCodeset' JSON :
[
{
"changedDescription": "",
"releaseFlag": false,
"codeValues": [],
"description": " ",
"published": false,
"version": 0,
"versionLabel": "",
"lockedBy": "",
"name": "",
"id": 0,
"publishEnvironments": [],
"categoryId": 0,
"status": ""
},
{
"changedDescription": "",
"releaseFlag": false,
"codeValues": [],
"description": " ",
"published": false,
"version": 0,
"versionLabel": "",
"lockedBy": "",
"name": "",
"id": 0,
"publishEnvironments": [],
"categoryId": 0,
"status": ""
}
]
public java.lang.String assignCodesetsAs(int columnId, java.lang.String jsonArrayCodeSetIds, boolean unassignExisting, java.lang.String outputFormat)
columnId
- intjsonArrayCodeSetIds
- StringunassignExisting
- booleanoutputFormat
- String - Valid values: JSON or XML
Sample 'jsonArrayCodesetsIds' JSON :
[1,2,3]
public java.lang.String unassignExistingCodesetsAs(java.lang.String nodeType, int nodeId, java.lang.String outputFormat)
nodeType
- StringnodeId
- intoutputFormat
- String - Valid values: JSON or XMLpublic RequestStatus publishTable(int tableId)
tableId
- intpublic RequestStatus publishColumn(int columnId)
columnId
- intpublic RequestStatus publishNode(Node.NodeType nodeType, int nodeId)
nodeId
- intnodeType
- Node.NodeType - valid Types are SM_TABLE, SM_COLUMNpublic java.lang.String publishTableAs(int tableId, java.lang.String outputFormat)
outputFormat
- String - Valid values: JSON or XML- Valid values: JSON or XMLtableId
- intpublic java.lang.String publishColumnAs(int columnId, java.lang.String outputFormat)
outputFormat
- String - Valid values: JSON or XML- Valid values: JSON or XMLcolumnId
- intpublic java.lang.String publishNodeAs(java.lang.String nodeType, int nodeId, java.lang.String outputFormat)
outputFormat
- String - Valid values: JSON or XML - Valid values: JSON or XMLnodeId
- intnodeType
- String - valid Types are SM_TABLE, SM_COLUMNpublic RequestStatus publishTables(java.util.List<java.lang.Integer> tableIds)
tableIds
- List - List of tableIdspublic RequestStatus publishColumns(java.util.List<java.lang.Integer> columnIds)
columnIds
- List - List of columnIdspublic RequestStatus publishNodes(Node.NodeType nodeType, java.util.List<java.lang.Integer> nodeIds)
nodeType
- Node.NodeType - Valid types: SM_TABLE, SM_COLUMNnodeIds
- List - List of nodeIdspublic java.lang.String publishTablesAs(java.lang.String tableIdsJsonArray, java.lang.String outputFormat)
outputFormat
- String - Valid values: JSON or XML - Valid values: JSON or XMLtableIdsJsonArray
- String - List of tableIdspublic java.lang.String publishColumnsAs(java.lang.String columnIdsJsonArray, java.lang.String outputFormat)
outputFormat
- String - Valid values: JSON or XML - Valid values: JSON or XMLcolumnIdsJsonArray
- String - List of columnIdspublic java.lang.String publishNodesAs(java.lang.String nodeType, java.lang.String nodeIdsJsonArray, java.lang.String outputFormat)
outputFormat
- String - Valid values: JSON or XML - Valid values: JSON or XMLnodeType
- String - Valid types: SM_TABLE, SM_COLUMNnodeIdsJsonArray
- String - List of nodeIdspublic RequestStatus scanIntoEnvironment(int environmentId, DBHelper dbHelper, DBProperties.Operation dbOperation) throws java.lang.Exception
DBProperties.DatabaseType
. Depending on this value,
mandatory values will vary from one database to other.
scanCriteria - This defines the selection criteria of
objects(TABLES/VIEWS/SYNONYMS) 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.
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.
erwinModelType & readLogicalColumns - These properties from the dbHelper
object are used for only ERWIN or ERWIN9 file based databases.
erwinModelType defines the order in which the tables are displayed and
readLogicalColumns value defines whether to skip logical columns or not.
The value of erwinModelType value can be either PHYSICAL OR LOGICAL (For
values reference at com.ads.mm.xml.erwin.ERWinBase.ModelType
)).
ERWinBase.ModelType's 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 and
append modes(for values reference
DBProperties.Operation
).
Simple 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.
If environment is saved successfully, RequestStatus.isRequestSuccess()
will return true otherwise false.
Sample input script for this:
function execute()
{
var dbHelper = new DBHelper();
dbHelper.setDbUrl("jdbc:sqlserver://hostname:1433;databaseName=dbname");
dbHelper.setDbDriver("com.microsoft.sqlserver.jdbc.SQLServerDriver");
dbHelper.setDbUserName("username");
dbHelper.setDbPassword("***");
dbHelper.setDbName("dnname");
dbHelper.setDbSchema("schemaname");
dbHelper.setDatabaseType(DBProperties.DatabaseType.SQLSERVER);
dbHelper.setReadColumns(true);
dbHelper.setReadComments(false);
dbHelper.setReadTables(true);
dbHelper.setReadViews(false);
dbHelper.setReadSynonyms(false);
dbHelper.setIpAddress("hostname");
dbHelper.setFilePath(""); //For filebased databases
dbHelper.setFilePathType(APIConstants.FilePathType.RELATIVE);
dbHelper.setERwinModelType(ERWinBase.ModelType.PHYSICAL); //For erwin database
dbHelper.setReadLogicalColumns(false);
dbHelper.setScanCriteria(DBHelper.ScanCriteria.INCLUDE_SELECTION);
var selectedTablesMap = new HashMap();
var selList = new ArrayList();
selList.add("ADS_FORM");
selectedTablesMap.put("dbo",selList);
dbHelper.setSelectedTables(selectedTablesMap);
var reqStat = smutil.scanIntoEnvironment(22, dbHelper,DBProperties.Operation.FRESH_UPLOAD);
return reqStat.isRequestSuccess()+"====>"+reqStat.getStatusMessage();
}
environmentId
- intdbHelper
- objectdbOperation
- Stringjava.lang.Exception
public java.lang.String scanIntoEnvironmentAs(int environmentId, java.lang.String dbHelperJson, java.lang.String dbOperation, java.lang.String outputFormat)
DBProperties.DatabaseType
. Depending on this value,
mandatory values will vary from one database to other.
scanCriteria - This defines the selection criteria of
objects(TABLES/VIEWS/SYNONYMS) 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.
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.
erwinModelType & readLogicalColumns - These properties from the dbHelper
object are used for only ERWIN or ERWIN9 file based databases.
erwinModelType defines the order in which the tables are displayed and
readLogicalColumns value defines whether to skip logical columns or not.
The value of erwinModelType value can be either PHYSICAL OR LOGICAL (For
values reference at com.ads.mm.xml.erwin.ERWinBase.ModelType
)).
ERWinBase.ModelType's 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 and
append modes(for values reference
DBProperties.Operation
).
Simple 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.
If environment is saved successfully, RequestStatus.isRequestSuccess() will return true otherwise false.
environmentId
- intdbHelperJson
- in json formatdbOperation
- StringoutputFormat
- String - Valid values: JSON or XML
Sample 'dbHelperJson' JSON :
{
"dbUrl": "jdbc:sqlserver://hostname:1433;databaseName=database_name",
"dbDriver": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
"dbUserName": "user name",
"dbPassword": "******",
"dbName": "database name",
"dbSchema": "schema name",
"databaseType": "SQLSERVER",
"scanCriteria": "INCLUDE_SELECTION",
"readColumns": true,
"readComments": false,
"readTables": true,
"readViews": true,
"readSynonyms": true,
"readLogicalColumns": false,
"selectedTables": {
"dbo": [
"ADS_FORM"
]
},
"selectedViews": {},
"selectedSynonyms": {},
"autoCommit": true,
"filePath": "D:\\files to scan\\ERWin\\Demo Model1_10.xml", ==> (for file
based databases)
"filePathType":"RELATIVE",
"erwinModelType": "PHYSICAL", ==> (for erwin database)
"useReferenceId": false ==> (for erwin & cwm databases)
}
public RequestStatus updateEnvironmentMetadata(DBEnvironment dbEnvironment, DBProperties.Operation operation, boolean useReferenceId)
DBEnvironment Object specifies the options update, insert, validate,
invalidate and skip depending on the databaseType including which it
gives the table count,views count and synonyms count.
DBProperties Object specifies the operation modes in which the
environment will be saved i.e fresh upload, update append and append
modes.
Simple append mode is used when environment is save 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.
useReferenceId value is set to true or false depending on the databaseType in which the environment is saved. If environment is saved successfully, RequestStatus.isRequestSuccess() will return true otherwise false.
dbEnvironment
- DBEnvironmentoperation
- DBPropertiesuseReferenceId
- booleanpublic java.lang.String updateEnvironmentMetadataAs(java.lang.String dbEnvironmentObjJson, java.lang.String operation, boolean useReferenceId, java.lang.String outputFormat)
DBEnvironment Object specifies the options update, insert, validate,
invalidate and skip depending on the databaseType including which it
gives the table count,views count and synonyms count.
DBProperties Object specifies the operation modes in which the
environment will be saved i.e fresh upload, update append and append
modes.
simple append mode is used when environment is save 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.
useReferenceId value is set to true or false depending on the
databaseType in which the environment is saved. If environment is saved
successfully, RequestStatus.isRequestSuccess() will return true otherwise
false.
outputFormat can be either dbHelperObj or XML. If outputFormat is not
specified, by default the method will return the dbHelperObj String.
dbEnvironmentObjJson
- dbEnvironment Objectoperation
- DBProperties.OperationuseReferenceId
- booleanoutputFormat
- String - Valid values: JSON or XML
Sample 'dbEnvironmentObjJson' JSON :
{
"environmentName": "",
"system": {
"systemId": 0
},
"schemas": {
"dbo": {
"schemaName": "",
"viewMap": {},
"synonymMap": {},
"tableMap": {
"dbo.table1": {
"tableName": "",
"tableComments": "",
"createdBy": "",
"createdDateTime": 1428994708798,
"lastModifiedBy": "",
"lastModifiedDateTime": 1428994708798,
"tableType": "",
"columnMap": {
"column1": {
"columnName": "",
"datatype": "",
"length": "50",
"precision": "20",
"createdBy": "",
"createdDatetime": 1428994708798,
"lastModifiedBy": "",
"lastModifiedDatetime": 1428994708798,
"scale": "10"
}
}
}
}
}
}
}
public RequestStatus publishEnvironments(java.util.List<java.lang.Integer> environmentIds)
environmentIds
- List - List of environmentIdspublic org.json.JSONObject loadNewDataAssetCofig(int systemId, boolean isHTML, java.lang.String visibility)
systemId
- isHTML
- visibility
- public RequestStatus saveNewDataAsset(int systemId, org.json.JSONObject datasetDetails)
systemId
- datasetDetails
- public RequestStatus updateDataAsset(int systemId, int environmentId, org.json.JSONObject datasetDetails)
systemId
- datasetDetails
- public java.util.List<SMEnvironment> loadDataAssets(int systemId, java.lang.String visible, boolean fillExtendedProperties, boolean isHTML) throws DaoException
systemId
- visible
- fillExtendedProperties
- isHTML
- com.icc.exceptions.DaoException
DaoException
public java.util.LinkedHashMap<java.lang.String,java.lang.Object> dataAssetsSearch(org.json.JSONObject configDetails) throws DaoException
configDetails
- DaoException
public RequestStatus exportEnvironment(int environmentId, APIConstants.FileExtension fileExtension)
environmentId
- - intfileExtension
- - FileExtension type - Valid values are XML/AMP/ZIPpublic RequestStatus importEnvironment(int environmentId, DBHelper dbHelper, DBProperties.Operation dbOperation, APIConstants.FileExtension fileExtension)
DBProperties.Operation
).
environmentId
- - intdbHelper
- - DBHelper objectdbOperation
- - DBProperties objectfileExtension
- - FileExtension - Valid Types XML, AMP, ZIP.public java.lang.String exportEnvironmentAs(int environmentId, java.lang.String fileExtension, java.lang.String outputFormat)
environmentId
- - intfileExtension
- - StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String importEnvironmentAs(int environmentId, java.lang.String dbHelperObjJson, java.lang.String dbOperation, java.lang.String fileExtension, java.lang.String outputFormat)
DBProperties.Operation
).
environmentId
- - intdbHelperObjJson
- - String in json formatdbOperation
- - StringfileExtension
- - StringoutputFormat
- String - Valid values: JSON or XMLpublic RequestStatus versionEnvironment(int environmentId, java.lang.String changeDescription, java.lang.String versionLabel)
environmentId
- - intchangeDescription
- - StringversionLabel
- - Stringpublic java.lang.String versionEnvironmentAs(int environmentId, java.lang.String changeDescription, java.lang.String versionLabel, java.lang.String outputFormat)
environmentId
- - intchangeDescription
- - StringversionLabel
- - StringoutputFormat
- String - Valid values: JSON or XML