Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » components » language » markup » xsp » [javadoc | source]
org.apache.cocoon.components.language.markup.xsp
public class: XSPCookieHelper [javadoc | source]
java.lang.Object
   org.apache.cocoon.components.language.markup.xsp.XSPObjectHelper
      org.apache.cocoon.components.language.markup.xsp.XSPCookieHelper
This class is a helper class used by Cookie logicsheet This class contains following methods:
public static void addCookie(Map , String , String , String , String ,
int , String , String , int);
public static Cookie[] getCookies(Map);
public static void getCookies(Map , ContentHandler)
throws SAXException;
public static Cookie getCookie(Map , String ,int )
throws SAXException;
public static void getCookie(Map ,String ,int , ContentHandler)
throws SAXException;
public static String getComment(Map ,String , int);
public static String getDomain(Map , String , int);
public static String getMaxAge(Map ,String , int);
public static String getName(Map ,String , int);
public static String getPath(Map , String , int);
public static String getSecure(Map , String , int);
public static String getValue(Map , String , int);
public static String getVersion(Map , String , int);
private static String returnCookieProperty(Map ,String ,int ,String );
Method from org.apache.cocoon.components.language.markup.xsp.XSPCookieHelper Summary:
addCookie,   getComment,   getCookie,   getCookie,   getCookies,   getCookies,   getDomain,   getMaxAge,   getName,   getPath,   getSecure,   getValue,   getVersion
Methods from org.apache.cocoon.components.language.markup.xsp.XSPObjectHelper:
addAttribute,   data,   elementData,   elementData,   end,   start,   start,   xspExpr,   xspExpr,   xspExpr,   xspExpr,   xspExpr,   xspExpr,   xspExpr,   xspExpr,   xspExpr,   xspExpr,   xspExpr,   xspExpr
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.components.language.markup.xsp.XSPCookieHelper Detail:
 public static  void addCookie(Map objectModel,
    String name,
    String value,
    String comment,
    String domain,
    int maxage,
    String path,
    String secure,
    int version) 
    This method will set a new cookie with values that are passed through parameters
 public static String getComment(Map objectModel,
    String cookieName,
    int cookieIndex) 
    Method to return the value of comment for a particular cookie based on it's name or index Rule for passing name and index of the cookie remains same as specified in previous method(s)
 public static Cookie getCookie(Map objectModel,
    String cookieName,
    int cookieIndex) 
    Method used to return a cookie object based on the name or the index that was passed If both name and index of cookie to be extracted is passed in, name will take precedence. Basic thing followed is that, when name is passed, index should be -1 and when index is passed name should null
 public static  void getCookie(Map objectModel,
    String cookieName,
    int cookieIndex,
    ContentHandler contentHandler) throws SAXException 
    This method is used to find a cookie by it's name or index and place it in the XML resulting tree The xml structure that will be inserted will be,
    <cookie>
    <name>......</name>
    <value>.....</value>
    <comment>...</comment>
    <domain>....</domain>
    <maxage>....</maxage>
    <path>......</path>
    <secure>....</secure>
    <version>...</version>
    </cookie>
    
 public static Cookie[] getCookies(Map objectModel) 
    This method is used to return all the cookies that present in the passed request object
 public static  void getCookies(Map objectModel,
    ContentHandler contentHandler) throws SAXException 
    This method is used to write the values of all the cookies in the resulting XML tree The structure that will be added to the XML tree will be
    <cookies>
    <cookie>
    <name>......</name>
    <value>.....</value>
    <comment>...</comment>
    <domain>....</domain>
    <maxage>....</maxage>
    <path>......</path>
    <secure>....</secure>
    <version>...</version>
    </cookie>
    <cookie>
    ...
    </cookie>
    ...
    </cookies>
    
    If the values of any of these is not present those tags will not be present.
 public static String getDomain(Map objectModel,
    String cookieName,
    int cookieIndex) 
    Method to return the value of domain for a particular cookie based on it's name or index Rule for passing name and index of the cookie remains same as specified in previous method(s)
 public static String getMaxAge(Map objectModel,
    String cookieName,
    int cookieIndex) 
    Method to return the value of maxage for a particular cookie based on it's name or index Rule for passing name and index of the cookie remains same as specified in previous method(s)
 public static String getName(Map objectModel,
    String cookieName,
    int cookieIndex) 
    Method to return the value of name for a particular cookie based on it's name or index Rule for passing name and index of the cookie remains same as specified in previous method(s)
 public static String getPath(Map objectModel,
    String cookieName,
    int cookieIndex) 
    Method to return the value of path for a particular cookie based on it's name or index Rule for passing name and index of the cookie remains same as specified in previous method(s)
 public static String getSecure(Map objectModel,
    String cookieName,
    int cookieIndex) 
    Method to return the value of secure property for a particular cookie based on it's name or index Rule for passing name and index of the cookie remains same as specified in previous method(s)
 public static String getValue(Map objectModel,
    String cookieName,
    int cookieIndex) 
    Method to return the value for a particular cookie based on it's name or index Rule for passing name and index of the cookie remains same as specified in previous method(s)
 public static String getVersion(Map objectModel,
    String cookieName,
    int cookieIndex) 
    Method to return the version of comment for a particular cookie based on it's name or index Rule for passing name and index of the cookie remains same as specified in previous method(s)