001/* 002 * jDTAUS Banking RI DTAUS 003 * Copyright (C) 2005 Christian Schulte 004 * <cs@schulte.it> 005 * 006 * This library is free software; you can redistribute it and/or 007 * modify it under the terms of the GNU Lesser General Public 008 * License as published by the Free Software Foundation; either 009 * version 2.1 of the License, or any later version. 010 * 011 * This library is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 014 * Lesser General Public License for more details. 015 * 016 * You should have received a copy of the GNU Lesser General Public 017 * License along with this library; if not, write to the Free Software 018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 019 * 020 */ 021package org.jdtaus.banking.dtaus.ri.zka; 022 023import org.jdtaus.banking.dtaus.PhysicalFileException; 024import org.jdtaus.core.lang.util.ExceptionMessageResolver; 025import org.jdtaus.core.text.Message; 026import org.jdtaus.core.text.Messages; 027 028/** 029 * {@code ExceptionMessageResolver} producing {@code Message}s for 030 * {@code PhysicalFileException} instances. 031 * 032 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 033 * @version $JDTAUS: PhysicalFileExceptionMessageResolver.java 8661 2012-09-27 11:29:58Z schulte $ 034 * 035 * @see ExceptionMessageResolver 036 */ 037public final class PhysicalFileExceptionMessageResolver 038 implements ExceptionMessageResolver 039{ 040 041 public Message[] resolve( final Exception exception ) 042 { 043 Message[] resolved = null; 044 045 if ( exception != null && exception instanceof PhysicalFileException ) 046 { 047 final PhysicalFileException e = (PhysicalFileException) exception; 048 final Messages msgs = new Messages(); 049 msgs.addMessages( e.getMessages() ); 050 resolved = msgs.getMessages(); 051 } 052 053 return resolved; 054 } 055 056 //--Constructors------------------------------------------------------------ 057 058// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausConstructors 059 // This section is managed by jdtaus-container-mojo. 060 061 /** Standard implementation constructor <code>org.jdtaus.banking.dtaus.ri.zka.PhysicalFileExceptionMessageResolver</code>. */ 062 public PhysicalFileExceptionMessageResolver() 063 { 064 super(); 065 } 066 067// </editor-fold>//GEN-END:jdtausConstructors 068 069 //------------------------------------------------------------Constructors-- 070}