Source Code Cross Referenced for NodeImpl.java in  » Portal » jetspeed-2.1.3 » org » apache » jetspeed » prefs » om » impl » 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 » Portal » jetspeed 2.1.3 » org.apache.jetspeed.prefs.om.impl 
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.jetspeed.prefs.om.impl;
018:
019:        import java.sql.Timestamp;
020:        import java.util.ArrayList;
021:        import java.util.Collection;
022:
023:        import org.apache.jetspeed.prefs.om.Node;
024:
025:        /**
026:         * <p>
027:         * {@link Node}interface implementation.
028:         * </p>
029:         * <p>
030:         * Represents a preferences node.
031:         * </p>
032:         * 
033:         * @author <a href="mailto:dlestrat@apache.org">David Le Strat </a>
034:         */
035:        public class NodeImpl implements  Node {
036:            /** The serial version uid. */
037:            private static final long serialVersionUID = -5367800007757021163L;
038:
039:            private long nodeId;
040:
041:            private Long parentNodeId;
042:
043:            private Collection nodeProperties;
044:
045:            private Collection nodeKeys;
046:
047:            private String nodeName;
048:
049:            private int nodeType;
050:
051:            private String fullPath;
052:
053:            private Timestamp creationDate;
054:
055:            /**
056:             * <p>
057:             * Preferences node implementation default constructor.
058:             * </p>
059:             */
060:            public NodeImpl() {
061:            }
062:
063:            /**
064:             * <p>
065:             * Node constructor given:
066:             * </p>
067:             * <ul>
068:             * <li>Parent node id,</li>
069:             * <li>Property set definition id: Long so that we can pass null value if
070:             * the node does not have any properties associated to it,</li>
071:             * <li>Node name,</li>
072:             * <li>Node type,</li>
073:             * <li>Full path.</li>
074:             * </ul>
075:             * 
076:             * @param parentNodeId The parent node id.
077:             * @param nodeName The node name.
078:             * @param nodeType The node type.
079:             * @param fullPath The full path.
080:             */
081:            public NodeImpl(Long parentNodeId, String nodeName, int nodeType,
082:                    String fullPath) {
083:                this .parentNodeId = parentNodeId;
084:                this .nodeName = nodeName;
085:                this .nodeType = nodeType;
086:                this .fullPath = fullPath;
087:                this .nodeKeys = new ArrayList(0);
088:                this .nodeProperties = new ArrayList(0);
089:                this .creationDate = new Timestamp(System.currentTimeMillis());
090:                this .modifiedDate = this .creationDate;
091:            }
092:
093:            /**
094:             * @see org.apache.jetspeed.prefs.om.Node#getNodeId()
095:             */
096:            public long getNodeId() {
097:                return this .nodeId;
098:            }
099:
100:            /**
101:             * @see org.apache.jetspeed.prefs.om.Node#setNodeId(int)
102:             */
103:            public void setNodeId(long nodeId) {
104:                this .nodeId = nodeId;
105:            }
106:
107:            /**
108:             * @see org.apache.jetspeed.prefs.om.Node#getParentNodeId()
109:             */
110:            public Long getParentNodeId() {
111:                return this .parentNodeId;
112:            }
113:
114:            /**
115:             * @see org.apache.jetspeed.prefs.om.Node#setParentNodeId(java.lang.Long)
116:             */
117:            public void setParentNodeId(Long parentNodeId) {
118:                this .parentNodeId = parentNodeId;
119:            }
120:
121:            /**
122:             * @see org.apache.jetspeed.prefs.om.Node#getNodeProperties()
123:             */
124:            public Collection getNodeProperties() {
125:                return this .nodeProperties;
126:            }
127:
128:            /**
129:             * @see org.apache.jetspeed.prefs.om.Node#setNodeProperties(java.util.Collection)
130:             */
131:            public void setNodeProperties(Collection nodeProperties) {
132:                this .nodeProperties = nodeProperties;
133:            }
134:
135:            /**
136:             * @see org.apache.jetspeed.prefs.om.Node#getNodeKeys()
137:             */
138:            public Collection getNodeKeys() {
139:                return this .nodeKeys;
140:            }
141:
142:            /**
143:             * @see org.apache.jetspeed.prefs.om.Node#setNodeKeys(java.util.Collection)
144:             */
145:            public void setNodeKeys(Collection nodeKeys) {
146:                this .nodeKeys = nodeKeys;
147:            }
148:
149:            /**
150:             * @see org.apache.jetspeed.prefs.om.Node#getNodeName()
151:             */
152:            public String getNodeName() {
153:                return this .nodeName;
154:            }
155:
156:            /**
157:             * @see org.apache.jetspeed.prefs.om.Node#setNodeName(java.lang.String)
158:             */
159:            public void setNodeName(String nodeName) {
160:                this .nodeName = nodeName;
161:            }
162:
163:            /**
164:             * @see org.apache.jetspeed.prefs.om.Node#getNodeType()
165:             */
166:            public int getNodeType() {
167:                return this .nodeType;
168:            }
169:
170:            /**
171:             * @see org.apache.jetspeed.prefs.om.Node#setNodeType(int)
172:             */
173:            public void setNodeType(int nodeType) {
174:                this .nodeType = nodeType;
175:            }
176:
177:            /**
178:             * @see org.apache.jetspeed.prefs.om.Node#getFullPath()
179:             */
180:            public String getFullPath() {
181:                return this .fullPath;
182:            }
183:
184:            /**
185:             * @see org.apache.jetspeed.prefs.om.Node#setFullPath(java.lang.String)
186:             */
187:            public void setFullPath(String fullPath) {
188:                this .fullPath = fullPath;
189:            }
190:
191:            /**
192:             * @see org.apache.jetspeed.prefs.om.Node#getCreationDate()
193:             */
194:            public Timestamp getCreationDate() {
195:                return this .creationDate;
196:            }
197:
198:            /**
199:             * @see org.apache.jetspeed.prefs.om.Node#setCreationDate(java.sql.Timestamp)
200:             */
201:            public void setCreationDate(Timestamp creationDate) {
202:                this .creationDate = creationDate;
203:            }
204:
205:            private Timestamp modifiedDate;
206:
207:            /**
208:             * @see org.apache.jetspeed.prefs.om.Node#getModifiedDate()
209:             */
210:            public Timestamp getModifiedDate() {
211:                return this .modifiedDate;
212:            }
213:
214:            /**
215:             * @see org.apache.jetspeed.prefs.om.Node#setModifiedDate(java.sql.Timestamp)
216:             */
217:            public void setModifiedDate(Timestamp modifiedDate) {
218:                this .modifiedDate = modifiedDate;
219:            }
220:
221:            public boolean equals(Object o) {
222:                return fullPath != null && o != null && o instanceof  NodeImpl
223:                        && ((NodeImpl) o).fullPath != null
224:                        && fullPath.equals(((NodeImpl) o).fullPath);
225:            }
226:
227:            /**
228:             * <p>
229:             * Convert <code>Node</code> to string.
230:             * </p>
231:             * 
232:             * @return The Node string value.
233:             */
234:            public String toString() {
235:                String toStringNode = "[[parentNodeId, " + this .parentNodeId
236:                        + "], " + "[nodeName, " + this .nodeName + "], "
237:                        + "[fullPath, " + this .fullPath + "], " + "[nodeType, "
238:                        + this .nodeType + "], " + "[nodeKeys, " + this .nodeKeys
239:                        + "], " + "[nodeProperties, " + this .nodeProperties
240:                        + "], " + "[creationDate, " + this .creationDate + "], "
241:                        + "[modifiedDate, " + this .modifiedDate + "]]";
242:                return toStringNode;
243:            }
244:
245:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.