| java.lang.Object org.apache.cocoon.components.language.markup.xsp.XSPObjectHelper org.apache.cocoon.components.language.markup.xsp.XSPCookieHelper
XSPCookieHelper | public class XSPCookieHelper extends XSPObjectHelper (Code) | | 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 );
version: CVS $Id: XSPCookieHelper.java 433543 2006-08-22 06:22:54Z crossley $ |
Method Summary | |
public static void | addCookie(Map objectModel, String name, String value, String comment, String domain, int maxage, String path, String secure, int version) | public static String | getComment(Map objectModel, String cookieName, int cookieIndex) | 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. | public static void | getCookie(Map objectModel, String cookieName, int cookieIndex, ContentHandler contentHandler) | public static Cookie[] | getCookies(Map objectModel) | public static void | getCookies(Map objectModel, ContentHandler contentHandler) 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>
... | public static String | getDomain(Map objectModel, String cookieName, int cookieIndex) | public static String | getMaxAge(Map objectModel, String cookieName, int cookieIndex) | public static String | getName(Map objectModel, String cookieName, int cookieIndex) | public static String | getPath(Map objectModel, String cookieName, int cookieIndex) | public static String | getSecure(Map objectModel, String cookieName, int cookieIndex) | public static String | getValue(Map objectModel, String cookieName, int cookieIndex) | public static String | getVersion(Map objectModel, String cookieName, int cookieIndex) |
addCookie | public static void addCookie(Map objectModel, String name, String value, String comment, String domain, int maxage, String path, String secure, int version)(Code) | | This method will set a new cookie with values that are passed through parameters
Parameters: objectModel - Parameters: name - name to be set for the cookie Parameters: value - value to be set for the cookie Parameters: comment - comment to be set for the cookie Parameters: domain - domain to be set for the cookie Parameters: maxage - maxage to be set for the cookie Parameters: path - path to be set for the cookie Parameters: secure - secure property to be set for the cookie Parameters: version - version to be set for the cookie |
getComment | public static String getComment(Map objectModel, String cookieName, int cookieIndex)(Code) | | 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)
Parameters: objectModel - Parameters: cookieName - name of the cookie whose comment is to be passed Parameters: cookieIndex - index of the cookie whose comment is to be passed a string is returned containing the comment of the cookie, if not foundthen null is returned |
getCookie | public static Cookie getCookie(Map objectModel, String cookieName, int cookieIndex)(Code) | | 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
Parameters: objectModel - Parameters: cookieName - Name of the cookie which is to be found and returned back Parameters: cookieIndex - Index of the cookie which is to be found and returned cookie object is returned |
getCookie | public static void getCookie(Map objectModel, String cookieName, int cookieIndex, ContentHandler contentHandler) throws SAXException(Code) | | 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>
Parameters: objectModel - Parameters: cookieName - name of the cookie which is to be found Parameters: cookieIndex - index of the cookie which is to be found Parameters: contentHandler - exception: SAXException - |
getCookies | public static Cookie[] getCookies(Map objectModel)(Code) | | This method is used to return all the cookies that present in the passed request object
Parameters: objectModel - an array of Cookie is returned |
getCookies | public static void getCookies(Map objectModel, ContentHandler contentHandler) throws SAXException(Code) | | 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.
Parameters: objectModel - Parameters: contentHandler - exception: SAXException - |
getDomain | public static String getDomain(Map objectModel, String cookieName, int cookieIndex)(Code) | | 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)
Parameters: objectModel - Parameters: cookieName - name of the cookie whose domain is to be passed Parameters: cookieIndex - index of the cookie whose domain is to be passed a string is returned containing the domain of the cookie, if not foundthen null is returned |
getMaxAge | public static String getMaxAge(Map objectModel, String cookieName, int cookieIndex)(Code) | | 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)
Parameters: objectModel - Parameters: cookieName - name of the cookie whose maxage is to be passed Parameters: cookieIndex - index of the cookie whose maxage is to be passed a string is returned containing the maxage of the cookie, if not foundthen null is returned |
getName | public static String getName(Map objectModel, String cookieName, int cookieIndex)(Code) | | 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)
Parameters: objectModel - Parameters: cookieName - name of the cookie whose name is to be passed Parameters: cookieIndex - index of the cookie whose name is to be passed a string is returned containing the name of the cookie, if not foundthen null is returned |
getPath | public static String getPath(Map objectModel, String cookieName, int cookieIndex)(Code) | | 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)
Parameters: objectModel - Parameters: cookieName - name of the cookie whose path is to be passed Parameters: cookieIndex - index of the cookie whose path is to be passed a string is returned containing the path of the cookie, if not foundthen null is returned |
getSecure | public static String getSecure(Map objectModel, String cookieName, int cookieIndex)(Code) | | 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)
Parameters: objectModel - Parameters: cookieName - name of the cookie whose secure property is to be passed Parameters: cookieIndex - index of the cookie whose secure property is to be passed a string is returned containing the secure property of the cookie, if not foundthen null is returned |
getValue | public static String getValue(Map objectModel, String cookieName, int cookieIndex)(Code) | | 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)
Parameters: objectModel - Parameters: cookieName - name of the cookie whose value is to be passed Parameters: cookieIndex - index of the cookie whose value a string is returned containing the value of the cookie, if not foundthen null is returned |
getVersion | public static String getVersion(Map objectModel, String cookieName, int cookieIndex)(Code) | | 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)
Parameters: objectModel - Parameters: cookieName - name of the cookie whose version is to be passed Parameters: cookieIndex - index of the cookie whose version is to be passed a string is returned containing the version of the cookie, if not foundthen null is returned |
Methods inherited from org.apache.cocoon.components.language.markup.xsp.XSPObjectHelper | protected static void addAttribute(AttributesImpl attr, String name, String value) throws SAXException(Code)(Java Doc) protected static void data(ContentHandler contentHandler, String data) throws SAXException(Code)(Java Doc) protected static void elementData(String uri, String prefix, ContentHandler contentHandler, String name, String data) throws SAXException(Code)(Java Doc) protected static void elementData(String uri, String prefix, ContentHandler contentHandler, String name, String data, AttributesImpl attr) throws SAXException(Code)(Java Doc) protected static void end(String uri, String prefix, ContentHandler contentHandler, String name) throws SAXException(Code)(Java Doc) protected static void start(String uri, String prefix, ContentHandler contentHandler, String name) throws SAXException(Code)(Java Doc) protected static void start(String uri, String prefix, ContentHandler contentHandler, String name, AttributesImpl attr) throws SAXException(Code)(Java Doc) public static void xspExpr(ContentHandler contentHandler, char v) throws SAXException(Code)(Java Doc) public static void xspExpr(ContentHandler contentHandler, byte v) throws SAXException(Code)(Java Doc) public static void xspExpr(ContentHandler contentHandler, boolean v) throws SAXException(Code)(Java Doc) public static void xspExpr(ContentHandler contentHandler, int v) throws SAXException(Code)(Java Doc) public static void xspExpr(ContentHandler contentHandler, long v) throws SAXException(Code)(Java Doc) public static void xspExpr(ContentHandler contentHandler, float v) throws SAXException(Code)(Java Doc) public static void xspExpr(ContentHandler contentHandler, double v) throws SAXException(Code)(Java Doc) public static void xspExpr(ContentHandler contentHandler, String text) throws SAXException(Code)(Java Doc) public static void xspExpr(ContentHandler contentHandler, XMLizable v) throws SAXException(Code)(Java Doc) public static void xspExpr(ContentHandler contentHandler, Node v) throws SAXException(Code)(Java Doc) public static void xspExpr(ContentHandler contentHandler, Collection v) throws SAXException(Code)(Java Doc) public static void xspExpr(ContentHandler contentHandler, Object v) throws SAXException(Code)(Java Doc)
|
|
|