Package anderix.otcs
Class OtcsClient
java.lang.Object
anderix.otcs.OtcsClient
-
Constructor Summary
ConstructorsConstructorDescriptionOtcsClient(String contentServerUrl) OtcsClient(String contentServerUrl, String username) OtcsClient(String contentServerUrl, String username, String password) -
Method Summary
Modifier and TypeMethodDescriptionconnect()createFolder(long parentId, String name) longcreateFolderAndGetId(long parentId, String name) createNode(long nodeType, long parentId, String name) longcreateNodeAndGetId(long nodeType, long parentId, String name) deleteNode(long nodeId) voiddownloadDocument(long nodeId, String localFilePath) voiddownloadFolderContents(long nodeId, String localFolderPath) OtcsNode[]getChildren(long nodeId) getChildrenJson(long nodeId) OtcsNode[]longgetNodeIdFromJson(String json) getPermissions(long nodeId) getPermissionsJson(long nodeId) getToken()moveNode(long nodeId, long newParent) removePublicAccess(long nodeId) renameNode(long nodeId, String newName) restDelete(String url) voidsetContentServerUrl(String contentServerUrl) voidsetPassword(String password) voidsetUsername(String username) uploadDocument(long folderId, String filename, File file) uploadDocument(long folderId, String filename, String filepath) longuploadDocumentAndGetId(long folderId, String filename, File file) longuploadDocumentAndGetId(long folderId, String filename, String filepath)
-
Constructor Details
-
OtcsClient
public OtcsClient() -
OtcsClient
-
OtcsClient
-
OtcsClient
public OtcsClient(String contentServerUrl, String username, String password) throws MalformedURLException, IOException - Throws:
MalformedURLExceptionIOException
-
-
Method Details
-
getToken
-
getContentServerUrl
-
setContentServerUrl
-
getUsername
-
setUsername
-
setPassword
-
connect
- Throws:
MalformedURLExceptionIOException
-
restGet
- Throws:
MalformedURLExceptionIOException
-
restGet
- Throws:
MalformedURLExceptionIOException
-
restPost
- Throws:
MalformedURLExceptionIOException
-
restPut
- Throws:
MalformedURLExceptionIOException
-
restDelete
- Throws:
MalformedURLExceptionIOException
-
getNodeIdFromJson
-
createNodeAndGetId
public long createNodeAndGetId(long nodeType, long parentId, String name) throws MalformedURLException, IOException - Throws:
MalformedURLExceptionIOException
-
createNode
public String createNode(long nodeType, long parentId, String name) throws MalformedURLException, IOException - Throws:
MalformedURLExceptionIOException
-
createFolderAndGetId
public long createFolderAndGetId(long parentId, String name) throws MalformedURLException, IOException - Throws:
MalformedURLExceptionIOException
-
createFolder
- Throws:
MalformedURLExceptionIOException
-
uploadDocumentAndGetId
public long uploadDocumentAndGetId(long folderId, String filename, String filepath) throws MalformedURLException, IOException - Throws:
MalformedURLExceptionIOException
-
uploadDocumentAndGetId
public long uploadDocumentAndGetId(long folderId, String filename, File file) throws MalformedURLException, IOException - Throws:
MalformedURLExceptionIOException
-
uploadDocument
public String uploadDocument(long folderId, String filename, String filepath) throws MalformedURLException, IOException - Throws:
MalformedURLExceptionIOException
-
uploadDocument
public String uploadDocument(long folderId, String filename, File file) throws MalformedURLException, IOException - Throws:
MalformedURLExceptionIOException
-
downloadDocument
public void downloadDocument(long nodeId, String localFilePath) throws MalformedURLException, IOException - Throws:
MalformedURLExceptionIOException
-
downloadFolderContents
public void downloadFolderContents(long nodeId, String localFolderPath) throws MalformedURLException, IOException - Throws:
MalformedURLExceptionIOException
-
renameNode
- Throws:
MalformedURLExceptionIOException
-
moveNode
- Throws:
MalformedURLExceptionIOException
-
deleteNode
- Throws:
MalformedURLExceptionIOException
-
removePublicAccess
- Throws:
MalformedURLExceptionIOException
-
getEnterpriseChildrenJson
- Throws:
MalformedURLExceptionIOException
-
getEnterpriseChildren
- Throws:
MalformedURLExceptionIOException
-
getChildrenJson
- Throws:
MalformedURLExceptionIOException
-
getChildren
- Throws:
MalformedURLExceptionIOException
-
getPermissionsJson
- Throws:
MalformedURLExceptionIOException
-
getPermissions
- Throws:
MalformedURLExceptionIOException
-