|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.components.language.markup.xsp.XSPObjectHelper org.apache.cocoon.components.language.markup.xsp.XSPCookieHelper
public class 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 );
Constructor Summary | |
---|---|
XSPCookieHelper()
|
Method Summary | |
---|---|
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 |
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) |
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. |
static void |
getCookie(Map objectModel,
String cookieName,
int cookieIndex,
ContentHandler contentHandler)
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>...... |
static Cookie[] |
getCookies(Map objectModel)
This method is used to return all the cookies that present in the passed request object |
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>...... |
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) |
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) |
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) |
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) |
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) |
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) |
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) |
Methods inherited from class 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 inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XSPCookieHelper()
Method Detail |
---|
public static void addCookie(Map objectModel, String name, String value, String comment, String domain, int maxage, String path, String secure, int version)
objectModel
- name
- name to be set for the cookievalue
- value to be set for the cookiecomment
- comment to be set for the cookiedomain
- domain to be set for the cookiemaxage
- maxage to be set for the cookiepath
- path to be set for the cookiesecure
- secure property to be set for the cookieversion
- version to be set for the cookiepublic static Cookie[] getCookies(Map objectModel)
objectModel
-
public static void getCookies(Map objectModel, ContentHandler contentHandler) throws SAXException
<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.
objectModel
- contentHandler
-
SAXException
public static Cookie getCookie(Map objectModel, String cookieName, int cookieIndex)
objectModel
- cookieName
- Name of the cookie which is to be found and returned backcookieIndex
- Index of the cookie which is to be found and returned
public static void getCookie(Map objectModel, String cookieName, int cookieIndex, ContentHandler contentHandler) throws SAXException
<cookie> <name>......</name> <value>.....</value> <comment>...</comment> <domain>....</domain> <maxage>....</maxage> <path>......</path> <secure>....</secure> <version>...</version> </cookie>
objectModel
- cookieName
- name of the cookie which is to be foundcookieIndex
- index of the cookie which is to be foundcontentHandler
-
SAXException
public static String getComment(Map objectModel, String cookieName, int cookieIndex)
objectModel
- cookieName
- name of the cookie whose comment is to be passedcookieIndex
- index of the cookie whose comment is to be passed
public static String getDomain(Map objectModel, String cookieName, int cookieIndex)
objectModel
- cookieName
- name of the cookie whose domain is to be passedcookieIndex
- index of the cookie whose domain is to be passed
public static String getMaxAge(Map objectModel, String cookieName, int cookieIndex)
objectModel
- cookieName
- name of the cookie whose maxage is to be passedcookieIndex
- index of the cookie whose maxage is to be passed
public static String getName(Map objectModel, String cookieName, int cookieIndex)
objectModel
- cookieName
- name of the cookie whose name is to be passedcookieIndex
- index of the cookie whose name is to be passed
public static String getPath(Map objectModel, String cookieName, int cookieIndex)
objectModel
- cookieName
- name of the cookie whose path is to be passedcookieIndex
- index of the cookie whose path is to be passed
public static String getSecure(Map objectModel, String cookieName, int cookieIndex)
objectModel
- cookieName
- name of the cookie whose secure property is to be passedcookieIndex
- index of the cookie whose secure property is to be passed
public static String getValue(Map objectModel, String cookieName, int cookieIndex)
objectModel
- cookieName
- name of the cookie whose value is to be passedcookieIndex
- index of the cookie whose value
public static String getVersion(Map objectModel, String cookieName, int cookieIndex)
objectModel
- cookieName
- name of the cookie whose version is to be passedcookieIndex
- index of the cookie whose version is to be passed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |