1 /* 2 * jDTAUS Banking RI DTAUS 3 * Copyright (C) 2005 Christian Schulte 4 * <cs@schulte.it> 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 * 20 */ 21 package org.jdtaus.banking.dtaus.ri.zka; 22 23 import org.jdtaus.banking.dtaus.PhysicalFileException; 24 import org.jdtaus.core.lang.util.ExceptionMessageResolver; 25 import org.jdtaus.core.text.Message; 26 import org.jdtaus.core.text.Messages; 27 28 /** 29 * {@code ExceptionMessageResolver} producing {@code Message}s for 30 * {@code PhysicalFileException} instances. 31 * 32 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 33 * @version $JDTAUS: PhysicalFileExceptionMessageResolver.java 8661 2012-09-27 11:29:58Z schulte $ 34 * 35 * @see ExceptionMessageResolver 36 */ 37 public final class PhysicalFileExceptionMessageResolver 38 implements ExceptionMessageResolver 39 { 40 41 public Message[] resolve( final Exception exception ) 42 { 43 Message[] resolved = null; 44 45 if ( exception != null && exception instanceof PhysicalFileException ) 46 { 47 final PhysicalFileException e = (PhysicalFileException) exception; 48 final Messages msgs = new Messages(); 49 msgs.addMessages( e.getMessages() ); 50 resolved = msgs.getMessages(); 51 } 52 53 return resolved; 54 } 55 56 //--Constructors------------------------------------------------------------ 57 58 // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausConstructors 59 // This section is managed by jdtaus-container-mojo. 60 61 /** Standard implementation constructor <code>org.jdtaus.banking.dtaus.ri.zka.PhysicalFileExceptionMessageResolver</code>. */ 62 public PhysicalFileExceptionMessageResolver() 63 { 64 super(); 65 } 66 67 // </editor-fold>//GEN-END:jdtausConstructors 68 69 //------------------------------------------------------------Constructors-- 70 }