Source Code Cross Referenced for TrustStoreInfo.java in  » Net » QuickServer » org » quickserver » util » xmlreader » 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 » Net » QuickServer » org.quickserver.util.xmlreader 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * This file is part of the QuickServer library 
003:         * Copyright (C) 2003-2005 QuickServer.org
004:         *
005:         * Use, modification, copying and distribution of this software is subject to
006:         * the terms and conditions of the GNU Lesser General Public License. 
007:         * You should have received a copy of the GNU LGP License along with this 
008:         * library; if not, you can download a copy from <http://www.quickserver.org/>.
009:         *
010:         * For questions, suggestions, bug-reports, enhancement-requests etc.
011:         * visit http://www.quickserver.org
012:         *
013:         */
014:
015:        package org.quickserver.util.xmlreader;
016:
017:        /**
018:         * This class encapsulate Trust Store.
019:         * The example xml is <pre>
020:         ....
021:         &lt;trust-store-info&gt;
022:         &lt;store-file&gt;NONE&lt;/store-file&gt;
023:         &lt;store-password&gt;&lt;/store-password&gt;
024:         &lt;/trust-store-info&gt;
025:         ....
026:         </pre>
027:         * @see KeyStoreInfo
028:         * @see SecureStore
029:         * @see Secure
030:         * @author Akshathkumar Shetty
031:         * @since 1.4
032:         */
033:        public class TrustStoreInfo implements  java.io.Serializable {
034:            private String storeFile = "NONE";
035:            private String storePassword = null;
036:            private String type = null;
037:            private String provider = null;
038:
039:            /**
040:             * Sets the store file path. This can be either absolute or
041:             * relative(to config file) path to the store file.
042:             * XML Tag: &lt;store-file&gt;NONE&lt;/store-file&gt;
043:             * @param storeFile store file.
044:             * @see #getStoreFile
045:             */
046:            public void setStoreFile(String storeFile) {
047:                if (storeFile != null && storeFile.trim().length() != 0)
048:                    this .storeFile = storeFile;
049:            }
050:
051:            /**
052:             * Returns the store file path. This can be either absolute or
053:             * relative(to config file) path to the store file.
054:             * @see #setStoreFile
055:             */
056:            public String getStoreFile() {
057:                return storeFile;
058:            }
059:
060:            /**
061:             * Sets the store password.
062:             * XML Tag: &lt;store-password&gt;&lt;/store-password&gt;
063:             * @param storePassword store password
064:             * @see #getStorePassword
065:             */
066:            public void setStorePassword(String storePassword) {
067:                if (storePassword != null)
068:                    this .storePassword = storePassword;
069:            }
070:
071:            /**
072:             * Returns store password.
073:             * @see #setStorePassword
074:             */
075:            public String getStorePassword() {
076:                return storePassword;
077:            }
078:
079:            /**
080:             * Sets the type of trust store.
081:             * If not set, it will use value from SecureStore<br/>
082:             * XML Tag: &lt;type&gt;JKS&lt;/type&gt;
083:             * @param type of keystore.
084:             * @see #getType
085:             */
086:            public void setType(String type) {
087:                if (type != null && type.trim().length() != 0)
088:                    this .type = type;
089:            }
090:
091:            /**
092:             * Returns the type of truststore.
093:             * @see #setType
094:             */
095:            public String getType() {
096:                return type;
097:            }
098:
099:            /**
100:             * Sets the provider of trust store. If not set, it will use value from SecureStore<br/>
101:             * XML Tag: &lt;provider&gt;SUN&lt;/provider&gt;
102:             * @param provider of keystore.
103:             * @see #getProvider
104:             */
105:            public void setProvider(String provider) {
106:                if (provider != null && provider.trim().length() != 0)
107:                    this .provider = provider;
108:            }
109:
110:            /**
111:             * Returns the provider of keystore.
112:             * @see #setProvider
113:             */
114:            public String getProvider() {
115:                return provider;
116:            }
117:
118:            /**
119:             * Returns XML config of this class.
120:             */
121:            public String toXML(String pad) {
122:                if (pad == null)
123:                    pad = "";
124:                StringBuffer sb = new StringBuffer();
125:                sb.append(pad + "<trust-store-info>\n");
126:                sb.append(pad + "\t<store-file>").append(getStoreFile())
127:                        .append("</store-file>\n");
128:                if (getStorePassword() != null)
129:                    sb.append(pad).append("\t<store-password>").append(
130:                            getStorePassword()).append("</store-password>\n");
131:                else
132:                    sb.append(pad).append("\t</store-password>\n");
133:                if (getType() != null)
134:                    sb.append(pad).append("\t<type>").append(getType()).append(
135:                            "</type>\n");
136:                if (getProvider() != null)
137:                    sb.append(pad).append("\t<provider>").append(getProvider())
138:                            .append("</provider>\n");
139:                sb.append(pad + "</trust-store-info>\n");
140:                return sb.toString();
141:            }
142:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.