001
014
015 package com.liferay.portlet.dynamicdatamapping;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018
019
022 public class RequiredTemplateException extends PortalException {
023
024 public RequiredTemplateException() {
025 }
026
027 public RequiredTemplateException(String msg) {
028 super(msg);
029 }
030
031 public RequiredTemplateException(String msg, Throwable cause) {
032 super(msg, cause);
033 }
034
035 public RequiredTemplateException(Throwable cause) {
036 super(cause);
037 }
038
039 public static class MustNotDeleteTemplateReferencedByTemplateLinks
040 extends RequiredTemplateException {
041
042 public MustNotDeleteTemplateReferencedByTemplateLinks(long templateId) {
043 super(
044 String.format(
045 "Template %s cannot be deleted because it is " +
046 "referenced by one or more template links",
047 templateId));
048 }
049
050 }
051
052 }