public class DocumentUtil
extends BaseUtil
RequestStatus return type methods will result in being returned as either
true or false as its status.
These Methods are applicable only for SM_ENVIRONMENT ,SM_TABLE, SM_COLUMN, REQM_SPECIFICATION,
BGM_TERM nodes types.
Constructor and Description |
---|
DocumentUtil(java.lang.String token) |
DocumentUtil(java.lang.String tokenType,
java.lang.String token) |
Modifier and Type | Method and Description |
---|---|
RequestStatus |
addDocument(Node.NodeType nodeType,
int nodeId,
Document document)
Document is added at the NodeId of the given nodeType with the document details.
|
java.lang.String |
addDocumentAs(java.lang.String nodeType,
int nodeId,
java.lang.String document,
java.lang.String outputFormat)
Document is added at the NodeId of the given nodeType with the document details.
|
RequestStatus |
addDocuments(Node.NodeType nodeType,
int nodeId,
java.util.List<Document> documents)
Documents are added at the NodeId of the given nodeType with the
documentsObjJson details.
|
java.lang.String |
addDocumentsAs(java.lang.String nodeType,
int nodeId,
java.lang.String documentsObjJson,
java.lang.String outputFormat)
Documents are added at the NodeId of the given nodeType with the
documentsObjJson details.
|
RequestStatus |
deleteDocument(int documentId)
Deletes the Document with the specified documentId.
|
RequestStatus |
deleteDocument(Node.NodeType nodeType,
int nodeId,
java.lang.String documentName)
Deletes the document with the given documentName of the specified nodeId of nodeType.
|
java.lang.String |
deleteDocumentAs(int documentId,
java.lang.String outputFormat)
Deletes the Document with the specified documentId.
|
java.lang.String |
deleteDocumentAs(java.lang.String nodeType,
int nodeId,
java.lang.String documentName,
java.lang.String outputFormat)
Deletes the document with the given documentName of the specified nodeId
of nodeType.
|
RequestStatus |
deleteDocuments(java.util.List<java.lang.Integer> documentIds)
Documents with the specified List of DocumentIds are deleted.
|
RequestStatus |
deleteDocuments(Node.NodeType nodeType,
int nodeId)
Deletes the documents of the specified nodeId of nodeType.
|
java.lang.String |
deleteDocumentsAs(java.lang.String nodeType,
int nodeId,
java.lang.String outputFormat)
Deletes the documents of the specified nodeId of nodeType.
|
java.lang.String |
deleteDocumentsAs(java.lang.String documentsIdsJson,
java.lang.String outputFormat)
Documents are deleted for the specified List of DocumentIds
outputFormat can be either JSON or XML. |
Document |
getDocument(int documentId)
Returns the Document Details with the specified documentId.
|
Document |
getDocument(Node.NodeType nodeType,
int nodeId,
java.lang.String documentName)
Returns the document Details with the given documentName of the
specified nodeId of nodeType.
|
java.lang.String |
getDocumentAs(int documentId,
java.lang.String outputFormat)
Returns the Document Details with the specified documentId.
|
java.lang.String |
getDocumentAs(java.lang.String nodeType,
int nodeId,
java.lang.String documentName,
java.lang.String outputFormat)
Returns the document Details with the given documentName of the specified
nodeId of nodeType.
|
java.util.List<Document> |
getDocuments(java.util.List<java.lang.Integer> documentIds)
Returns the Documents of the specified List of DocumentIds.
|
java.util.List<Document> |
getDocuments(Node.NodeType nodeType,
int nodeId)
Returns the documents of the specified nodeId of nodeType.
|
java.lang.String |
getDocumentsAs(java.lang.String nodeType,
int nodeId,
java.lang.String outputFormat)
Returns the documents of the specified nodeId of nodeType.
|
java.lang.String |
getDocumentsAs(java.lang.String documentIdsArray,
java.lang.String outputFormat)
Returns the Documents of the specified List of DocumentIds.
|
RequestStatus |
updateDocument(Document document)
Updates Document with the specified document Object.
|
RequestStatus |
updateDocument(Node.NodeType nodeType,
int nodeId,
java.lang.String documentName,
Document document)
Specified documentName is updated with the document Details, of the
given nodeId of nodeType.
|
RequestStatus |
updateDocument(Node.NodeType nodeType,
int nodeId,
java.lang.String documentName,
java.lang.String filePath)
Deprecated.
|
RequestStatus |
updateDocument(Node.NodeType nodeType,
int nodeId,
java.lang.String documentName,
java.lang.String filePath,
APIConstants.FilePathType filePathType)
File of the document is updated with the given documentName and with the filePath and
filePathType specified.The supported values for the filePathType are
ABSOLUTE, RELATIVE.
|
java.lang.String |
updateDocumentAs(java.lang.String nodeType,
int nodeId,
java.lang.String documentName,
java.lang.String documentObjJson,
java.lang.String outputFormat)
Document File with the given documentName will be updated with the
filePath specified, of the specified nodeId of nodeType.
|
java.lang.String |
updateDocumentAs(java.lang.String documentObjJson,
java.lang.String outputFormat)
Updates Document with the specified document Object.
|
java.lang.String |
updateDocumentFileAs(java.lang.String nodeType,
int nodeId,
java.lang.String documentName,
java.lang.String filePath,
java.lang.String outputFormat)
Document File of the document is updated with the given documentName and
with the filePath specified, of the specified nodeId of nodeType.
|
java.lang.String |
updateDocumentFileByTypeAs(java.lang.String nodeType,
int nodeId,
java.lang.String documentName,
java.lang.String filePath,
java.lang.String filePathType,
java.lang.String outputFormat)
File of the document is updated with the given documentName and
with the filePath and filePathType specified, of the specified nodeId of
nodeType.
|
RequestStatus |
updateDocuments(java.util.List<Document> documents)
Documents are updated with the specified Document Objects.
|
java.lang.String |
updateDocumentsAs(java.lang.String documentsObjJson,
java.lang.String outputFormat)
Documents are updated with the specified Document Objects.
|
public DocumentUtil(java.lang.String token)
public DocumentUtil(java.lang.String tokenType, java.lang.String token)
public RequestStatus addDocument(Node.NodeType nodeType, int nodeId, Document document)
nodeType
- NodenodeId
- intdocument
- Documentpublic RequestStatus addDocuments(Node.NodeType nodeType, int nodeId, java.util.List<Document> documents)
nodeType
- NodenodeId
- intdocuments
- Listpublic RequestStatus updateDocument(Document document)
document
- Documentpublic RequestStatus updateDocument(Node.NodeType nodeType, int nodeId, java.lang.String documentName, Document document)
nodeType
- NodenodeId
- intdocumentName
- Stringdocument
- Document Objectpublic RequestStatus updateDocument(Node.NodeType nodeType, int nodeId, java.lang.String documentName, java.lang.String filePath)
nodeType
- NodenodeId
- intdocumentName
- StringfilePath
- Stringpublic RequestStatus updateDocuments(java.util.List<Document> documents)
documents
- Listpublic Document getDocument(int documentId) throws DAOException, PermissionDeniedException
documentId
- intDAOException
PermissionDeniedException
public Document getDocument(Node.NodeType nodeType, int nodeId, java.lang.String documentName) throws DAOException, PermissionDeniedException
nodeType
- NodenodeId
- intdocumentName
- StringDAOException
PermissionDeniedException
public java.util.List<Document> getDocuments(Node.NodeType nodeType, int nodeId) throws DAOException, PermissionDeniedException
nodeType
- NodenodeId
- intDAOException
PermissionDeniedException
public java.util.List<Document> getDocuments(java.util.List<java.lang.Integer> documentIds) throws DAOException, PermissionDeniedException
documentIds
- ListDAOException
PermissionDeniedException
public RequestStatus deleteDocument(int documentId)
documentId
- intpublic RequestStatus deleteDocument(Node.NodeType nodeType, int nodeId, java.lang.String documentName)
nodeType
- NodenodeId
- intdocumentName
- Stringpublic RequestStatus deleteDocuments(Node.NodeType nodeType, int nodeId)
nodeType
- NodenodeId
- intpublic RequestStatus deleteDocuments(java.util.List<java.lang.Integer> documentIds) throws DAOException, PermissionDeniedException
documentIds
- ListDAOException
PermissionDeniedException
public java.lang.String addDocumentAs(java.lang.String nodeType, int nodeId, java.lang.String document, java.lang.String outputFormat)
nodeType
- StringnodeId
- intdocument
- StringoutputFormat
- String - Valid values: JSON or XML
Sample 'document' JSON :
{
"documentName": "",
"documentIntendedPurpose": "",
"documentReferenceNumber": "",
"documentType": "",
"documentApprovedBy": "",
"documentObject": "",
"filePathType" : "",
"approvalRequired": true,
"documentOwner": "",
"documentLink": "",
"documentReference": "",
"documentStatus": "",
"documentApprovedDate": 1460701213000
}
public java.lang.String addDocumentsAs(java.lang.String nodeType, int nodeId, java.lang.String documentsObjJson, java.lang.String outputFormat)
nodeType
- StringnodeId
- intdocumentsObjJson
- StringoutputFormat
- String - Valid values: JSON or XML
Sample 'documentsObjJson' JSON :
[
{
"documentName": "",
"documentIntendedPurpose": "",
"documentReferenceNumber": "",
"documentType": "",
"documentApprovedBy": "",
"documentObject": "",
"filePathType" : "",
"approvalRequired": true,
"documentOwner": "",
"documentLink": "",
"documentReference": "",
"documentStatus": "",
"documentApprovedDate": 1460701213000
},
{
"documentName": "",
"documentIntendedPurpose": "",
"documentReferenceNumber": "",
"documentType": "",
"documentApprovedBy": "",
"documentObject": "",
"approvalRequired": true,
"documentOwner": "",
"documentLink": "",
"documentReference": "",
"documentStatus": "",
"documentApprovedDate": 1460701213000
}
]
public java.lang.String updateDocumentAs(java.lang.String documentObjJson, java.lang.String outputFormat)
outputFormat
- String - Valid values: JSON or XMLdocumentObjJson
-
Sample 'documentObjJson' JSON :
{
"documentId": 0,
"documentName": "",
"documentIntendedPurpose": "",
"documentReferenceNumber": "",
"documentType": "",
"documentApprovedBy": "",
"documentObject": "",
"filePathType" : "",
"approvalRequired": true,
"documentOwner": "",
"documentLink": "",
"documentReference": "",
"documentStatus": "",
"documentApprovedDate": 1460701213000
}
public java.lang.String updateDocumentAs(java.lang.String nodeType, int nodeId, java.lang.String documentName, java.lang.String documentObjJson, java.lang.String outputFormat)
nodeType
- StringnodeId
- intdocumentName
- StringdocumentObjJson
- StringoutputFormat
- String - Valid values: JSON or XML
Sample 'documentObjJson' JSON :
{
"documentName": "",
"documentIntendedPurpose": "",
"documentReferenceNumber": "",
"documentType": "",
"documentApprovedBy": "",
"documentObject": "",
"filePathType" : "",
"approvalRequired": true,
"documentOwner": "",
"documentLink": "",
"documentReference": "",
"documentStatus": "",
"documentApprovedDate": 1460701213000
}
public java.lang.String updateDocumentFileAs(java.lang.String nodeType, int nodeId, java.lang.String documentName, java.lang.String filePath, java.lang.String outputFormat)
nodeType
- StringnodeId
- intdocumentName
- StringfilePath
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String updateDocumentsAs(java.lang.String documentsObjJson, java.lang.String outputFormat)
documentsObjJson
- StringoutputFormat
- String - Valid values: JSON or XML
Sample 'documentsObjJson' JSON :
[
{
"documentId": 0,
"documentName": "",
"documentIntendedPurpose": "",
"documentReferenceNumber": "",
"documentType": "",
"documentApprovedBy": "",
"documentObject": "",
"filePathType" : "",
"approvalRequired": true,
"documentOwner": "",
"documentLink": "",
"documentReference": "",
"documentStatus": "",
"documentApprovedDate": 1460701213000
},
{
"documentId": 0,
"documentName": "",
"documentIntendedPurpose": "",
"documentReferenceNumber": "",
"documentType": "",
"documentApprovedBy": "",
"documentObject": "",
"approvalRequired": true,
"documentOwner": "",
"documentLink": "",
"documentReference": "",
"documentStatus": "",
"documentApprovedDate": 1460701213000
}
]
public java.lang.String getDocumentAs(int documentId, java.lang.String outputFormat)
documentId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getDocumentAs(java.lang.String nodeType, int nodeId, java.lang.String documentName, java.lang.String outputFormat)
nodeType
- StringnodeId
- intdocumentName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getDocumentsAs(java.lang.String nodeType, int nodeId, java.lang.String outputFormat)
nodeType
- StringnodeId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String getDocumentsAs(java.lang.String documentIdsArray, java.lang.String outputFormat)
documentIdsArray
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String deleteDocumentAs(int documentId, java.lang.String outputFormat)
documentId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String deleteDocumentAs(java.lang.String nodeType, int nodeId, java.lang.String documentName, java.lang.String outputFormat)
nodeType
- StringnodeId
- intdocumentName
- StringoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String deleteDocumentsAs(java.lang.String nodeType, int nodeId, java.lang.String outputFormat)
nodeType
- StringnodeId
- intoutputFormat
- String - Valid values: JSON or XMLpublic java.lang.String deleteDocumentsAs(java.lang.String documentsIdsJson, java.lang.String outputFormat)
documentsIdsJson
- StringoutputFormat
- String - Valid values: JSON or XMLpublic RequestStatus updateDocument(Node.NodeType nodeType, int nodeId, java.lang.String documentName, java.lang.String filePath, APIConstants.FilePathType filePathType)
nodeType
- NodenodeId
- intdocumentName
- StringfilePath
- StringfilePathType
- FilePathTypepublic java.lang.String updateDocumentFileByTypeAs(java.lang.String nodeType, int nodeId, java.lang.String documentName, java.lang.String filePath, java.lang.String filePathType, java.lang.String outputFormat)
nodeType
- StringnodeId
- intdocumentName
- StringfilePath
- StringfilePathType
- String - Valid values: ABSOLUTE or RELATIVEoutputFormat
- String - Valid values: JSON or XML