@Path(value="/file") 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(FileCreateRequest request)
Create a new file with the binary data loaded from a URL
|
FileUploadResponse |
create(org.glassfish.jersey.media.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(org.glassfish.jersey.media.multipart.MultiPart multiPart,
javax.servlet.http.HttpServletRequest request,
String folderId,
String nodeId,
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,
PageModelParameterBean pageModel)
Get the pages using one of the given files
|
PrivilegesResponse |
getPrivileges(Integer id)
Get the privileges of the current user on the given file
|
ReferencedSyncableObjectsListResponse |
getSyncableObjects(List<Integer> fileIds,
Integer srcNodeId,
Integer dstNodeId)
Get objects which are directly or indirectly linked by the specified files,
which can be synchronised to a master channel along with the files themselves.
|
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.
|
FileListResponse |
list(InFolderParameterBean inFolder,
FileListParameterBean fileListParams,
FilterParameterBean filterParams,
SortParameterBean sortingParams,
PagingParameterBean pagingParams,
EditableParameterBean editableParams,
WastebinParameterBean wastebinParams)
Get a list of files in the specified folder.
The result can be filtered by id
name
description
niceUrl
alternateUrls
and sorted by
id
name
niceUrl
alternateUrls
fileSize
fileType
|
MultiFileLoadResponse |
load(MultiObjectLoadRequest request,
boolean fillWithNulls)
Load a list of files specified in the given
request . |
FileLoadResponse |
load(String id,
boolean update,
boolean construct,
Integer nodeId,
String stagingPackageName)
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,
org.glassfish.jersey.media.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
@GET FileListResponse list(@BeanParam InFolderParameterBean inFolder, @BeanParam FileListParameterBean fileListParams, @BeanParam FilterParameterBean filterParams, @BeanParam SortParameterBean sortingParams, @BeanParam PagingParameterBean pagingParams, @BeanParam EditableParameterBean editableParams, @BeanParam WastebinParameterBean wastebinParams)
id
name
description
niceUrl
alternateUrls
id
name
niceUrl
alternateUrls
fileSize
fileType
inFolder
- Folder ID and recursive parametersfileListParams
- Further file parametersfilterParams
- Filter parameterssortingParams
- Sorting parameterspagingParams
- Paging parameterseditableParams
- Editable parameterswastebinParams
- Wastebin parameters@GET @Path(value="/content/load/{id}") javax.ws.rs.core.Response loadContent(@PathParam(value="id") String id)
id
- file id. This can either be the localid or a globalid@GET @Path(value="/load/{id}") FileLoadResponse load(@PathParam(value="id") String id, @DefaultValue(value="false") @QueryParam(value="update") boolean update, @DefaultValue(value="false") @QueryParam(value="construct") boolean construct, @QueryParam(value="nodeId") Integer nodeId, @QueryParam(value="package") String stagingPackageName)
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.construct
- if true, the construct information will be added to tagsnodeId
- id of the node (channel) for which the image shall be
loaded (when multichannelling is used).stagingPackageName
- name of a content staging package, to check the file status in it@POST @Path(value="/load") MultiFileLoadResponse load(MultiObjectLoadRequest request, @QueryParam(value="fillWithNulls") @DefaultValue(value="false") boolean fillWithNulls)
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.fillWithNulls
- flag to have items, which cannot be loaded returned as "null" objects in the response (instead of just omitting them)@POST @Path(value="/createSimple") @Consumes(value="multipart/form-data") @Produces(value="application/json") FileUploadResponse createSimpleMultiPartFallback(org.glassfish.jersey.media.multipart.MultiPart multiPart, @Context javax.servlet.http.HttpServletRequest request, @QueryParam(value="folderId") String folderId, @QueryParam(value="nodeId") String nodeId, @QueryParam(value="databodypart") String customBodyPartName, @QueryParam(value="qqfile") String qqFileUploaderFileName, @QueryParam(value="description") String description, @QueryParam(value="overwrite") @DefaultValue(value="false") 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 IDcustomBodyPartName
- Custom name for the file data body partqqFileUploaderFileName
- Meta data filenamedescription
- File descriptionoverwrite
- Whether a file with the same name would be overwritten@POST @Path(value="/createSimple") @Produces(value="application/json") FileUploadResponse createSimple(@Context javax.servlet.http.HttpServletRequest request, @QueryParam(value="folderId") int folderId, @QueryParam(value="nodeId") @DefaultValue(value="0") int nodeId, @QueryParam(value="databodypart") String customBodyPartKeyName, @QueryParam(value="qqfile") String fileName, @QueryParam(value="description") String description, @QueryParam(value="overwrite") @DefaultValue(value="false") 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 descriptionoverwrite
- Whether a file with the same name would be overwritten@POST @Path(value="/create") @Consumes(value="multipart/form-data") @Produces(value="application/json") FileUploadResponse create(org.glassfish.jersey.media.multipart.MultiPart multiPart)
multiPart
- request with data for the file to be created@POST @Path(value="/create") @Consumes(value="application/json") @Produces(value="application/json") FileUploadResponse create(FileCreateRequest request)
request
- request@POST @Path(value="/copy") FileUploadResponse copyFile(FileCopyRequest request)
request
- @POST @Path(value="/move/{id}") GenericResponse move(@PathParam(value="id") String id, ObjectMoveRequest request)
id
- file idrequest
- request@POST @Path(value="/move") GenericResponse move(MultiObjectMoveRequest request)
request
- request@POST @Path(value="/save/{id}") @Produces(value="application/json") GenericResponse save(@PathParam(value="id") Integer id, FileSaveRequest request)
request
- request with the file to be saved@POST @Path(value="/save/{id}") @Consumes(value="multipart/form-data") @Produces(value="application/json") GenericResponse save(@PathParam(value="id") Integer id, org.glassfish.jersey.media.multipart.MultiPart multiPart)
id
- id of the filemultiPart
- request with data for the file to be created@POST @Path(value="/delete/{id}") GenericResponse delete(@PathParam(value="id") String id, @QueryParam(value="nodeId") Integer nodeId)
id
- id of the File to deletenodeId
- id of the node (channel) of the file@POST @Path(value="/wastebin/delete/{id}") GenericResponse deleteFromWastebin(@PathParam(value="id") String id, @QueryParam(value="wait") @DefaultValue(value="0") 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 foreground@POST @Path(value="/wastebin/delete") GenericResponse deleteFromWastebin(IdSetRequest request, @QueryParam(value="wait") @DefaultValue(value="0") long waitMs)
request
- request containing the file IDswaitMs
- time in ms for the request to be done in foreground@POST @Path(value="/wastebin/restore/{id}") GenericResponse restoreFromWastebin(@PathParam(value="id") String id, @QueryParam(value="wait") @DefaultValue(value="0") 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 foreground@POST @Path(value="/wastebin/restore") GenericResponse restoreFromWastebin(IdSetRequest request, @QueryParam(value="wait") @DefaultValue(value="0") long waitMs)
request
- request containing the file IDswaitMs
- time in ms for the request to be done in foregroundPrivilegesResponse getPrivileges(@PathParam(value="id") Integer id)
id
- id of the file@GET @Path(value="/usage/total") TotalUsageResponse getTotalUsageInfo(@QueryParam(value="id") List<Integer> fileId, @QueryParam(value="nodeId") Integer nodeId)
nodeId
- id of the nodenodeId
- id of the node@GET @Path(value="/usage/folder") FolderUsageListResponse getFolderUsageInfo(@QueryParam(value="skipCount") @DefaultValue(value="0") Integer skipCount, @QueryParam(value="maxItems") @DefaultValue(value="-1") Integer maxItems, @QueryParam(value="sortby") @DefaultValue(value="name") String sortBy, @QueryParam(value="sortorder") @DefaultValue(value="asc") String sortOrder, @QueryParam(value="id") List<Integer> fileId, @QueryParam(value="nodeId") Integer nodeId, @QueryParam(value="folders") @DefaultValue(value="true") 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 counts@GET @Path(value="/usage/page") PageUsageListResponse getPageUsageInfo(@QueryParam(value="skipCount") @DefaultValue(value="0") Integer skipCount, @QueryParam(value="maxItems") @DefaultValue(value="-1") Integer maxItems, @QueryParam(value="sortby") @DefaultValue(value="name") String sortBy, @QueryParam(value="sortorder") @DefaultValue(value="asc") String sortOrder, @QueryParam(value="id") List<Integer> fileId, @QueryParam(value="nodeId") Integer nodeId, @QueryParam(value="pages") @DefaultValue(value="true") boolean returnPages, @BeanParam PageModelParameterBean pageModel)
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 countspageModel
- page model parameters@GET @Path(value="/usage/template") TemplateUsageListResponse getTemplateUsageInfo(@QueryParam(value="skipCount") @DefaultValue(value="0") Integer skipCount, @QueryParam(value="maxItems") @DefaultValue(value="-1") Integer maxItems, @QueryParam(value="sortby") @DefaultValue(value="name") String sortBy, @QueryParam(value="sortorder") @DefaultValue(value="asc") String sortOrder, @QueryParam(value="id") List<Integer> fileId, @QueryParam(value="nodeId") Integer nodeId, @QueryParam(value="templates") @DefaultValue(value="true") 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 counts@GET @Path(value="/usage/image") FileUsageListResponse getImageUsageInfo(@QueryParam(value="skipCount") @DefaultValue(value="0") Integer skipCount, @QueryParam(value="maxItems") @DefaultValue(value="-1") Integer maxItems, @QueryParam(value="sortby") @DefaultValue(value="name") String sortBy, @QueryParam(value="sortorder") @DefaultValue(value="asc") String sortOrder, @QueryParam(value="id") List<Integer> fileId, @QueryParam(value="nodeId") Integer nodeId, @QueryParam(value="files") @DefaultValue(value="true") 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 counts@GET @Path(value="/usage/file") FileUsageListResponse getFileUsageInfo(@QueryParam(value="skipCount") @DefaultValue(value="0") Integer skipCount, @QueryParam(value="maxItems") @DefaultValue(value="-1") Integer maxItems, @QueryParam(value="sortby") @DefaultValue(value="name") String sortBy, @QueryParam(value="sortorder") @DefaultValue(value="asc") String sortOrder, @QueryParam(value="id") List<Integer> fileId, @QueryParam(value="nodeId") Integer nodeId, @QueryParam(value="files") @DefaultValue(value="true") 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 counts@GET @Path(value="/usage/syncableObjects") ReferencedSyncableObjectsListResponse getSyncableObjects(@QueryParam(value="ids") List<Integer> fileIds, @QueryParam(value="srcNodeId") Integer srcNodeId, @QueryParam(value="dstNodeId") Integer dstNodeId)
UrlPartTypes
of
content or object tags.
Direct dependencies are in the pages
,
files
and
images
files of the response. Indirect
dependencies are mapped in dependencies
.fileIds
- The IDs of the files to get linked objects forsrcNodeId
- The channel ID of the source channeldstNodeId
- The channel ID of the target channel@POST @Path(value="/push2master/{id}") GenericResponse pushToMaster(@PathParam(value="id") Integer id, PushToMasterRequest request)
id
- id of the filerequest
- request@POST @Path(value="/push2master") GenericResponse pushToMaster(MultiPushToMasterRequest request)
request
- request@POST @Path(value="/unlocalize/{id}") GenericResponse unlocalize(@PathParam(value="id") Integer id, UnlocalizeRequest request)
id
- id of the file to unlocalizerequest
- request@POST @Path(value="/unlocalize") GenericResponse unlocalize(MultiUnlocalizeRequest request)
request
- request@POST @Path(value="/localize/{id}") GenericResponse localize(@PathParam(value="id") Integer id, LocalizeRequest request)
id
- id of the file to localizerequest
- request@GET @Path(value="/localizations/{id}") LocalizationsResponse localizations(@PathParam(value="id") Integer id)
id
- The ID of the master file.@GET @Path(value="/localizationinfo") LocalizationInfo getLocalizationInfo(@QueryParam(value="id") List<Integer> ids, @QueryParam(value="nodeId") Integer nodeId)
ids
- list of file idsnodeId
- id of the node to start with@GET @Path(value="/localizationinfo/{id}") LocalizationInfo getLocalizationInfo(@PathParam(value="id") Integer id, @QueryParam(value="nodeId") Integer nodeId)
id
- id of the filenodeId
- id of the node to start with@GET @Path(value="/disinherit/{id}") DisinheritResponse disinherit(@PathParam(value="id") String id, @QueryParam(value="nodeId") Integer nodeId) throws Exception
id
- file IDnodeId
- node IDException
@POST @Path(value="/disinherit/{id}") GenericResponse disinherit(@PathParam(value="id") String id, @QueryParam(value="nodeId") Integer nodeId, @QueryParam(value="wait") @DefaultValue(value="0") long waitMs, DisinheritRequest request) throws Exception
id
- file IDnodeId
- IDwaitMs
- wait timeout in millisecondsrequest
- request objectException
@GET @Path(value="/disinherit") MultiDisinheritResponse disinherit(@QueryParam(value="id") List<String> ids, @QueryParam(value="nodeId") Integer nodeId) throws Exception
ids
- list of page IDsnodeId
- node IDException
@POST @Path(value="/disinherit") GenericResponse disinherit(@QueryParam(value="id") List<String> ids, @QueryParam(value="nodeId") Integer nodeId, @QueryParam(value="wait") @DefaultValue(value="0") long waitMs, DisinheritRequest request) throws Exception
ids
- list of page IDsnodeId
- node IDwaitMs
- wait timeout in millisecondsrequest
- request objectException
Copyright © 2024 Gentics Software. All rights reserved.