Class ConvertAdapter
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.impl.AbstractResource<ResourceTypeImpl>
-
- org.nuxeo.ecm.webengine.model.impl.DefaultAdapter
-
- org.nuxeo.ecm.restapi.server.jaxrs.adapters.ConvertAdapter
-
- All Implemented Interfaces:
AdapterResource
,Resource
,Adaptable
public class ConvertAdapter extends DefaultAdapter
Adapter allowing to convert a Blob using a named converter or a destination mime type.- Since:
- 7.3
-
-
Constructor Summary
Constructors Constructor Description ConvertAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,Serializable>
computeConversionParameters(javax.ws.rs.core.UriInfo uriInfo)
Object
convert(String converter, String type, String format, boolean async, javax.ws.rs.core.UriInfo uriInfo)
Blob
convert(String converter, String type, String format, javax.ws.rs.core.UriInfo uriInfo)
protected Blob
convertWithConverter(BlobHolder bh, String converter, javax.ws.rs.core.UriInfo uriInfo)
protected Blob
convertWithFormat(BlobHolder bh, String format, javax.ws.rs.core.UriInfo uriInfo)
protected Blob
convertWithMimeType(BlobHolder bh, String mimeType, javax.ws.rs.core.UriInfo uriInfo)
protected BlobHolder
getBlobHolderToConvert()
-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.DefaultAdapter
disptachAdapter, getTarget, isAdapter
-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.AbstractResource
checkGuard, dispose, getActiveAdapter, getAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.model.Adaptable
getAdapter
-
Methods inherited from interface org.nuxeo.ecm.webengine.model.Resource
checkGuard, dispose, getActiveAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
convert
public Blob convert(String converter, String type, String format, @Context javax.ws.rs.core.UriInfo uriInfo)
-
getBlobHolderToConvert
protected BlobHolder getBlobHolderToConvert()
-
convertWithConverter
protected Blob convertWithConverter(BlobHolder bh, String converter, javax.ws.rs.core.UriInfo uriInfo)
-
computeConversionParameters
protected Map<String,Serializable> computeConversionParameters(javax.ws.rs.core.UriInfo uriInfo)
-
convertWithMimeType
protected Blob convertWithMimeType(BlobHolder bh, String mimeType, javax.ws.rs.core.UriInfo uriInfo)
-
convertWithFormat
protected Blob convertWithFormat(BlobHolder bh, String format, javax.ws.rs.core.UriInfo uriInfo)
-
-