001/* 002 * (C) Copyright 2013 Nuxeo SA (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl-2.1.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * vpasquier <vpasquier@nuxeo.com> 016 */ 017package org.nuxeo.ecm.automation.core.exception; 018 019/** 020 * @since 5.7.3 021 */ 022public class CatchChainException { 023 024 protected final String chainId; 025 026 protected final Integer priority; 027 028 protected final String filterId; 029 030 protected final Boolean rollBack; 031 032 public CatchChainException() { 033 chainId = ""; 034 priority = 0; 035 rollBack = true; 036 filterId = ""; 037 } 038 039 public CatchChainException(String chainId, Integer priority, Boolean rollBack, String filterId) { 040 this.chainId = chainId; 041 this.priority = priority; 042 this.rollBack = rollBack; 043 this.filterId = filterId; 044 } 045 046 public String getChainId() { 047 return chainId; 048 } 049 050 public Integer getPriority() { 051 return priority; 052 } 053 054 public Boolean getRollBack() { 055 return rollBack; 056 } 057 058 public String getFilterId() { 059 return filterId; 060 } 061 062 public Boolean hasFilter() { 063 return !filterId.isEmpty(); 064 } 065 066}