KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > service > cmr > dictionary > ClassDefinition


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.service.cmr.dictionary;
18
19 import java.io.Serializable JavaDoc;
20 import java.util.List JavaDoc;
21 import java.util.Map JavaDoc;
22
23 import org.alfresco.service.namespace.QName;
24
25 /**
26  * Read-only definition of a Class.
27  *
28  * @author David Caruana
29  */

30 public interface ClassDefinition
31 {
32     /**
33      * @return defining model
34      */

35     public ModelDefinition getModel();
36
37     /**
38      * @return the qualified name of the class
39      */

40     public QName getName();
41     
42     /**
43      * @return the human-readable class title
44      */

45     public String JavaDoc getTitle();
46     
47     /**
48      * @return the human-readable class description
49      */

50     public String JavaDoc getDescription();
51     
52     /**
53      * @return the super class (or null, if this is the root)
54      */

55     public QName getParentName();
56     
57     /**
58      * @return true => aspect, false => type
59      */

60     public boolean isAspect();
61
62     /**
63      * @return the properties of the class, including inherited properties
64      */

65     public Map JavaDoc<QName, PropertyDefinition> getProperties();
66     
67     /**
68      * @return a map containing the default property values, including inherited properties
69      */

70     public Map JavaDoc<QName, Serializable JavaDoc> getDefaultValues();
71     
72     /**
73      * Fetch all associations for which this is a source type, including child associations.
74      *
75      * @return the associations including inherited ones
76      * @see ChildAssociationDefinition
77      */

78     public Map JavaDoc<QName, AssociationDefinition> getAssociations();
79     
80     /**
81      * @return true => this class supports child associations
82      */

83     public boolean isContainer();
84     
85     /**
86      * Fetch only child associations for which this is a source type.
87      *
88      * @return all child associations applicable to this type, including those
89      * inherited from super types
90      */

91     public Map JavaDoc<QName, ChildAssociationDefinition> getChildAssociations();
92
93     /**
94      * Fetch all associations for which this is a target type, including child associations.
95      *
96      * @return the associations including inherited ones
97      */

98     // TODO: public Map<QName, AssociationDefinition> getTargetAssociations();
99

100     /**
101      * @return the default aspects associated with this type
102      */

103     public List JavaDoc<AspectDefinition> getDefaultAspects();
104     
105 }
106
Popular Tags