1 17 package org.alfresco.repo.dictionary; 18 19 import java.util.Date ; 20 21 import org.alfresco.service.cmr.dictionary.ModelDefinition; 22 import org.alfresco.service.namespace.NamespacePrefixResolver; 23 import org.alfresco.service.namespace.QName; 24 25 31 public class M2ModelDefinition implements ModelDefinition 32 { 33 private QName name; 34 private M2Model model; 35 36 37 M2ModelDefinition(M2Model model, NamespacePrefixResolver resolver) 38 { 39 this.name = QName.createQName(model.getName(), resolver); 40 this.model = model; 41 } 42 43 44 47 public QName getName() 48 { 49 return name; 50 } 51 52 53 56 public String getDescription() 57 { 58 String value = M2Label.getLabel(this, null, null, "description"); 59 if (value == null) 60 { 61 value = model.getDescription(); 62 } 63 return value; 64 } 65 66 67 70 public String getAuthor() 71 { 72 return model.getAuthor(); 73 } 74 75 76 79 public Date getPublishedDate() 80 { 81 return model.getPublishedDate(); 82 } 83 84 85 88 public String getVersion() 89 { 90 return model.getVersion(); 91 } 92 93 } 94 | Popular Tags |