Source Code Cross Referenced for CookieParser.java in  » Web-Framework » TURBINE » org » apache » turbine » util » parser » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Framework » TURBINE » org.apache.turbine.util.parser 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.apache.turbine.util.parser;
002:
003:        /*
004:         * Licensed to the Apache Software Foundation (ASF) under one
005:         * or more contributor license agreements.  See the NOTICE file
006:         * distributed with this work for additional information
007:         * regarding copyright ownership.  The ASF licenses this file
008:         * to you under the Apache License, Version 2.0 (the
009:         * "License"); you may not use this file except in compliance
010:         * with the License.  You may obtain a copy of the License at
011:         *
012:         *   http://www.apache.org/licenses/LICENSE-2.0
013:         *
014:         * Unless required by applicable law or agreed to in writing,
015:         * software distributed under the License is distributed on an
016:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017:         * KIND, either express or implied.  See the License for the
018:         * specific language governing permissions and limitations
019:         * under the License.
020:         */
021:
022:        import javax.servlet.http.HttpServletRequest;
023:        import javax.servlet.http.HttpServletResponse;
024:
025:        import org.apache.turbine.util.RunData;
026:        import org.apache.turbine.util.uri.URI;
027:
028:        /**
029:         * CookieParser is an interface to a utility to to get and set values
030:         * of Cookies on the Client Browser. You can use CookieParser to convert
031:         * Cookie values to various types or to set Bean values with setParameters().
032:         * Servlet Spec for more information on Cookies.
033:         * <p>
034:         * Use set() or unset() to Create or Destroy Cookies.
035:         * <p>
036:         * NOTE: The name= portion of a name=value pair may be converted
037:         * to lowercase or uppercase when the object is initialized and when
038:         * new data is added.  This behaviour is determined by the url.case.folding
039:         * property in TurbineResources.properties.  Adding a name/value pair may
040:         * overwrite existing name=value pairs if the names match:
041:         *
042:         * <pre>
043:         * CookieParser cp = data.getCookies();
044:         * cp.add("ERROR",1);
045:         * cp.add("eRrOr",2);
046:         * int result = cp.getInt("ERROR");
047:         * </pre>
048:         *
049:         * In the above example, result is 2.
050:         *
051:         * @author <a href="mailto:ilkka.priha@simsoft.fi">Ilkka Priha</a>
052:         * @author <a href="mailto:leon@opticode.co.za">Leon Messerschmidt</a>
053:         * @version $Id: CookieParser.java 534527 2007-05-02 16:10:59Z tv $
054:         */
055:        public interface CookieParser extends ValueParser {
056:            int AGE_SESSION = -1;
057:            int AGE_DELETE = 0;
058:
059:            /**
060:             * Gets the parsed RunData.
061:             *
062:             * @return the parsed RunData object or null.
063:             * @deprecated. Don't use the Run Data object. use getRequest().
064:             */
065:            RunData getRunData();
066:
067:            /**
068:             * Gets the Request Object for this parser.
069:             *
070:             * @return the HttpServletRequest or null.
071:             */
072:            HttpServletRequest getRequest();
073:
074:            /**
075:             * Sets the RunData to be parsed.
076:             * All previous cookies will be cleared.
077:             *
078:             * @param data the RunData object.
079:             * @deprecated. Use setData (HttpServletRequest request, HttpServletResponse response) instead
080:             */
081:            void setRunData(RunData data);
082:
083:            /**
084:             * Sets Request and Response to be parsed.
085:             *
086:             * All previous cookies will be cleared.
087:             *
088:             * @param request The http request from the servlet
089:             * @param response The http reponse from the servlet
090:             */
091:            void setData(HttpServletRequest request,
092:                    HttpServletResponse response);
093:
094:            /**
095:             * Get the Path where cookies will be stored
096:             */
097:            URI getCookiePath();
098:
099:            /**
100:             * Set the path for cookie storage
101:             */
102:            void setCookiePath(URI path);
103:
104:            /**
105:             * Set a cookie that will be stored on the client for
106:             * the duration of the session.
107:             */
108:            void set(String name, String value);
109:
110:            /**
111:             * Set a persisten cookie on the client that will expire
112:             * after a maximum age (given in seconds).
113:             */
114:            void set(String name, String value, int seconds_age);
115:
116:            /**
117:             * Remove a previously set cookie from the client machine.
118:             */
119:            void unset(String name);
120:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.