public static JasperDesign getJasperDesign ( final Instance _instance ) throws EFapsException { final Checkout checkout = new Checkout ( _instance ) ; final InputStream source = checkout . execute ( ) ; JasperDesign jasperDesign = null ; try { JasperUtil . LOG . debug ( "Loading JasperDesign for :{}" , _instance ) ; final DefaultJasperReportsContext reportContext = DefaultJasperReportsContext . getInstance ( ) ; final JRXmlLoader loader = new JRXmlLoader ( reportContext , JRXmlDigesterFactory . createDigester ( reportContext ) ) ; jasperDesign = loader . loadXML ( source ) ; } catch ( final ParserConfigurationException e ) { throw new EFapsException ( JasperUtil . class , "getJasperDesign" , e ) ; } catch ( final SAXException e ) { throw new EFapsException ( JasperUtil . class , "getJasperDesign" , e ) ; } catch ( final JRException e ) { throw new EFapsException ( JasperUtil . class , "getJasperDesign" , e ) ; } return jasperDesign ; }
Get a JasperDesign for an instance .