Source Code Cross Referenced for CookieValuePersisterSettings.java in  » J2EE » wicket » org » apache » wicket » markup » html » form » persistence » 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 » J2EE » wicket » org.apache.wicket.markup.html.form.persistence 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:        package org.apache.wicket.markup.html.form.persistence;
018:
019:        import org.apache.wicket.IClusterable;
020:
021:        /**
022:         * This class provides default values that are used by the CookieValuePersister
023:         * class when it creates cookies.
024:         * 
025:         * @author Juergen Donnerstag
026:         */
027:        public class CookieValuePersisterSettings implements  IClusterable {
028:            private static final long serialVersionUID = 1L;
029:
030:            /** Max age that the component will be persisted in seconds. */
031:            private int maxAge = 3600 * 24 * 30; // 30 days
032:
033:            /** Cookie comment. */
034:            private String comment;
035:
036:            /** Cookie domain. */
037:            private String domain;
038:
039:            /** Whether the cookie is secure. */
040:            private boolean secure;
041:
042:            /** Cookie version. */
043:            private int version;
044:
045:            /**
046:             * Gets the max age. After
047:             * 
048:             * @return the max age
049:             */
050:            public int getMaxAge() {
051:                return maxAge;
052:            }
053:
054:            /**
055:             * Sets the maximum age of the cookie in seconds.
056:             * 
057:             * @param maxAge
058:             *            the max age in secs.
059:             */
060:            public void setMaxAge(int maxAge) {
061:                this .maxAge = maxAge;
062:            }
063:
064:            /**
065:             * Gets the cookie comment.
066:             * 
067:             * @return the cookie comment
068:             */
069:            public String getComment() {
070:                return comment;
071:            }
072:
073:            /**
074:             * Sets the cookie comment.
075:             * 
076:             * @param comment
077:             *            the cookie comment
078:             */
079:            public void setComment(String comment) {
080:                this .comment = comment;
081:            }
082:
083:            /**
084:             * Gets the cookie domain name.
085:             * 
086:             * @return the cookie domain name
087:             */
088:            public String getDomain() {
089:                return domain;
090:            }
091:
092:            /**
093:             * Sets the cookie domain name.
094:             * 
095:             * @param domain
096:             *            the cookie domain name
097:             */
098:            public void setDomain(String domain) {
099:                this .domain = domain;
100:            }
101:
102:            /**
103:             * Returns true if the browser is sending cookies only over a secure
104:             * protocol, or false if the browser can send cookies using any protocol.
105:             * 
106:             * @return whether this cookie is secure
107:             */
108:            public boolean getSecure() {
109:                return secure;
110:            }
111:
112:            /**
113:             * Indicates to the browser whether the cookie should only be sent using a
114:             * secure protocol, such as HTTPS or SSL.
115:             * 
116:             * @param secure
117:             *            if true, sends the cookie from the browser to the server using
118:             *            only when using a secure protocol; if false, sent on any
119:             *            protocol
120:             */
121:            public void setSecure(boolean secure) {
122:                this .secure = secure;
123:            }
124:
125:            /**
126:             * Returns the version of the protocol this cookie complies with. Version 1
127:             * complies with RFC 2109, and version 0 complies with the original cookie
128:             * specification drafted by Netscape. Cookies provided by a browser use and
129:             * identify the browser's cookie version.
130:             * 
131:             * @return 0 if the cookie complies with the original Netscape
132:             *         specification; 1 if the cookie complies with RFC 2109
133:             */
134:            public int getVersion() {
135:                return version;
136:            }
137:
138:            /**
139:             * Sets the version of the cookie protocol this cookie complies with.
140:             * Version 0 complies with the original Netscape cookie specification.
141:             * Version 1 complies with RFC 2109. <br/>Since RFC 2109 is still somewhat
142:             * new, consider version 1 as experimental; do not use it yet on production
143:             * sites.
144:             * 
145:             * @param version
146:             *            0 if the cookie should comply with the original Netscape
147:             *            specification; 1 if the cookie should comply with RFC 2109
148:             */
149:            public void setVersion(int version) {
150:                this.version = version;
151:            }
152:        }
w_w___w_.___j___a__v__a___2_s___.___c___o__m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.