Class RequestReader

  • All Implemented Interfaces:
    FormatReader<org.springframework.extensions.surf.util.Content>

    public class RequestReader
    extends java.lang.Object
    implements FormatReader<org.springframework.extensions.surf.util.Content>
    Convert request stream to class org.alfresco.util.Content
    Author:
    davidc
    • Constructor Summary

      Constructors 
      Constructor Description
      RequestReader()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> createScriptParameters​(WebScriptRequest req, WebScriptResponse res)
      Create script parameters specific to source mimetype
      java.lang.Class<org.springframework.extensions.surf.util.Content> getDestinationClass()
      Gets the Java Class to convert to
      java.lang.String getSourceMimetype()
      Gets the source mimetype to convert from
      org.springframework.extensions.surf.util.Content read​(WebScriptRequest req)
      Converts mimetype to Java Object
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequestReader

        public RequestReader()
    • Method Detail

      • getSourceMimetype

        public java.lang.String getSourceMimetype()
        Description copied from interface: FormatReader
        Gets the source mimetype to convert from
        Specified by:
        getSourceMimetype in interface FormatReader<org.springframework.extensions.surf.util.Content>
        Returns:
        mimetype
      • getDestinationClass

        public java.lang.Class<org.springframework.extensions.surf.util.Content> getDestinationClass()
        Description copied from interface: FormatReader
        Gets the Java Class to convert to
        Specified by:
        getDestinationClass in interface FormatReader<org.springframework.extensions.surf.util.Content>
        Returns:
        Java Clas
      • read

        public org.springframework.extensions.surf.util.Content read​(WebScriptRequest req)
        Description copied from interface: FormatReader
        Converts mimetype to Java Object
        Specified by:
        read in interface FormatReader<org.springframework.extensions.surf.util.Content>
        Parameters:
        req - web script request
        Returns:
        Java Object
      • createScriptParameters

        public java.util.Map<java.lang.String,​java.lang.Object> createScriptParameters​(WebScriptRequest req,
                                                                                             WebScriptResponse res)
        Description copied from interface: FormatReader
        Create script parameters specific to source mimetype
        Specified by:
        createScriptParameters in interface FormatReader<org.springframework.extensions.surf.util.Content>
        Parameters:
        req - web script request
        res - web script response
        Returns:
        map of script objects indexed by name