public class FilesApi extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Pattern |
MESSAGE_PATTERN |
protected com.xero.model.ObjectFactory |
objFactory |
protected static DateFormat |
utcFormatter |
| Constructor and Description |
|---|
FilesApi(ApiClient apiClient) |
FilesApi(Config config) |
FilesApi(Config config,
SignerFactory signerFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToMapIfNotNull(Map<String,String> map,
String key,
Object value) |
Association |
createFileAssociation(UUID fileId,
Association association)
create a new association
By passing in the appropriate options, you can create a new folder
|
Folder |
createFolder(Folder folder)
create a new folder
By passing in the appropriate properties, you can create a new folder
|
protected String |
DATA(String url,
String body,
Map<String,String> params,
String method) |
protected String |
DATA(String url,
String body,
Map<String,String> params,
String method,
org.threeten.bp.OffsetDateTime ifModifiedSince) |
protected String |
DATA(String url,
String body,
Map<String,String> params,
String method,
org.threeten.bp.OffsetDateTime ifModifiedSince,
String contentType) |
protected String |
DATA(String url,
String body,
Map<String,String> params,
String method,
String contentType) |
protected String |
DATA(String url,
String body,
Map<String,String> params,
String method,
String xeroApplicationId,
String xeroTenantId,
String xeroUserId) |
FileResponse204 |
deleteFile(UUID fileId)
delete a file
Delete a specific file
|
FileResponse204 |
deleteFileAssociation(UUID fileId,
UUID objectId)
create a new association
By passing in the appropriate options, you can create a new folder
|
FileResponse204 |
deleteFolder(UUID folderId)
delete a folder
By passing in the appropriate ID, you can delete a folder
|
protected ByteArrayInputStream |
FILE(String url,
String body,
Map<String,String> params,
String method) |
protected String |
FILE(String url,
String body,
Map<String,String> params,
String method,
byte[] byteBody) |
protected String |
FILE(String url,
String body,
Map<String,String> params,
String method,
byte[] byteBody,
String contentType) |
protected ByteArrayInputStream |
FILE(String url,
String body,
Map<String,String> params,
String method,
String accept) |
ApiClient |
getApiClient() |
List<Association> |
getAssociationsByObject(UUID objectId)
searches files
By passing in the appropriate options,
|
FileObject |
getFile(UUID fileId)
searches for file by unique id
|
List<Association> |
getFileAssociations(UUID fileId)
searches files
By passing in the appropriate options,
|
ByteArrayInputStream |
getFileContent(UUID fileId)
searches files to retrieve the data
By passing in the appropriate options, retrieve data for specific file
|
Files |
getFiles(Integer pagesize,
Integer page,
String sort)
searches files
|
Folder |
getFolder(UUID folderId)
searches specific folder by id
By passing in the appropriate ID, you can search for specific folder
|
List<Folder> |
getFolders(String sort)
searches folder
By passing in the appropriate options, you can search for available folders
|
Folder |
getInbox()
searches inbox folder
Search for the user inbox
|
void |
setApiClient(ApiClient apiClient) |
void |
setOAuthToken(String token,
String tokenSecret) |
FileObject |
updateFile(UUID fileId,
FileObject fileObject)
Update a file
Update properties on a single file
|
Folder |
updateFolder(UUID folderId,
Folder folder)
update folder
By passing in the appropriate ID and properties, you can update a folder
|
FileObject |
uploadFile(UUID folderId,
byte[] body,
String name,
String filename,
String mimeType)
upload an File
|
protected static final DateFormat utcFormatter
protected static final Pattern MESSAGE_PATTERN
protected final com.xero.model.ObjectFactory objFactory
public FilesApi(Config config)
public FilesApi(Config config, SignerFactory signerFactory)
public FilesApi(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
protected String DATA(String url, String body, Map<String,String> params, String method) throws IOException
IOExceptionprotected String DATA(String url, String body, Map<String,String> params, String method, org.threeten.bp.OffsetDateTime ifModifiedSince) throws IOException
IOExceptionprotected String DATA(String url, String body, Map<String,String> params, String method, String contentType) throws IOException
IOExceptionprotected String DATA(String url, String body, Map<String,String> params, String method, org.threeten.bp.OffsetDateTime ifModifiedSince, String contentType) throws IOException
IOExceptionprotected String DATA(String url, String body, Map<String,String> params, String method, String xeroApplicationId, String xeroTenantId, String xeroUserId) throws IOException
IOExceptionprotected ByteArrayInputStream FILE(String url, String body, Map<String,String> params, String method) throws IOException
IOExceptionprotected ByteArrayInputStream FILE(String url, String body, Map<String,String> params, String method, String accept) throws IOException
IOExceptionprotected String FILE(String url, String body, Map<String,String> params, String method, byte[] byteBody) throws IOException
IOExceptionprotected String FILE(String url, String body, Map<String,String> params, String method, byte[] byteBody, String contentType) throws IOException
IOExceptionpublic Association createFileAssociation(UUID fileId, Association association) throws IOException
200 - A successful request
400 - bad input parameter - TODO
fileId - File id for single objectassociation - The association parameterIOException - if an error occurs while attempting to invoke the APIpublic Folder createFolder(Folder folder) throws IOException
200 - search results matching criteria
400 - bad input parameter - TODO
folder - The folder parameterIOException - if an error occurs while attempting to invoke the APIpublic FileResponse204 deleteFile(UUID fileId) throws IOException
204 - A successful request returns 204 empty response - populate with status property in SDK
fileId - File id for single objectIOException - if an error occurs while attempting to invoke the APIpublic FileResponse204 deleteFileAssociation(UUID fileId, UUID objectId) throws IOException
204 - A successful request
400 - bad input parameter - TODO
fileId - File id for single objectobjectId - Object id for single objectIOException - if an error occurs while attempting to invoke the APIpublic FileResponse204 deleteFolder(UUID folderId) throws IOException
204 - A successful request
400 - bad input parameter - TODO
folderId - Folder id for single objectIOException - if an error occurs while attempting to invoke the APIpublic List<Association> getAssociationsByObject(UUID objectId) throws IOException
200 - search results matching criteria
objectId - Object id for single objectIOException - if an error occurs while attempting to invoke the APIpublic FileObject getFile(UUID fileId) throws IOException
200 - search results matching criteria
fileId - File id for single objectIOException - if an error occurs while attempting to invoke the APIpublic List<Association> getFileAssociations(UUID fileId) throws IOException
200 - search results matching criteria
fileId - File id for single objectIOException - if an error occurs while attempting to invoke the APIpublic ByteArrayInputStream getFileContent(UUID fileId) throws IOException
200 - search results matching criteria
fileId - File id for single objectIOException - if an error occurs while attempting to invoke the APIpublic Files getFiles(Integer pagesize, Integer page, String sort) throws IOException
200 - search results matching criteria
400 - bad input parameter - TODO
pagesize - pass an optional page size valuepage - number of records to skip for paginationsort - values to sort byIOException - if an error occurs while attempting to invoke the APIpublic Folder getFolder(UUID folderId) throws IOException
200 - search results matching criteria
400 - bad input parameter - TODO
folderId - Folder id for single objectIOException - if an error occurs while attempting to invoke the APIpublic List<Folder> getFolders(String sort) throws IOException
200 - search results matching criteria
400 - bad input parameter - TODO
sort - values to sort byIOException - if an error occurs while attempting to invoke the APIpublic Folder getInbox() throws IOException
200 - search results matching criteria
400 - bad input parameter - TODO
IOException - if an error occurs while attempting to invoke the APIpublic FileObject updateFile(UUID fileId, FileObject fileObject) throws IOException
200 - A successful request
fileId - File id for single objectfileObject - The fileObject parameterIOException - if an error occurs while attempting to invoke the APIpublic Folder updateFolder(UUID folderId, Folder folder) throws IOException
200 - return the updated object
400 - bad input parameter - TODO
folderId - Folder id for single objectfolder - The folder parameterIOException - if an error occurs while attempting to invoke the APIpublic FileObject uploadFile(UUID folderId, byte[] body, String name, String filename, String mimeType) throws IOException
200 - A successful request
400 - invalid input, object invalid - TODO
409 - an existing item already exists - TODO
folderId - pass an optional folder id to save file to specific folderbody - The body parametername - The name parameterfilename - The filename parametermimeType - The mimeType parameterIOException - if an error occurs while attempting to invoke the APICopyright © 2019. All rights reserved.