001    /*
002     * file StpPropertyException.java
003     *
004     * Licensed Materials - Property of IBM
005     * Restricted Materials of IBM 
006     *
007     * com.ibm.rational.wvcm.stp.StpPropertyException
008     *
009     * (C) Copyright IBM Corporation 2006, 2008.  All Rights Reserved.
010     * Note to U.S. Government Users Restricted Rights:  Use, duplication or 
011     * disclosure restricted by GSA ADP  Schedule Contract with IBM Corp.
012     */
013    
014    package com.ibm.rational.wvcm.stp;
015    
016    import javax.wvcm.Resource;
017    import javax.wvcm.WvcmException;
018    import javax.wvcm.PropertyNameList.PropertyName;
019    
020    
021    /**
022     * The base exception class for errors associated with the reading or writing of
023     * resource properties and meta-properties.
024     */
025    public abstract class StpPropertyException extends StpException
026    {
027    
028        /**
029         * Returns the name of the property with which this exception is associated.
030         *
031         * @return The property name. Will never be null.
032         */
033        public PropertyName<?> getPropertyName()
034        { return ((PropertyData)data()).getPropertyName(); }
035        
036        /**
037         * Constructs this exception object for its subclasses.
038         * 
039         * @param resource The Resource argument to WvcmException
040         * @param reasonCode The ReasonCode argument to WvcmException
041         * @param nestedExceptions The Throwable[] argument to WvcmException
042         * 
043         * @see javax.wvcm.WvcmException
044         */
045        protected StpPropertyException(Resource resource,
046                                    ReasonCode reasonCode,
047                                    Throwable... nestedExceptions)
048        {
049            super(resource, reasonCode, nestedExceptions);
050        }
051    
052        /** 
053         * The interface specification for the implementation data object 
054         * associated with this exception
055         */
056        public interface PropertyData extends Data
057        {
058            public PropertyName<?> getPropertyName();
059        }
060    }