View Javadoc

1   /* 
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.jetspeed.prefs.om;
18  
19  import java.io.Serializable;
20  import java.util.Collection;
21  import java.sql.Timestamp;
22  
23  /***
24   * <p>Interface representing a {@link java.util.prefs.Preferences}
25   * node.</p>
26   *
27   * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
28   */
29  public interface Node extends Serializable, Cloneable
30  {
31  
32      /***
33       * <p>Getter for the node id.</p>
34       * @return The node id.
35       */
36      long getNodeId();
37  
38      /***
39       * <p>Setter for the node id.</p>
40       * @param nodeId The node id.
41       */
42      void setNodeId(long nodeId);
43  
44      /***
45       * <p>Getter for the parent node id.</p>
46       * <p>Passed as an Integer to be able to pass null if no parent
47       * is associated to a node.</p>
48       * @return The parent node id.
49       */
50      Long getParentNodeId();
51  
52      /***
53       * <p>Setter for the parent node id.</p>
54       * @param parentNodeId The parent node id.
55       */
56      void setParentNodeId(Long parentNodeId);
57  
58      /***
59       * <p>Getter for the node properties.</p>
60       * @return The node properties.
61       */
62      Collection getNodeProperties();
63  
64      /***
65       * <p>Setter for the node properties.</p>
66       * @param properties The node properties.
67       */
68      void setNodeProperties(Collection nodeProperties);
69  
70      /***
71       * <p>Getter for the keys associated to a specific nodes.</p>
72       * @return The node keys.
73       */
74      Collection getNodeKeys();
75  
76      /***
77       * <p>Setter for the keys associated to a specific nodes.</p>
78       * @param nodeKeys The node keys.
79       */
80      void setNodeKeys(Collection nodeKeys);
81  
82      /***
83       * <p>Getter for the node name.</p>
84       * @return The node name.
85       */
86       String getNodeName();
87  
88      /***
89       * <p>Setter for the node name.</p>
90       * @param nodeName The node name.
91       */
92       void setNodeName(String nodeName);
93  
94      /***
95       * <p>Getter for the node type.</p>
96       * <ul>
97       *     <li>0=user,</li>
98       *     <li>1=system,</li>
99       * </ul>
100      * @return The node type.
101      */
102     int getNodeType();
103 
104     /***
105      * <p>Setter for the node type.</p>
106      * <ul>
107      *     <li>0=user,</li>
108      *     <li>1=system,</li>
109      * </ul>
110      * @param nodeType The node type.
111      */
112     void setNodeType(int nodeType);
113 
114     /***
115      * <p>Getter for the full path.</p>
116      * @return The full path.
117      */
118     String getFullPath();
119 
120     /***
121      * <p>Setter for the full path.</p>
122      * @param fullPath The full path.
123      */
124     void setFullPath(String fullPath);
125 
126     /***
127      * <p>Getter for creation date.</p>
128      * @return The creation date.
129      */
130     Timestamp getCreationDate();
131 
132     /***
133      * <p>Setter for the creation date.</p>
134      * @param creationDate The creation date.
135      */
136     void setCreationDate(Timestamp creationDate);
137 
138     /***
139      * <p>Getter for the modified date.</p>
140      * @return The modified date.
141      */
142     Timestamp getModifiedDate();
143 
144     /***
145      * <p>Setter for the modified date.</p>
146      * @param modifiedDate The modified date.
147      */
148     void setModifiedDate(Timestamp modifiedDate);
149 
150 }