public interface ImageResource extends AuthenticatedResource
Modifier and Type | Method and Description |
---|---|
ImageLoadResponse |
create(ImageCreateRequest request)
Create a new image
|
GenericResponse |
delete(Integer id,
Integer nodeId)
Delete the image denoted by id
|
FileUsageListResponse |
getFileUsageInfo(Integer skipCount,
Integer maxItems,
String sortBy,
String sortOrder,
List<Integer> imageId,
Integer nodeId,
boolean returnFiles)
Get the files using one of the given images
|
FolderUsageListResponse |
getFolderUsageInfo(Integer skipCount,
Integer maxItems,
String sortBy,
String sortOrder,
List<Integer> imageId,
Integer nodeId,
boolean returnFolders)
Get the folders using one of the given images
|
FileUsageListResponse |
getImageUsageInfo(Integer skipCount,
Integer maxItems,
String sortBy,
String sortOrder,
List<Integer> imageId,
Integer nodeId,
boolean returnImages)
Get the images using one of the given images
|
LocalizationInfo |
getLocalizationInfo(List<Integer> ids,
Integer nodeId)
Get localization info for a list of images for a given channel and all master channels
|
LocalizationInfo |
getLocalizationInfo(String id,
Integer nodeId)
Get localization info for an image for a given channel and all master channels
|
PageUsageListResponse |
getPageUsageInfo(Integer skipCount,
Integer maxItems,
String sortBy,
String sortOrder,
List<Integer> imageId,
Integer nodeId,
boolean returnPages,
boolean template,
boolean folder,
boolean languageVariants)
Get the pages using one of the given images
|
PrivilegesResponse |
getPrivileges(Integer id)
Get the privileges of the current user on the given image
|
TemplateUsageListResponse |
getTemplateUsageInfo(Integer skipCount,
Integer maxItems,
String sortBy,
String sortOrder,
List<Integer> imageId,
Integer nodeId,
boolean returnTemplates)
Get the templates using one of the given images
|
ImageLoadResponse |
load(String id,
boolean update,
Integer nodeId)
Load the image with given id
|
javax.ws.rs.core.Response |
loadContent(Integer id)
Get the content of the image with given id
|
GenericResponse |
localize(Integer id,
LocalizeRequest request)
Localize the given image
|
GenericResponse |
pushToMaster(Integer id,
PushToMasterRequest request)
Push an image from a channel into a master
|
GenericResponse |
pushToMaster(MultiPushToMasterRequest request)
Push a list of images from a channel into a master
|
GenericResponse |
resize(ImageResizeRequest imageResizeRequest)
This method will once invoked resize the image and update its binary data
and properties.
|
GenericResponse |
save(Integer id,
ImageSaveRequest request)
Save the given image
|
GenericResponse |
saveContent(InputStream fileContent)
Save the posted content into the given image
|
GenericResponse |
unlocalize(Integer id,
UnlocalizeRequest request)
Unlocalize the given image
|
GenericResponse |
unlocalize(MultiUnlocalizeRequest request)
Unlocalize images in a channel
|
setSessionId
ImageLoadResponse load(String id, boolean update, Integer nodeId)
id
- image id. This can either be a local or globalidupdate
- true when the image is fetched for updating. Currently, images
cannot be locked in the backend, but it is still recommended
to set this parameter to true when the image shall be modified.nodeId
- id of the node (channel) for which the image shall be
loaded (when multichannelling is used).GenericResponse resize(ImageResizeRequest imageResizeRequest)
javax.ws.rs.core.Response loadContent(Integer id)
id
- image id to getImageLoadResponse create(ImageCreateRequest request)
request
- request with data for the image to be createdGenericResponse save(Integer id, ImageSaveRequest request)
request
- request with the image to be savedGenericResponse saveContent(InputStream fileContent)
fileContent
- image contentGenericResponse delete(Integer id, Integer nodeId)
id
- id of the image to deletePrivilegesResponse getPrivileges(Integer id)
id
- id of the imageFolderUsageListResponse getFolderUsageInfo(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> imageId, 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".imageId
- list of image 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> imageId, 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".imageId
- list of image 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> imageId, 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".imageId
- list of image 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> imageId, 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".imageId
- list of image ids, for which the usage shall be fetchednodeId
- id of the nodereturnImages
- true (default) if the images shall be returned, false for only returning the countsFileUsageListResponse getFileUsageInfo(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> imageId, 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".imageId
- list of image 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 imagerequest
- requestGenericResponse pushToMaster(MultiPushToMasterRequest request)
request
- requestGenericResponse unlocalize(Integer id, UnlocalizeRequest request)
id
- id of the image to unlocalizerequest
- requestGenericResponse unlocalize(MultiUnlocalizeRequest request)
request
- requestGenericResponse localize(Integer id, LocalizeRequest request)
id
- id of the image to localizerequest
- requestLocalizationInfo getLocalizationInfo(List<Integer> ids, Integer nodeId)
ids
- list of image idsnodeId
- id of the node to start withLocalizationInfo getLocalizationInfo(String id, Integer nodeId)
id
- id of the image. The id can either be the local or global idnodeId
- id of the node to start withCopyright © 2015 Gentics Software GmbH. All rights reserved.