KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > dictionary > M2AspectDefinition


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.dictionary;
18
19 import java.util.Map JavaDoc;
20
21 import org.alfresco.service.cmr.dictionary.AspectDefinition;
22 import org.alfresco.service.cmr.dictionary.AssociationDefinition;
23 import org.alfresco.service.cmr.dictionary.ModelDefinition;
24 import org.alfresco.service.cmr.dictionary.PropertyDefinition;
25 import org.alfresco.service.namespace.NamespacePrefixResolver;
26 import org.alfresco.service.namespace.QName;
27
28
29 /**
30  * Compiled Aspect Definition.
31  *
32  * @author David Caruana
33  */

34 /*package*/ class M2AspectDefinition extends M2ClassDefinition
35     implements AspectDefinition
36 {
37
38     /*package*/ M2AspectDefinition(ModelDefinition model, M2Aspect m2Aspect, NamespacePrefixResolver resolver, Map JavaDoc<QName, PropertyDefinition> modelProperties, Map JavaDoc<QName, AssociationDefinition> modelAssociations)
39     {
40         super(model, m2Aspect, resolver, modelProperties, modelAssociations);
41     }
42
43     @Override JavaDoc
44     public String JavaDoc getDescription()
45     {
46         String JavaDoc value = M2Label.getLabel(model, "aspect", name, "description");
47         
48         // if we don't have a description call the super class
49
if (value == null)
50         {
51            value = super.getDescription();
52         }
53         
54         return value;
55     }
56
57     @Override JavaDoc
58     public String JavaDoc getTitle()
59     {
60         String JavaDoc value = M2Label.getLabel(model, "aspect", name, "title");
61         
62         // if we don't have a title call the super class
63
if (value == null)
64         {
65            value = super.getTitle();
66         }
67         
68         return value;
69    }
70 }
71
Popular Tags