001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package javax.resource.spi;
023:
024: import java.beans.PropertyDescriptor;
025:
026: import javax.resource.ResourceException;
027:
028: import org.jboss.util.id.SerialVersion;
029:
030: /**
031: * Represents invalid configuration properties
032: */
033: public class InvalidPropertyException extends ResourceException {
034: /** @since 4.0.2 */
035: static final long serialVersionUID;
036: static {
037: if (SerialVersion.version == SerialVersion.LEGACY)
038: serialVersionUID = -2395559483586818078L;
039: else
040: serialVersionUID = -485903720300735741L;
041: }
042:
043: /** The invalidProperties */
044: private PropertyDescriptor[] invalidProperties;
045:
046: /**
047: * Create an invalid property exception.
048: */
049: public InvalidPropertyException() {
050: super ();
051: }
052:
053: /**
054: * Create an invalid property exception with a reason.
055: *
056: * @param reason the reason
057: */
058: public InvalidPropertyException(String reason) {
059: super (reason);
060: }
061:
062: /**
063: * Create an invalid property exception with a reason and an errorCode.
064: *
065: * @param reason the reason
066: * @param errorCode the error code
067: */
068: public InvalidPropertyException(String reason, String errorCode) {
069: super (reason, errorCode);
070: }
071:
072: /**
073: * Create an invalid property exception with a reason and an error.
074: *
075: * @param reason the reason
076: * @param throwable the error
077: */
078: public InvalidPropertyException(String reason, Throwable throwable) {
079: super (reason, throwable);
080: }
081:
082: /**
083: * Create an invalid property exception with an error.
084: *
085: * @param throwable the error
086: */
087: public InvalidPropertyException(Throwable throwable) {
088: super (throwable);
089: }
090:
091: /**
092: * Get the invalid property descriptors
093: *
094: * @return an array of invalid property descriptors
095: */
096: public PropertyDescriptor[] getInvalidPropertyDescriptors() {
097: return invalidProperties;
098: }
099:
100: /**
101: * Set the invalid property descriptors
102: *
103: * @param an array of invalid property descriptors
104: */
105: public void setInvalidPropertyDescriptors(
106: PropertyDescriptor[] invalidProperties) {
107: this.invalidProperties = invalidProperties;
108: }
109: }
|