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
014package com.ibm.rational.wvcm.stp;
015
016import javax.wvcm.PropertyNameList.PropertyName;
017import javax.wvcm.Resource;
018
019
020/**
021 * The base exception class for errors associated with the reading or writing of
022 * resource properties and meta-properties.
023 */
024public abstract class StpPropertyException extends StpException
025{
026
027    /**
028     * Returns the name of the property with which this exception is associated.
029     *
030     * @return The property name. Will never be null.
031     */
032    public PropertyName<?> getPropertyName()
033    { return ((PropertyData)data()).getPropertyName(); }
034    
035    /**
036     * Constructs this exception object for its subclasses.
037     * 
038     * @param resource The Resource argument to WvcmException
039     * @param reasonCode The ReasonCode argument to WvcmException
040     * @param nestedExceptions The Throwable[] argument to WvcmException
041     * 
042     * @see javax.wvcm.WvcmException
043     */
044    protected StpPropertyException(Resource resource,
045                                ReasonCode reasonCode,
046                                Throwable... nestedExceptions)
047    {
048        super(resource, reasonCode, nestedExceptions);
049    }
050
051    /** 
052     * The interface specification for the implementation data object 
053     * associated with this exception
054     */
055    public interface PropertyData extends Data
056    {
057        public PropertyName<?> getPropertyName();
058    }
059}