Search in sources :

Example 6 with Rendition

use of org.alfresco.rest.api.model.Rendition in project alfresco-remote-api by Alfresco.

the class RenditionsImpl method toApiRendition.

protected Rendition toApiRendition(ThumbnailDefinition thumbnailDefinition) {
    ContentInfo contentInfo = new ContentInfo(thumbnailDefinition.getMimetype(), getMimeTypeDisplayName(thumbnailDefinition.getMimetype()), null, null);
    Rendition apiRendition = new Rendition();
    apiRendition.setId(thumbnailDefinition.getName());
    apiRendition.setContent(contentInfo);
    apiRendition.setStatus(RenditionStatus.NOT_CREATED);
    return apiRendition;
}
Also used : ContentInfo(org.alfresco.rest.api.model.ContentInfo) Rendition(org.alfresco.rest.api.model.Rendition)

Aggregations

Rendition (org.alfresco.rest.api.model.Rendition)6 NodeRef (org.alfresco.service.cmr.repository.NodeRef)4 ChildAssociationRef (org.alfresco.service.cmr.repository.ChildAssociationRef)3 ContentInfo (org.alfresco.rest.api.model.ContentInfo)2 TreeMap (java.util.TreeMap)1 ThumbnailDefinition (org.alfresco.repo.thumbnail.ThumbnailDefinition)1 Renditions (org.alfresco.rest.api.Renditions)1 Node (org.alfresco.rest.api.model.Node)1 DisabledServiceException (org.alfresco.rest.framework.core.exceptions.DisabledServiceException)1 InvalidArgumentException (org.alfresco.rest.framework.core.exceptions.InvalidArgumentException)1 Paging (org.alfresco.rest.framework.resource.parameters.Paging)1 Query (org.alfresco.rest.framework.resource.parameters.where.Query)1 ContentData (org.alfresco.service.cmr.repository.ContentData)1 ContentService (org.alfresco.service.cmr.repository.ContentService)1 ContentWriter (org.alfresco.service.cmr.repository.ContentWriter)1 QName (org.alfresco.service.namespace.QName)1