Class RestletUtil


  • public class RestletUtil
    extends java.lang.Object
    Utility functions (static public methods) used to support Restlet framework.
    Since:
    JCMS-6.0.1
    Author:
    dissert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.restlet.data.CharacterSet FORM_CHARACTER_SET  
    • Constructor Summary

      Constructors 
      Constructor Description
      RestletUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getFormAsQueryString​(org.restlet.data.Form form)
      The method form.getQueryString() is buggy, since it may create queryString with parameter without '=' character.
      static java.lang.String getUrl​(org.restlet.data.Request request)  
      • Methods inherited from class java.lang.Object

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

      • FORM_CHARACTER_SET

        public static final org.restlet.data.CharacterSet FORM_CHARACTER_SET
    • Constructor Detail

      • RestletUtil

        public RestletUtil()
    • Method Detail

      • getFormAsQueryString

        public static java.lang.String getFormAsQueryString​(org.restlet.data.Form form)
        The method form.getQueryString() is buggy, since it may create queryString with parameter without '=' character. Therefore, the use of this method is recommended : when a parameter value is empty, it set "paramName=" instead of just "paramName".
        Parameters:
        form - a org.restlet.data.Form instance
        Returns:
        the String queryString associated
      • getUrl

        public static java.lang.String getUrl​(org.restlet.data.Request request)
        Parameters:
        request - A Restlet request
        Returns:
        the URL associated to this request