1 17 package org.alfresco.service.cmr.repository; 18 19 import java.text.MessageFormat ; 20 21 import org.alfresco.service.namespace.QName; 22 23 28 public class AspectMissingException extends RuntimeException 29 { 30 private static final long serialVersionUID = 3257852099244210228L; 31 32 private QName missingAspect; 33 private NodeRef nodeRef; 34 35 38 private static final String ERROR_MESSAGE = "The {0} aspect is missing from this node (id: {1}). " + 39 "It is required for this operation."; 40 41 44 public AspectMissingException(QName missingAspect, NodeRef nodeRef) 45 { 46 super(MessageFormat.format(ERROR_MESSAGE, new Object []{missingAspect.toString(), nodeRef.getId()})); 47 this.missingAspect = missingAspect; 48 this.nodeRef = nodeRef; 49 } 50 51 public QName getMissingAspect() 52 { 53 return missingAspect; 54 } 55 56 public NodeRef getNodeRef() 57 { 58 return nodeRef; 59 } 60 } 61 | Popular Tags |