com.supermap.services.rest.encoders

Class RJsonEncoder

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyWriter


    @Provider
    public class RJsonEncoder
    extends JsonEncoder
    implements javax.ws.rs.ext.MessageBodyWriter
    

    ${services_rest_encoders_RJsonEncoder_Title}

    ${services_rest_encoders_RJsonEncoder_Description}

    • Constructor Summary

      Constructors 
      Constructor and Description
      RJsonEncoder()
      ${services_rest_encoders_RJsonEncoder_constructor_RJsonEncoder_Title}
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      protected java.util.List<MediaType> createSupportedMediaTypes()
      ${services_rest_encoders_RJsonEncoder_method_createSupportedMediaTypes_Title}
      protected boolean isindent()
      Whether to generate a string in an indented format.
      boolean isWriteable(java.lang.Class arg0, java.lang.reflect.Type arg1, java.lang.annotation.Annotation[] arg2, javax.ws.rs.core.MediaType arg3)
      Determines whether the present expression supports the representation of the specified media type.
      Representation toRepresentation(MediaType mediaType, java.lang.Object resourceObj)
      ${services_rest_encoders_RJsonEncoder_method_toRepresentation_Title}
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.ws.rs.ext.MessageBodyWriter

        getSize, writeTo
    • Constructor Detail

      • RJsonEncoder

        public RJsonEncoder()
        

        ${services_rest_encoders_RJsonEncoder_constructor_RJsonEncoder_Title}

        ${services_rest_encoders_RJsonEncoder_constructor_RJsonEncoder_Description}

    • Method Detail

      • createSupportedMediaTypes

        protected java.util.List<MediaType> createSupportedMediaTypes()
        

        ${services_rest_encoders_RJsonEncoder_method_createSupportedMediaTypes_Title}

        ${services_rest_encoders_RJsonEncoder_method_createSupportedMediaTypes_Description}

        Overrides:
        createSupportedMediaTypes in class JsonEncoder
        Returns:
        ${services_rest_encoders_RJsonEncoder_method_createSupportedMediaTypes_return}
      • toRepresentation

        public Representation toRepresentation(MediaType mediaType,
                                      java.lang.Object resourceObj)
        

        ${services_rest_encoders_RJsonEncoder_method_toRepresentation_Title}

        ${services_rest_encoders_RJsonEncoder_method_toRepresentation_Description}

        Overrides:
        toRepresentation in class JsonEncoder
        Parameters:
        mediaType - ${services_rest_encoders_RJsonEncoder_method_toRepresentation_param_mediaType}
        resourceObj - ${services_rest_encoders_RJsonEncoder_method_toRepresentation_param_resourceObj}
        Returns:
        ${services_rest_encoders_RJsonEncoder_method_toRepresentation_return}
      • isindent

        protected boolean isindent()
        

        Whether to generate a string in an indented format.

        Overrides:
        isindent in class JsonEncoder
        Returns:
        Returns true if the string is generated in an indented format, false otherwise.
      • isWriteable

        public boolean isWriteable(java.lang.Class arg0,
                          java.lang.reflect.Type arg1,
                          java.lang.annotation.Annotation[] arg2,
                          javax.ws.rs.core.MediaType arg3)
        
        Description copied from class: JsonEncoder

        Determines whether the present expression supports the representation of the specified media type.

        Specified by:
        isWriteable in interface javax.ws.rs.ext.MessageBodyWriter
        Overrides:
        isWriteable in class JsonEncoder
        Parameters:
        arg0 - The type of object to generate the expression.
        arg1 - the specified object type.
        arg2 - annotation array, the resource has these annotation methods to return to the object to be written.
        arg3 - The media type of the expected response.
        Returns:
        Returns true if this expression generator supports the specified media type, false otherwise.