KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > domain > Node


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.repo.domain;
18
19 import java.util.Collection JavaDoc;
20 import java.util.Map JavaDoc;
21 import java.util.Set JavaDoc;
22
23 import org.alfresco.service.cmr.repository.NodeRef;
24 import org.alfresco.service.namespace.QName;
25
26 /**
27  * Interface for persistent <b>node</b> objects.
28  * <p>
29  * Specific instances of nodes are unique, but may share GUIDs across stores.
30  *
31  * @author Derek Hulley
32  */

33 public interface Node
34 {
35     /**
36      * @return Returns the unique key for this node
37      */

38     public NodeKey getKey();
39
40     /**
41      * @param key the unique node key
42      */

43     public void setKey(NodeKey key);
44     
45     public Store getStore();
46     
47     public void setStore(Store store);
48     
49     public QName getTypeQName();
50     
51     public void setTypeQName(QName typeQName);
52
53     /**
54      * Set the status of the node. This is compulsory, but a node
55      * status may exist without a node being present.
56      *
57      * @param nodeStatus
58      */

59     public void setStatus(NodeStatus nodeStatus);
60     
61     /**
62      * Get the mandatory node status object
63      *
64      * @return
65      */

66     public NodeStatus getStatus();
67     
68     public Set JavaDoc<QName> getAspects();
69     
70     /**
71      * @return Returns all the regular associations for which this node is a target
72      */

73     public Collection JavaDoc<NodeAssoc> getSourceNodeAssocs();
74
75     /**
76      * @return Returns all the regular associations for which this node is a source
77      */

78     public Collection JavaDoc<NodeAssoc> getTargetNodeAssocs();
79
80     public Collection JavaDoc<ChildAssoc> getChildAssocs();
81
82     public Collection JavaDoc<ChildAssoc> getParentAssocs();
83
84     public Map JavaDoc<QName, PropertyValue> getProperties();
85
86     /**
87      * Convenience method to get the reference to the node
88      *
89      * @return Returns the reference to this node
90      */

91     public NodeRef getNodeRef();
92 }
93
Popular Tags