public interface FileResource extends AuthenticatedResource
Modifier and Type | Field and Description |
---|---|
static String |
META_DATA_BODY_PART_KEY_CUSTOM_PARAMETER_NAME |
static String |
META_DATA_DESCRIPTION_KEY |
static String |
META_DATA_FILE_NAME_KEY |
static String |
META_DATA_FOLDERID_KEY |
static String |
META_DATA_NODE_ID_KEY |
static String |
META_DATA_OVERWRITE_KEY |
static String |
QQFILE_FILENAME_PARAMETER_NAME
GET parameter name for qqfile's filename
|
Modifier and Type | Method and Description |
---|---|
FileUploadResponse |
copyFile(FileCopyRequest request)
Create a copy of the given file.
|
FileUploadResponse |
create(com.sun.jersey.multipart.MultiPart multiPart)
Create a new file handling multipart form-data.
|
FileUploadResponse |
createSimple(javax.servlet.http.HttpServletRequest request,
int folderId,
int nodeId,
String customBodyPartKeyName,
String fileName,
String description,
boolean overwrite)
Create a new file handling simple post data
|
FileUploadResponse |
createSimpleMultiPartFallback(com.sun.jersey.multipart.MultiPart multiPart,
javax.servlet.http.HttpServletRequest request,
String folderId,
String customBodyPartName,
String qqFileUploaderFileName,
String description,
boolean overwrite)
Create a new file handling simple post data
|
GenericResponse |
delete(String id,
Integer nodeId)
Delete the file denoted by id
|
GenericResponse |
deleteFromWastebin(IdSetRequest request,
long waitMs)
Remove the given files from the wastebin
|
GenericResponse |
deleteFromWastebin(String id,
long waitMs)
Remove the file denoted by the given id from the wastebin.
|
MultiDisinheritResponse |
disinherit(List<String> ids,
Integer nodeId)
Get the multichannelling exclusion and disinherit status for a list of pages
|
GenericResponse |
disinherit(List<String> ids,
Integer nodeId,
long waitMs,
DisinheritRequest request)
Set the multichannelling exclusion and disinherit status for a list of pages
|
DisinheritResponse |
disinherit(String id,
Integer nodeId)
Get the multichannelling exclusion and disinherit status of the file
|
GenericResponse |
disinherit(String id,
Integer nodeId,
long waitMs,
DisinheritRequest request)
Set the multichannelling exclusion and disinherit status
|
FileUsageListResponse |
getFileUsageInfo(Integer skipCount,
Integer maxItems,
String sortBy,
String sortOrder,
List<Integer> fileId,
Integer nodeId,
boolean returnFiles)
Get the files using one of the given files
|
FolderUsageListResponse |
getFolderUsageInfo(Integer skipCount,
Integer maxItems,
String sortBy,
String sortOrder,
List<Integer> fileId,
Integer nodeId,
boolean returnFolders)
Get the folders using one of the given files.
|
FileUsageListResponse |
getImageUsageInfo(Integer skipCount,
Integer maxItems,
String sortBy,
String sortOrder,
List<Integer> fileId,
Integer nodeId,
boolean returnImages)
Get the images using one of the given files
|
LocalizationInfo |
getLocalizationInfo(Integer id,
Integer nodeId)
Get localization info for a file for a given channel and all master channels
|
LocalizationInfo |
getLocalizationInfo(List<Integer> ids,
Integer nodeId)
Get localization info for a list of files for a given channel and all master channels
|
PageUsageListResponse |
getPageUsageInfo(Integer skipCount,
Integer maxItems,
String sortBy,
String sortOrder,
List<Integer> fileId,
Integer nodeId,
boolean returnPages,
boolean template,
boolean folder,
boolean languageVariants)
Get the pages using one of the given files
|
PrivilegesResponse |
getPrivileges(Integer id)
Get the privileges of the current user on the given file
|
TemplateUsageListResponse |
getTemplateUsageInfo(Integer skipCount,
Integer maxItems,
String sortBy,
String sortOrder,
List<Integer> fileId,
Integer nodeId,
boolean returnTemplates)
Get the templates using one of the given files
|
TotalUsageResponse |
getTotalUsageInfo(List<Integer> fileId,
Integer nodeId)
Get the total usage information for the given files.
|
MultiFileLoadResponse |
load(MultiObjectLoadRequest request)
Load a list of files specified in the given
request . |
FileLoadResponse |
load(String id,
boolean update,
Integer nodeId)
Load the file (without data)
|
javax.ws.rs.core.Response |
loadContent(String id)
Load the file with given id
|
LocalizationsResponse |
localizations(Integer id)
Get the IDs an their respective node IDs of localized copies of the
specified file.
|
GenericResponse |
localize(Integer id,
LocalizeRequest request)
Localize the given file
|
GenericResponse |
move(MultiObjectMoveRequest request)
Move multiple files to another folder
|
GenericResponse |
move(String id,
ObjectMoveRequest request)
Mpve the given file to another folder
|
GenericResponse |
pushToMaster(Integer id,
PushToMasterRequest request)
Push a file from a channel into a master
|
GenericResponse |
pushToMaster(MultiPushToMasterRequest request)
Push a list of pages from a channel into a master
|
GenericResponse |
restoreFromWastebin(IdSetRequest request,
long waitMs)
Restore the given files from the wastebin
|
GenericResponse |
restoreFromWastebin(String id,
long waitMs)
Restore the given file from the wastebin
|
GenericResponse |
save(Integer id,
FileSaveRequest request)
Save the given file
|
GenericResponse |
save(Integer id,
com.sun.jersey.multipart.MultiPart multiPart)
Save the posted content into the given file
|
GenericResponse |
unlocalize(Integer id,
UnlocalizeRequest request)
Unlocalize the given file
|
GenericResponse |
unlocalize(MultiUnlocalizeRequest request)
Unlocalize files in a channel
|
setSessionId
static final String QQFILE_FILENAME_PARAMETER_NAME
static final String META_DATA_FOLDERID_KEY
static final String META_DATA_DESCRIPTION_KEY
static final String META_DATA_FILE_NAME_KEY
static final String META_DATA_NODE_ID_KEY
static final String META_DATA_OVERWRITE_KEY
static final String META_DATA_BODY_PART_KEY_CUSTOM_PARAMETER_NAME
javax.ws.rs.core.Response loadContent(String id)
id
- file id. This can either be the localid or a globalidFileLoadResponse load(String id, boolean update, Integer nodeId)
id
- id of the fileupdate
- true when the file is fetched for updating. Currently, files
cannot be locked in the backend, but it is still recommended
to set this parameter to true when the file shall be modified.nodeId
- id of the node (channel) for which the image shall be
loaded (when multichannelling is used).MultiFileLoadResponse load(MultiObjectLoadRequest request)
request
.
File ids for which no files exist, or the user does not have the necessary
permissions, are silently ignored.request
- The request with he list of file ids to load.FileUploadResponse createSimpleMultiPartFallback(com.sun.jersey.multipart.MultiPart multiPart, @Context javax.servlet.http.HttpServletRequest request, String folderId, String customBodyPartName, String qqFileUploaderFileName, String description, boolean overwrite)
multiPart
- multipart/form-data request datarequest
- request with data for the file to be createdfolderId
- Folder ID where to save the file innodeId
- Node IDcustomBodyPartKeyName
- fileName
- File namedescription
- File descriptionFileUploadResponse createSimple(@Context javax.servlet.http.HttpServletRequest request, int folderId, int nodeId, String customBodyPartKeyName, String fileName, String description, boolean overwrite)
request
- request with data for the file to be createdfolderId
- Folder ID where to save the file innodeId
- Node IDcustomBodyPartKeyName
- fileName
- File namedescription
- File descriptionovewrite
- Whether a file with the same name would be overwrittenFileUploadResponse create(com.sun.jersey.multipart.MultiPart multiPart)
multiPart
- request with data for the file to be createdFileUploadResponse copyFile(FileCopyRequest request)
request
- GenericResponse move(String id, ObjectMoveRequest request)
id
- file idrequest
- requestGenericResponse move(MultiObjectMoveRequest request)
request
- requestGenericResponse save(Integer id, FileSaveRequest request)
request
- request with the file to be savedGenericResponse save(Integer id, com.sun.jersey.multipart.MultiPart multiPart)
id
- id of the filemultiPart
- request with data for the file to be createdGenericResponse delete(String id, Integer nodeId)
id
- id of the File to deletenodeId
- id of the node (channel) of the fileGenericResponse deleteFromWastebin(String id, long waitMs)
id
- id of the file to remove from the wastebin. This can either be
a local or global idwaitMs
- time in ms for the request to be done in foregroundGenericResponse deleteFromWastebin(IdSetRequest request, long waitMs)
request
- request containing the file IDswaitMs
- time in ms for the request to be done in foregroundGenericResponse restoreFromWastebin(String id, long waitMs)
id
- id of the file to restore from the wastebin. This can either
be a local or global idwaitMs
- time in ms for the request to be done in foregroundGenericResponse restoreFromWastebin(IdSetRequest request, long waitMs)
request
- request containing the file IDswaitMs
- time in ms for the request to be done in foregroundPrivilegesResponse getPrivileges(Integer id)
id
- id of the fileTotalUsageResponse getTotalUsageInfo(List<Integer> fileId, Integer nodeId)
nodeId
- id of the nodenodeId
- id of the nodeFolderUsageListResponse getFolderUsageInfo(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> fileId, Integer nodeId, boolean returnFolders)
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssortby
- (optional) attribute to sort by. defaults to namesortorder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults
to "asc".fileId
- list of file ids, for which the usage shall be fetchednodeId
- id of the nodereturnFolders
- true (default) if the folders shall be returned, false for only returning the countsPageUsageListResponse getPageUsageInfo(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> fileId, Integer nodeId, boolean returnPages, boolean template, boolean folder, boolean languageVariants)
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssortby
- (optional) attribute to sort by. defaults to namesortorder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults
to "asc".fileId
- list of file ids, for which the usage shall be fetchednodeId
- id of the nodereturnPages
- true (default) if the pages shall be returned, false for only returning the countstemplate
- true for adding template info to the pages, default is falsefolder
- true for adding folder info to the pages, default is falselanguageVariants
- true for adding the language variants to the pages, default is falseTemplateUsageListResponse getTemplateUsageInfo(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> fileId, Integer nodeId, boolean returnTemplates)
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssortby
- (optional) attribute to sort by. defaults to namesortorder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults
to "asc".fileId
- list of file ids, for which the usage shall be fetchednodeId
- id of the nodereturnTemplates
- true (default) if the templates shall be returned, false for only returning the countsFileUsageListResponse getImageUsageInfo(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> fileId, Integer nodeId, boolean returnImages)
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssortby
- (optional) attribute to sort by. defaults to namesortorder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults
to "asc".fileId
- list of file ids, for which the usage shall be fetchednodeId
- id of the nodereturnImages
- true (default) if the files shall be returned, false for only returning the countsFileUsageListResponse getFileUsageInfo(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> fileId, Integer nodeId, boolean returnFiles)
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssortby
- (optional) attribute to sort by. defaults to namesortorder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults
to "asc".fileId
- list of file ids, for which the usage shall be fetchednodeId
- id of the nodereturnFiles
- true (default) if the files shall be returned, false for only returning the countsGenericResponse pushToMaster(Integer id, PushToMasterRequest request)
id
- id of the filerequest
- requestGenericResponse pushToMaster(MultiPushToMasterRequest request)
request
- requestGenericResponse unlocalize(Integer id, UnlocalizeRequest request)
id
- id of the file to unlocalizerequest
- requestGenericResponse unlocalize(MultiUnlocalizeRequest request)
request
- requestGenericResponse localize(Integer id, LocalizeRequest request)
id
- id of the file to localizerequest
- requestLocalizationsResponse localizations(Integer id)
id
- The ID of the master file.LocalizationInfo getLocalizationInfo(List<Integer> ids, Integer nodeId)
ids
- list of file idsnodeId
- id of the node to start withLocalizationInfo getLocalizationInfo(Integer id, Integer nodeId)
id
- id of the filenodeId
- id of the node to start withDisinheritResponse disinherit(String id, Integer nodeId) throws Exception
id
- file IDnodeId
- node IDException
GenericResponse disinherit(String id, Integer nodeId, long waitMs, DisinheritRequest request) throws Exception
id
- file IDnode
- IDwaitMs
- wait timeout in millisecondsrequest
- request objectException
MultiDisinheritResponse disinherit(List<String> ids, Integer nodeId) throws Exception
ids
- list of page IDsnodeId
- node IDException
GenericResponse disinherit(List<String> ids, Integer nodeId, long waitMs, DisinheritRequest request) throws Exception
ids
- list of page IDsnodeId
- node IDwaitMs
- wait timeout in millisecondsrequest
- request objectException
Copyright © 2016 Gentics Software. All rights reserved.