Package anderix.otcs
Class OtcsClient
java.lang.Object
anderix.otcs.OtcsClient
-
Constructor Summary
ConstructorDescriptionOtcsClient
(String contentServerUrl) OtcsClient
(String contentServerUrl, String username) OtcsClient
(String contentServerUrl, String username, String password) -
Method Summary
Modifier and TypeMethodDescriptionconnect()
createFolder
(long parentId, String name) long
createFolderAndGetId
(long parentId, String name) createNode
(long nodeType, long parentId, String name) long
createNodeAndGetId
(long nodeType, long parentId, String name) deleteNode
(long nodeId) void
downloadDocument
(long nodeId, String localFilePath) void
downloadFolderContents
(long nodeId, String localFolderPath) OtcsNode[]
getChildren
(long nodeId) getChildrenJson
(long nodeId) OtcsNode[]
long
getNodeIdFromJson
(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) void
setContentServerUrl
(String contentServerUrl) void
setPassword
(String password) void
setUsername
(String username) uploadDocument
(long folderId, String filename, File file) uploadDocument
(long folderId, String filename, String filepath) long
uploadDocumentAndGetId
(long folderId, String filename, File file) long
uploadDocumentAndGetId
(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:
MalformedURLException
IOException
-
-
Method Details
-
getToken
-
getContentServerUrl
-
setContentServerUrl
-
getUsername
-
setUsername
-
setPassword
-
connect
- Throws:
MalformedURLException
IOException
-
restGet
- Throws:
MalformedURLException
IOException
-
restGet
- Throws:
MalformedURLException
IOException
-
restPost
- Throws:
MalformedURLException
IOException
-
restPut
- Throws:
MalformedURLException
IOException
-
restDelete
- Throws:
MalformedURLException
IOException
-
getNodeIdFromJson
-
createNodeAndGetId
public long createNodeAndGetId(long nodeType, long parentId, String name) throws MalformedURLException, IOException - Throws:
MalformedURLException
IOException
-
createNode
public String createNode(long nodeType, long parentId, String name) throws MalformedURLException, IOException - Throws:
MalformedURLException
IOException
-
createFolderAndGetId
public long createFolderAndGetId(long parentId, String name) throws MalformedURLException, IOException - Throws:
MalformedURLException
IOException
-
createFolder
- Throws:
MalformedURLException
IOException
-
uploadDocumentAndGetId
public long uploadDocumentAndGetId(long folderId, String filename, String filepath) throws MalformedURLException, IOException - Throws:
MalformedURLException
IOException
-
uploadDocumentAndGetId
public long uploadDocumentAndGetId(long folderId, String filename, File file) throws MalformedURLException, IOException - Throws:
MalformedURLException
IOException
-
uploadDocument
public String uploadDocument(long folderId, String filename, String filepath) throws MalformedURLException, IOException - Throws:
MalformedURLException
IOException
-
uploadDocument
public String uploadDocument(long folderId, String filename, File file) throws MalformedURLException, IOException - Throws:
MalformedURLException
IOException
-
downloadDocument
public void downloadDocument(long nodeId, String localFilePath) throws MalformedURLException, IOException - Throws:
MalformedURLException
IOException
-
downloadFolderContents
public void downloadFolderContents(long nodeId, String localFolderPath) throws MalformedURLException, IOException - Throws:
MalformedURLException
IOException
-
renameNode
- Throws:
MalformedURLException
IOException
-
moveNode
- Throws:
MalformedURLException
IOException
-
deleteNode
- Throws:
MalformedURLException
IOException
-
removePublicAccess
- Throws:
MalformedURLException
IOException
-
getEnterpriseChildrenJson
- Throws:
MalformedURLException
IOException
-
getEnterpriseChildren
- Throws:
MalformedURLException
IOException
-
getChildrenJson
- Throws:
MalformedURLException
IOException
-
getChildren
- Throws:
MalformedURLException
IOException
-
getPermissionsJson
- Throws:
MalformedURLException
IOException
-
getPermissions
- Throws:
MalformedURLException
IOException
-