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;
018:
019: import java.io.Serializable;
020: import java.util.Collection;
021: import java.sql.Timestamp;
022:
023: /**
024: * <p>Interface representing a {@link java.util.prefs.Preferences}
025: * node.</p>
026: *
027: * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
028: */
029: public interface Node extends Serializable, Cloneable {
030:
031: /**
032: * <p>Getter for the node id.</p>
033: * @return The node id.
034: */
035: long getNodeId();
036:
037: /**
038: * <p>Setter for the node id.</p>
039: * @param nodeId The node id.
040: */
041: void setNodeId(long nodeId);
042:
043: /**
044: * <p>Getter for the parent node id.</p>
045: * <p>Passed as an Integer to be able to pass null if no parent
046: * is associated to a node.</p>
047: * @return The parent node id.
048: */
049: Long getParentNodeId();
050:
051: /**
052: * <p>Setter for the parent node id.</p>
053: * @param parentNodeId The parent node id.
054: */
055: void setParentNodeId(Long parentNodeId);
056:
057: /**
058: * <p>Getter for the node properties.</p>
059: * @return The node properties.
060: */
061: Collection getNodeProperties();
062:
063: /**
064: * <p>Setter for the node properties.</p>
065: * @param properties The node properties.
066: */
067: void setNodeProperties(Collection nodeProperties);
068:
069: /**
070: * <p>Getter for the keys associated to a specific nodes.</p>
071: * @return The node keys.
072: */
073: Collection getNodeKeys();
074:
075: /**
076: * <p>Setter for the keys associated to a specific nodes.</p>
077: * @param nodeKeys The node keys.
078: */
079: void setNodeKeys(Collection nodeKeys);
080:
081: /**
082: * <p>Getter for the node name.</p>
083: * @return The node name.
084: */
085: String getNodeName();
086:
087: /**
088: * <p>Setter for the node name.</p>
089: * @param nodeName The node name.
090: */
091: void setNodeName(String nodeName);
092:
093: /**
094: * <p>Getter for the node type.</p>
095: * <ul>
096: * <li>0=user,</li>
097: * <li>1=system,</li>
098: * </ul>
099: * @return The node type.
100: */
101: int getNodeType();
102:
103: /**
104: * <p>Setter for the node type.</p>
105: * <ul>
106: * <li>0=user,</li>
107: * <li>1=system,</li>
108: * </ul>
109: * @param nodeType The node type.
110: */
111: void setNodeType(int nodeType);
112:
113: /**
114: * <p>Getter for the full path.</p>
115: * @return The full path.
116: */
117: String getFullPath();
118:
119: /**
120: * <p>Setter for the full path.</p>
121: * @param fullPath The full path.
122: */
123: void setFullPath(String fullPath);
124:
125: /**
126: * <p>Getter for creation date.</p>
127: * @return The creation date.
128: */
129: Timestamp getCreationDate();
130:
131: /**
132: * <p>Setter for the creation date.</p>
133: * @param creationDate The creation date.
134: */
135: void setCreationDate(Timestamp creationDate);
136:
137: /**
138: * <p>Getter for the modified date.</p>
139: * @return The modified date.
140: */
141: Timestamp getModifiedDate();
142:
143: /**
144: * <p>Setter for the modified date.</p>
145: * @param modifiedDate The modified date.
146: */
147: void setModifiedDate(Timestamp modifiedDate);
148:
149: }
|