Interface ImageResource

    • Method Detail

      • list

        @GET
        ImageListResponse list​(@BeanParam
                               InFolderParameterBean inFolder,
                               @BeanParam
                               FileListParameterBean fileListParams,
                               @BeanParam
                               FilterParameterBean filterParams,
                               @BeanParam
                               SortParameterBean sortingParams,
                               @BeanParam
                               PagingParameterBean pagingParams,
                               @BeanParam
                               EditableParameterBean editableParams,
                               @BeanParam
                               WastebinParameterBean wastebinParams)
        Get a list of images in the specified folder.
        The result can be filtered by
        • id
        • name
        • description
        • niceUrl
        • alternateUrls
        and sorted by
        • id
        • name
        • niceUrl
        • alternateUrls
        • fileSize
        • fileType
        Parameters:
        inFolder - Folder ID and recursive parameters
        fileListParams - Further file parameters
        filterParams - Filter parameters
        sortingParams - Sorting parameters
        pagingParams - Paging parameters
        editableParams - Editable parameters
        wastebinParams - Wastebin parameters
        Returns:
        A list of images
      • load

        @GET
        @Path("/load/{id}")
        ImageLoadResponse load​(@PathParam("id")
                               String id,
                               @DefaultValue("false") @QueryParam("update")
                               boolean update,
                               @DefaultValue("false") @QueryParam("construct")
                               boolean construct,
                               @QueryParam("nodeId")
                               Integer nodeId,
                               @QueryParam("package")
                               String stagingPackageName)
        Load the image with given id
        Parameters:
        id - image id. This can either be a local or globalid
        update - 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.
        construct - if true, the construct information will be added to tags
        nodeId - 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 image status in it
        Returns:
        response containing the image meta data
      • load

        @POST
        @Path("/load")
        MultiImageLoadResponse load​(MultiObjectLoadRequest request)
        Load a list of images specified in the given request. Image ids for which no images exist, or the user does not have the necessary permissions, are silently ignored.
        Parameters:
        request - The request with he list of image ids to load.
        Returns:
        The list of found images, for which the user has enough permissions.
      • resize

        @POST
        @Path("/resize/")
        FileUploadResponse resize​(ImageResizeRequest imageResizeRequest)
        Rotate by 90° (optionally), crop (optionally) and resize an image (in this order).
        Parameters:
        imageResizeRequest - resize request
        Returns:
        response
      • loadContent

        javax.ws.rs.core.Response loadContent​(@PathParam("id")
                                              Integer id)
        Get the content of the image with given id
        Parameters:
        id - image id to get
        Returns:
        binary content of the image
      • create

        ImageLoadResponse create​(ImageCreateRequest request)
        Create a new image
        Parameters:
        request - request with data for the image to be created
        Returns:
        response containing the image meta data
      • move

        @POST
        @Path("/move/{id}")
        GenericResponse move​(@PathParam("id")
                             String id,
                             ObjectMoveRequest request)
        Mpve the given file to another folder
        Parameters:
        id - file id
        request - request
        Returns:
        generic response
      • save

        @POST
        @Path("/save/{id}")
        GenericResponse save​(@PathParam("id")
                             Integer id,
                             ImageSaveRequest request)
        Save the given image
        Parameters:
        request - request with the image to be saved
        Returns:
        generic response
      • saveContent

        GenericResponse saveContent​(InputStream fileContent)
        Save the posted content into the given image
        Parameters:
        fileContent - image content
        Returns:
        generic response
      • delete

        @POST
        @Path("/delete/{id}")
        GenericResponse delete​(@PathParam("id")
                               String id,
                               @QueryParam("nodeId")
                               Integer nodeId)
        Delete the image denoted by id
        Parameters:
        id - id of the image to delete
        nodeId - id of the node (channel) of the image
        Returns:
        response object
      • deleteFromWastebin

        @POST
        @Path("/wastebin/delete/{id}")
        GenericResponse deleteFromWastebin​(@PathParam("id")
                                           String id,
                                           @QueryParam("wait") @DefaultValue("0")
                                           long waitMs)
        Remove the image denoted by the given id from the wastebin.
        Parameters:
        id - id of the image to remove from the wastebin. This can either be a local or global id
        waitMs - time in ms for the request to be done in foreground
        Returns:
        response object
      • deleteFromWastebin

        @POST
        @Path("/wastebin/delete")
        GenericResponse deleteFromWastebin​(IdSetRequest request,
                                           @QueryParam("wait") @DefaultValue("0")
                                           long waitMs)
        Remove the given images from the wastebin
        Parameters:
        request - request containing the image IDs
        waitMs - time in ms for the request to be done in foreground
        Returns:
        response object
      • restoreFromWastebin

        @POST
        @Path("/wastebin/restore/{id}")
        GenericResponse restoreFromWastebin​(@PathParam("id")
                                            String id,
                                            @QueryParam("wait") @DefaultValue("0")
                                            long waitMs)
        Restore the given image from the wastebin
        Parameters:
        id - id of the image to restore from the wastebin. This can either be a local or global id
        waitMs - time in ms for the request to be done in foreground
        Returns:
        response object
      • restoreFromWastebin

        @POST
        @Path("/wastebin/restore")
        GenericResponse restoreFromWastebin​(IdSetRequest request,
                                            @QueryParam("wait") @DefaultValue("0")
                                            long waitMs)
        Restore the given images from the wastebin
        Parameters:
        request - request containing the image IDs
        waitMs - time in ms for the request to be done in foreground
        Returns:
        response object
      • getPrivileges

        PrivilegesResponse getPrivileges​(@PathParam("id")
                                         Integer id)
        Get the privileges of the current user on the given image
        Parameters:
        id - id of the image
        Returns:
        privileges response
      • getTotalFileUsageInfo

        @GET
        @Path("/usage/total")
        TotalUsageResponse getTotalFileUsageInfo​(@QueryParam("id")
                                                 List<Integer> imageId,
                                                 @QueryParam("nodeId")
                                                 Integer nodeId)
        Get the total usage info for the given images.
        Parameters:
        imageId - list of image ids, for which the usage shall be fetched
        nodeId - id of the node
        Returns:
        Response which contains the total usage info
      • getFolderUsageInfo

        @GET
        @Path("/usage/folder")
        FolderUsageListResponse getFolderUsageInfo​(@QueryParam("skipCount") @DefaultValue("0")
                                                   Integer skipCount,
                                                   @QueryParam("maxItems") @DefaultValue("-1")
                                                   Integer maxItems,
                                                   @QueryParam("sortby") @DefaultValue("name")
                                                   String sortBy,
                                                   @QueryParam("sortorder") @DefaultValue("asc")
                                                   String sortOrder,
                                                   @QueryParam("id")
                                                   List<Integer> imageId,
                                                   @QueryParam("nodeId")
                                                   Integer nodeId,
                                                   @QueryParam("folders") @DefaultValue("true")
                                                   boolean returnFolders)
        Get the folders using one of the given images.
        Parameters:
        skipCount - number of items to be skipped, set to 0 for skipping no items
        maxItems - maximum number of items to be returned, set to -1 for returning all items
        sortBy - (optional) attribute to sort by. defaults to name
        sortOrder - (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 fetched
        nodeId - id of the node
        returnFolders - true (default) if the folders shall be returned, false for only returning the counts
        Returns:
        response
      • getPageUsageInfo

        @GET
        @Path("/usage/page")
        PageUsageListResponse getPageUsageInfo​(@QueryParam("skipCount") @DefaultValue("0")
                                               Integer skipCount,
                                               @QueryParam("maxItems") @DefaultValue("-1")
                                               Integer maxItems,
                                               @QueryParam("sortby") @DefaultValue("name")
                                               String sortBy,
                                               @QueryParam("sortorder") @DefaultValue("asc")
                                               String sortOrder,
                                               @QueryParam("id")
                                               List<Integer> imageId,
                                               @QueryParam("nodeId")
                                               Integer nodeId,
                                               @QueryParam("pages") @DefaultValue("true")
                                               boolean returnPages,
                                               @BeanParam
                                               PageModelParameterBean pageModel)
        Get the pages using one of the given images
        Parameters:
        skipCount - number of items to be skipped, set to 0 for skipping no items
        maxItems - maximum number of items to be returned, set to -1 for returning all items
        sortBy - (optional) attribute to sort by. defaults to name
        sortOrder - (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 fetched
        nodeId - id of the node
        returnPages - true (default) if the pages shall be returned, false for only returning the counts
        pageModel - page model parameters
        Returns:
        response
      • getTemplateUsageInfo

        @GET
        @Path("/usage/template")
        TemplateUsageListResponse getTemplateUsageInfo​(@QueryParam("skipCount") @DefaultValue("0")
                                                       Integer skipCount,
                                                       @QueryParam("maxItems") @DefaultValue("-1")
                                                       Integer maxItems,
                                                       @QueryParam("sortby") @DefaultValue("name")
                                                       String sortBy,
                                                       @QueryParam("sortorder") @DefaultValue("asc")
                                                       String sortOrder,
                                                       @QueryParam("id")
                                                       List<Integer> imageId,
                                                       @QueryParam("nodeId")
                                                       Integer nodeId,
                                                       @QueryParam("templates") @DefaultValue("true")
                                                       boolean returnTemplates)
        Get the templates using one of the given images
        Parameters:
        skipCount - number of items to be skipped, set to 0 for skipping no items
        maxItems - maximum number of items to be returned, set to -1 for returning all items
        sortBy - (optional) attribute to sort by. defaults to name
        sortOrder - (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 fetched
        nodeId - id of the node
        returnTemplates - true (default) if the templates shall be returned, false for only returning the counts
        Returns:
        response
      • getImageUsageInfo

        @GET
        @Path("/usage/image")
        FileUsageListResponse getImageUsageInfo​(@QueryParam("skipCount") @DefaultValue("0")
                                                Integer skipCount,
                                                @QueryParam("maxItems") @DefaultValue("-1")
                                                Integer maxItems,
                                                @QueryParam("sortby") @DefaultValue("name")
                                                String sortBy,
                                                @QueryParam("sortorder") @DefaultValue("asc")
                                                String sortOrder,
                                                @QueryParam("id")
                                                List<Integer> imageId,
                                                @QueryParam("nodeId")
                                                Integer nodeId,
                                                @QueryParam("images") @DefaultValue("true")
                                                boolean returnImages)
        Get the images using one of the given images
        Parameters:
        skipCount - number of items to be skipped, set to 0 for skipping no items
        maxItems - maximum number of items to be returned, set to -1 for returning all items
        sortBy - (optional) attribute to sort by. defaults to name
        sortOrder - (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 fetched
        nodeId - id of the node
        returnImages - true (default) if the images shall be returned, false for only returning the counts
        Returns:
        response
      • getFileUsageInfo

        @GET
        @Path("/usage/file")
        FileUsageListResponse getFileUsageInfo​(@QueryParam("skipCount") @DefaultValue("0")
                                               Integer skipCount,
                                               @QueryParam("maxItems") @DefaultValue("-1")
                                               Integer maxItems,
                                               @QueryParam("sortby") @DefaultValue("name")
                                               String sortBy,
                                               @QueryParam("sortorder") @DefaultValue("asc")
                                               String sortOrder,
                                               @QueryParam("id")
                                               List<Integer> imageId,
                                               @QueryParam("nodeId")
                                               Integer nodeId,
                                               @QueryParam("files") @DefaultValue("true")
                                               boolean returnFiles)
        Get the files using one of the given images
        Parameters:
        skipCount - number of items to be skipped, set to 0 for skipping no items
        maxItems - maximum number of items to be returned, set to -1 for returning all items
        sortBy - (optional) attribute to sort by. defaults to name
        sortOrder - (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 fetched
        nodeId - id of the node
        returnFiles - true (default) if the files shall be returned, false for only returning the counts
        Returns:
        response