Uses of Class
org.restlet.representation.Representation
Packages that use Representation
Package
Description
Core classes of the Restlet API.
Information exchanged by components.
Adapters between low-level HTTP calls and high-level Restlet Request and
Response objects.
Supports Restlet applications.
Integration with Java URLConnection class.
Supports the converter service.
Supports HTTP header parsing and formatting.
Supports input and output work.
Supports local connectors and resources.
Supports resources.
General utilities.
Common representation data elements.
Client and server resource classes.
Classes related to call routing.
Services used by applications and components.
Various utility classes.
-
Uses of Representation in org.restlet
Methods in org.restlet that return RepresentationMethods in org.restlet with parameters of type RepresentationModifier and TypeMethodDescriptionvoidMessage.setEntity(Representation entity) Sets the entity representation.Constructors in org.restlet with parameters of type RepresentationModifierConstructorDescriptionMessage(Representation entity) Constructor.Request(Method method, String resourceUri, Representation entity) Constructor.Request(Method method, Reference resourceRef, Representation entity) Constructor. -
Uses of Representation in org.restlet.data
Methods in org.restlet.data that return RepresentationModifier and TypeMethodDescriptionReferenceList.getTextRepresentation()Returns a representation of the list in the "text/uri-list" format.Form.getWebRepresentation()Returns the form as a Web representation (MediaType.APPLICATION_WWW_FORM).Form.getWebRepresentation(CharacterSet characterSet) Returns the form as a Web representation (MediaType.APPLICATION_WWW_FORM).ReferenceList.getWebRepresentation()Returns a representation of the list in "text/html" format.Constructors in org.restlet.data with parameters of type RepresentationModifierConstructorDescriptionForm(Representation webForm) Constructor.Form(Representation webForm, boolean decode) Constructor.ReferenceList(Representation uriList) Constructor from a "text/uri-list" representation. -
Uses of Representation in org.restlet.engine.adapter
Methods in org.restlet.engine.adapter that return RepresentationModifier and TypeMethodDescriptionHttpRequest.getEntity()Returns the representation provided by the client.protected RepresentationCall.getRepresentation(InputStream stream) Returns the representation wrapping the given stream.ServerCall.getRequestEntity()Returns the request entity if available.ClientCall.getResponseEntity(Response response) Returns the response entity if available.Methods in org.restlet.engine.adapter with parameters of type RepresentationModifier and TypeMethodDescriptionvoidHttpRequest.setEntity(Representation entity) protected voidServerCall.writeResponseBody(Representation entity, OutputStream responseEntityStream) Effectively writes the response body. -
Uses of Representation in org.restlet.engine.application
Subclasses of Representation in org.restlet.engine.applicationModifier and TypeClassDescriptionclassRepresentation that decodes a wrapped representation if its encoding is supported.classContent that encodes a wrapped content.classRepresentation that exposes only a range of the content of a wrapped representation.Methods in org.restlet.engine.application that return RepresentationModifier and TypeMethodDescriptionDecoder.decode(Representation representation) Decodes a given representation if its encodings are supported by NRE.Encoder.encode(ClientInfo client, Representation representation) Encodes a given representation if an encoding is supported by the client.Methods in org.restlet.engine.application with parameters of type RepresentationModifier and TypeMethodDescriptionbooleanDecoder.canDecode(Representation representation) Indicates if a representation can be decoded.Decoder.decode(Representation representation) Decodes a given representation if its encodings are supported by NRE.Encoder.encode(ClientInfo client, Representation representation) Encodes a given representation if an encoding is supported by the client.Constructors in org.restlet.engine.application with parameters of type RepresentationModifierConstructorDescriptionDecodeRepresentation(Representation wrappedRepresentation) Constructor.EncodeRepresentation(Encoding encoding, Representation wrappedRepresentation) Constructor.RangeRepresentation(Representation wrappedRepresentation) Constructor.RangeRepresentation(Representation wrappedRepresentation, Range range) Constructor. -
Uses of Representation in org.restlet.engine.connector
Methods in org.restlet.engine.connector that return RepresentationModifier and TypeMethodDescriptionprotected RepresentationHttpUrlConnectionCall.getRepresentation(InputStream stream) Deprecated. -
Uses of Representation in org.restlet.engine.converter
Methods in org.restlet.engine.converter that return RepresentationModifier and TypeMethodDescriptionprotected RepresentationStatusInfoHtmlConverter.toHtml(StatusInfo status) Returns a representation for the given status.
In order to customize the default representation, this method can be overridden.abstract RepresentationConverterHelper.toRepresentation(Object source, Variant target, Resource resource) Converts a regular Java object into a Representation.DefaultConverter.toRepresentation(Object source, Variant target, Resource resource) StatusInfoHtmlConverter.toRepresentation(Object source, Variant target, Resource resource) Methods in org.restlet.engine.converter with parameters of type RepresentationModifier and TypeMethodDescriptionstatic <T> ConverterHelperConverterUtils.getBestHelper(Representation source, Class<T> target, Resource resource) Returns the best converter helper matching the given parameters.abstract <T> floatConverterHelper.score(Representation source, Class<T> target, Resource resource) Scores the affinity of this helper with the source class.<T> floatDefaultConverter.score(Representation source, Class<T> target, Resource resource) <T> floatStatusInfoHtmlConverter.score(Representation source, Class<T> target, Resource resource) abstract <T> TConverterHelper.toObject(Representation source, Class<T> target, Resource resource) Converts a Representation into a regular Java object.<T> TDefaultConverter.toObject(Representation source, Class<T> target, Resource resource) <T> TStatusInfoHtmlConverter.toObject(Representation source, Class<T> target, Resource resource) -
Uses of Representation in org.restlet.engine.header
Methods in org.restlet.engine.header that return RepresentationModifier and TypeMethodDescriptionstatic RepresentationHeaderUtils.extractEntityHeaders(Iterable<Header> headers, Representation representation) Extracts entity headers and updates a given representation or create an empty one when at least one entity header is present.Methods in org.restlet.engine.header with parameters of type RepresentationModifier and TypeMethodDescriptionstatic voidHeaderUtils.addEntityHeaders(Representation entity, Series<Header> headers) Adds the entity headers based on theRepresentationto theSeries.static voidHeaderUtils.addNotModifiedEntityHeaders(Representation entity, Series<Header> headers) Adds the entity headers based on theRepresentationto theSerieswhen a 304 (Not Modified) status is returned.static RepresentationHeaderUtils.extractEntityHeaders(Iterable<Header> headers, Representation representation) Extracts entity headers and updates a given representation or create an empty one when at least one entity header is present.static voidRangeReader.update(String value, Representation representation) Parse the Content-Range header value and update the given representation.static StringContentType.writeHeader(Representation representation) Writes the HTTP "Content-Type" header.Constructors in org.restlet.engine.header with parameters of type Representation -
Uses of Representation in org.restlet.engine.io
Methods in org.restlet.engine.io with parameters of type RepresentationModifier and TypeMethodDescriptionstatic longIoUtils.getAvailableSize(Representation representation) Returns the size effectively available.static InputStreamIoUtils.getStream(Representation representation) Returns an input stream based on the given representation's content and its write(OutputStream) method.static StringIoUtils.getText(Representation representation) Converts the representation to a string value. -
Uses of Representation in org.restlet.engine.local
Subclasses of Representation in org.restlet.engine.localMethods in org.restlet.engine.local that return RepresentationModifier and TypeMethodDescriptionDirectoryServerResource.delete()protected RepresentationDirectoryServerResource.get()abstract RepresentationEntity.getRepresentation(MediaType defaultMediaType, int timeToLive) Returns a representation of this local entity.FileEntity.getRepresentation(MediaType defaultMediaType, int timeToLive) ZipEntryEntity.getRepresentation(MediaType defaultMediaType, int timeToLive) DirectoryServerResource.handle()DirectoryServerResource.put(Representation entity) Methods in org.restlet.engine.local with parameters of type Representation -
Uses of Representation in org.restlet.engine.resource
Methods in org.restlet.engine.resource with parameters of type RepresentationModifier and TypeMethodDescriptionAnnotationUtils.getMethodAnnotation(List<AnnotationInfo> annotations, Method restletMethod, Form query, Representation entity, MetadataService metadataService, ConverterService converterService) Returns the first annotation descriptor matching the given Restlet method.booleanMethodAnnotationInfo.isCompatible(Method restletMethod, Form queryParams, Representation requestEntity, MetadataService metadataService, ConverterService converterService) Indicates if the annotated method described is compatible with the given parameters.booleanMethodAnnotationInfo.isCompatibleRequestEntity(Representation requestEntity, MetadataService metadataService, ConverterService converterService) Indicates if the given request entity is compatible with the annotated method described. -
Uses of Representation in org.restlet.engine.util
Methods in org.restlet.engine.util with parameters of type RepresentationModifier and TypeMethodDescriptionstatic ParameterFormUtils.getFirstParameter(Representation post, String name) Reads the first parameter with the given name.static ObjectFormUtils.getParameter(Representation form, String name) Reads the parameters with the given name.
If multiple values are found, a list is returned created.static voidFormUtils.getParameters(Representation post, Map<String, Object> parameters) Reads the parameters whose name is a key in the given map.
If a matching parameter is found, its value is put in the map.
If multiple values are found, a list is created and set in the map.static voidFormUtils.parse(Form form, Representation post, boolean decode) Parses a post into a given form.Constructors in org.restlet.engine.util with parameters of type RepresentationModifierConstructorDescriptionFormReader(Representation representation) Constructor.
In case the representation does not define a character set, the UTF-8 character set is used.FormReader(Representation representation, boolean decode) Constructor.
In case the representation does not define a character set, the UTF-8 character set is used. -
Uses of Representation in org.restlet.representation
Subclasses of Representation in org.restlet.representationModifier and TypeClassDescriptionclassRepresents an appendable sequence of characters.classRepresentation capable of buffering the wrapped representation.classRepresentation wrapping a byte array.classRepresentation based on a BIO character stream.classRepresentation capable of computing a digest.classEmpty representation with no content.classRepresentation based on a static file.classTransient representation based on a BIO input stream.classObjectRepresentation<T extends Serializable>Representation based on a serializable Java object.
It supports binary representations of JavaBeans using theObjectInputStreamandObjectOutputStreamclasses.classRepresentation based on a BIO output stream.classTransient representation based on a BIO characters reader.classRepresentation based on a BIO stream.classRepresents an Unicode string that can be converted to any character set supported by Java.classRepresentation based on a BIO characters writer.Constructors in org.restlet.representation with parameters of type RepresentationModifierConstructorDescriptionBufferingRepresentation(Representation bufferedRepresentation) Constructor.DigesterRepresentation(Representation wrappedRepresentation) Constructor.
By default, the instance relies on theDigest.ALGORITHM_MD5digest algorithm.DigesterRepresentation(Representation wrappedRepresentation, String algorithm) Constructor.ObjectRepresentation(Representation serializedRepresentation) Constructor reading the object from a serialized representation.ObjectRepresentation(Representation serializedRepresentation, ClassLoader classLoader) Constructor reading the object from a serialized representation.ObjectRepresentation(Representation serializedRepresentation, ClassLoader classLoader, boolean variantObjectBinarySupported, boolean variantObjectXmlSupported) Constructor reading the object from a serialized representation. -
Uses of Representation in org.restlet.resource
Methods in org.restlet.resource that return RepresentationModifier and TypeMethodDescriptionClientResource.delete()Deletes the target resource and all its representations.Deletes the target resource and all its representations.protected RepresentationServerResource.delete()Deletes the resource and all its representations.protected RepresentationDeletes the resource and all its representations.protected RepresentationServerResource.describeVariants()Describes the available variants to help client-side content negotiation.protected RepresentationServerResource.doConditionalHandle()Handles a call by first verifying the optional request conditions and continue the processing if possible.protected RepresentationServerResource.doHandle()Effectively handles a call without content negotiation of the response entity.protected RepresentationServerResource.doHandle(MethodAnnotationInfo annotationInfo, Variant variant) Effectively handles a call with content negotiation of the response entity using an annotated method.protected RepresentationEffectively handles a call with content negotiation of the response entity.protected RepresentationServerResource.doNegotiatedHandle()Effectively handles a call with content negotiation of the response entity.ClientResource.get()Represents the resource using content negotiation to select the best variant based on the client preferences.Represents the resource using a given media type.protected RepresentationServerResource.get()Returns a full representation.protected RepresentationReturns a full representation for a given variant.Directory.getIndexRepresentation(Variant variant, ReferenceList indexContent) Returns an actual index representation for a given variant.Resource.getRequestEntity()Returns the request entity representation.Resource.getResponseEntity()Returns the response entity representation.ClientResource.handle()Handles the call by invoking the next handler.protected RepresentationHandles the call by cloning the prototype request, setting the method and entity.protected RepresentationHandles the call by cloning the prototype request, setting the method and entity.protected RepresentationClientResource.handle(Method method, Representation entity) Handles the call by cloning the prototype request, setting the method and entity.protected RepresentationClientResource.handle(Method method, Representation entity, ClientInfo clientInfo) Handles the call by cloning the prototype request, setting the method and entity.protected RepresentationClientResource.handle(Method method, Representation entity, MediaType mediaType) Handles the call by cloning the prototype request, setting the method and entity.abstract RepresentationResource.handle()Handles the call composed of the current context, request and response.ServerResource.handle()Handles any call to this resource.ClientResource.handleInbound(Response response) Handles the inbound call.ClientResource.head()Represents the resource using content negotiation to select the best variant based on the client preferences.Represents the resource using a given media type.protected RepresentationServerResource.head()Returns a representation whose metadata will be returned to the client.protected RepresentationReturns a representation whose metadata will be returned to the client.ClientResource.options()Describes the resource using content negotiation to select the best variant based on the client preferences.Describes the resource using a given media type.protected RepresentationServerResource.options()Indicates the communication options available for this resource.protected RepresentationIndicates the communication options available for this resource.Patches a resource with the given object as delta state.Patches a resource with the given object as delta state.ClientResource.patch(Representation entity) Patches a resource with the given representation as delta state.protected RepresentationServerResource.patch(Representation entity) Apply a patch entity to the current representation of the resource retrieved by callingServerResource.get().protected RepresentationServerResource.patch(Representation entity, Variant variant) Apply a patch entity to the current representation of the resource retrieved by callingServerResource.get().Posts an object entity.Posts an object entity.ClientResource.post(Representation entity) Posts a representation.protected RepresentationServerResource.post(Representation entity) Posts a representation to the resource at the target URI reference.protected RepresentationServerResource.post(Representation entity, Variant variant) Posts a representation to the resource at the target URI reference.Puts an object entity.Puts an object entity.ClientResource.put(Representation entity) Creates or updates a resource with the given representation as new state to be stored.protected RepresentationServerResource.put(Representation entity) Creates or updates a resource with the given representation as new state to be stored.protected RepresentationServerResource.put(Representation representation, Variant variant) Creates or updates a resource with the given representation as new state to be stored.Resource.toRepresentation(Object source) Converts an object into a representation based on the default converter service variant.Resource.toRepresentation(Object source, MediaType target) Converts an object into a representation based on a given media type.Resource.toRepresentation(Object source, Variant target) Converts an object into a representation based on client preferences.Methods in org.restlet.resource with parameters of type RepresentationModifier and TypeMethodDescriptionprotected MethodAnnotationInfoServerResource.getAnnotation(Method method, Form query, Representation entity) Returns the first annotation descriptor matching the given method.protected RepresentationClientResource.handle(Method method, Representation entity) Handles the call by cloning the prototype request, setting the method and entity.protected RepresentationClientResource.handle(Method method, Representation entity, ClientInfo clientInfo) Handles the call by cloning the prototype request, setting the method and entity.protected RepresentationClientResource.handle(Method method, Representation entity, MediaType mediaType) Handles the call by cloning the prototype request, setting the method and entity.ClientResource.patch(Representation entity) Patches a resource with the given representation as delta state.protected RepresentationServerResource.patch(Representation entity) Apply a patch entity to the current representation of the resource retrieved by callingServerResource.get().protected RepresentationServerResource.patch(Representation entity, Variant variant) Apply a patch entity to the current representation of the resource retrieved by callingServerResource.get().ClientResource.post(Representation entity) Posts a representation.protected RepresentationServerResource.post(Representation entity) Posts a representation to the resource at the target URI reference.protected RepresentationServerResource.post(Representation entity, Variant variant) Posts a representation to the resource at the target URI reference.ClientResource.put(Representation entity) Creates or updates a resource with the given representation as new state to be stored.protected RepresentationServerResource.put(Representation entity) Creates or updates a resource with the given representation as new state to be stored.protected RepresentationServerResource.put(Representation representation, Variant variant) Creates or updates a resource with the given representation as new state to be stored.<T> TResource.toObject(Representation source, Class<T> target) Converts a representation into a Java object. -
Uses of Representation in org.restlet.routing
Methods in org.restlet.routing that return RepresentationModifier and TypeMethodDescriptionprotected RepresentationRedirector.rewrite(Representation initialEntity) Optionally rewrites the response entity returned in theRedirector.MODE_SERVER_INBOUNDandRedirector.MODE_SERVER_OUTBOUNDmodes.Methods in org.restlet.routing with parameters of type RepresentationModifier and TypeMethodDescriptionprotected RepresentationRedirector.rewrite(Representation initialEntity) Optionally rewrites the response entity returned in theRedirector.MODE_SERVER_INBOUNDandRedirector.MODE_SERVER_OUTBOUNDmodes. -
Uses of Representation in org.restlet.service
Methods in org.restlet.service that return RepresentationModifier and TypeMethodDescriptionConverterService.applyPatch(Representation initial, Representation patch) Applies a patch representation to an initial representation in order to obtain a modified one.ConverterService.createPatch(Representation initial, Representation modified) Creates a patch representation by calculating a diff between initial and modified representations.ConverterService.revertPatch(Representation modified, Representation patch) Reverts a patch representation from a modified representation in order to obtain the initial one.ConverterService.toRepresentation(Object source) Converts a regular Java object into a Representation.ConverterService.toRepresentation(Object source, MediaType target) Converts a regular Java object into a Representation.ConverterService.toRepresentation(Object source, Variant target) Converts a regular Java object into a Representation.ConverterService.toRepresentation(Object source, Variant target, Resource resource) Converts a regular Java object into a Representation.StatusService.toRepresentation(Status status, Request request, Response response) Returns a representation for the given status.StatusService.toRepresentation(Status status, Resource resource) Returns a representation for the given status.
In order to customize the default representation, this method can be overridden.Methods in org.restlet.service with parameters of type RepresentationModifier and TypeMethodDescriptionvoidConnectorService.afterSend(Representation entity) Call-back method invoked by the client or server connectors just after sending the response to the target component.ConverterService.applyPatch(Representation initial, Representation patch) Applies a patch representation to an initial representation in order to obtain a modified one.voidConnectorService.beforeSend(Representation entity) Call-back method invoked by the client or server connectors just before sending the response to the target component.booleanEncoderService.canEncode(Representation representation) Indicates if a representation can be encoded.ConverterService.createPatch(Representation initial, Representation modified) Creates a patch representation by calculating a diff between initial and modified representations.ConverterService.revertPatch(Representation modified, Representation patch) Reverts a patch representation from a modified representation in order to obtain the initial one.ConverterService.toObject(Representation source) Converts a Representation into a regular Java object.<T> TConverterService.toObject(Representation source, Class<T> target, Resource resource) Converts a Representation into a regular Java object. -
Uses of Representation in org.restlet.util
Subclasses of Representation in org.restlet.utilMethods in org.restlet.util that return RepresentationModifier and TypeMethodDescriptionWrapperRequest.getEntity()Returns the entity representation.WrapperResponse.getEntity()Returns the entity representation.WrapperRepresentation.getWrappedRepresentation()Returns the wrapped representation.Methods in org.restlet.util with parameters of type RepresentationModifier and TypeMethodDescriptionvoidWrapperRequest.setEntity(Representation entity) Sets the entity representation.voidWrapperResponse.setEntity(Representation entity) Sets the entity representation.Constructors in org.restlet.util with parameters of type RepresentationModifierConstructorDescriptionWrapperRepresentation(Representation wrappedRepresentation) Constructor.