Examples of IWebMvcException


Examples of org.internna.iwebmvc.core.IWebMvcException

            for (String column : data.getColumns()) reportBuilder.addColumn(column, column, String.class.getName(), 1);
            JRDataSource ds = new JRBeanCollectionDataSource(data.getData(), false);
            JasperPrint jp = DynamicJasperHelper.generateJasperPrint(reportBuilder.build(), new ClassicLayoutManager(), ds);
            return "EXCEL".equals(docType) ? exportToExcel(jp) : exportToPDF(jp);
        } catch (Exception e) {
            throw new IWebMvcException("Error building grid report", e);
        }
    }
View Full Code Here

Examples of org.internna.iwebmvc.core.IWebMvcException

                String id = LocalUtil.decode(data.getValue());
                Assert.isEncrypted(decipherer, id);
                return new UUID(decipherer.decrypt(id));
            }
        } catch (Exception e) {
            throw new MarshallException(paramType, new IWebMvcException("Could not convert UUID from: " + data, e));
        }
        return null;
    }
View Full Code Here

Examples of org.internna.iwebmvc.core.IWebMvcException

    public OutboundVariable convertOutbound(Object data, OutboundContext ctx) throws MarshallException {
        if (decipherer == null) initEncryption();
        try {
            return new NonNestedOutboundVariable("'" + cipherer.encrypt(((UUID) data).toString()) + "'");
        } catch (Exception e) {
            throw new MarshallException(data.getClass(), new IWebMvcException("Could not generate encrypted UUID from: " + data, e));
        }
    }
View Full Code Here

Examples of org.internna.iwebmvc.core.IWebMvcException

        String className = LocalUtil.decode(data.getValue());
        try {
            Assert.isEncrypted(decipherer, className);
            return ClassUtils.forName(decipherer.decrypt(className));
        } catch (Exception cne) {
            throw new MarshallException(paramType, new IWebMvcException("Could not convert class from: " + className, cne));
        }
    }
View Full Code Here

Examples of org.internna.iwebmvc.core.IWebMvcException

    public OutboundVariable convertOutbound(Object data, OutboundContext ctx) throws MarshallException {
        if (decipherer == null) initEncryption();
        try {
            return new NonNestedOutboundVariable("'" + cipherer.encrypt(((Class<?>) data).getName()) + "'");
        } catch (Exception e) {
            throw new MarshallException(data.getClass(), new IWebMvcException("Could not generate encrypted class name from: " + data, e));
        }
    }
View Full Code Here

Examples of org.internna.iwebmvc.core.IWebMvcException

        DocumentHolder doc = new DocumentHolder();
        try {
            doc.setUri(uri);
            doc.setStream(new FileInputStream(new File(documentRoot, uri)));
        } catch (IOException ioe) {
            throw new IWebMvcException(ioe);
        }
        return doc;
    }
View Full Code Here

Examples of org.internna.iwebmvc.core.IWebMvcException

        Assert.notNull(document);
        try {
            document.setSizeInBytes(FileCopyUtils.copy(document.getStream(), getFileLocation(document)));
        } catch (IOException io) {
            log.warn("Could not store the document [" + document + "]");
            throw new IWebMvcException(io);
        }
    }
View Full Code Here

Examples of org.internna.iwebmvc.core.IWebMvcException

        try {
            SAXReader reader = new SAXReader();
            return reader.read(in);
        } catch (Exception e) {
            log.warn("Could not read and parse XML document from stream [" + in + "]", e);
            throw new IWebMvcException(e);
        }
    }
View Full Code Here

Examples of org.internna.iwebmvc.core.IWebMvcException

    }

    @AfterClass
    public static void tearDown() {
        IO.delete(root);
        if (root.exists()) throw new IWebMvcException("Please manually delete " + root.getAbsolutePath());
    }
View Full Code Here

Examples of org.internna.iwebmvc.core.IWebMvcException

    }

    @AfterClass
    public static void tearDown() {
        IO.delete(root);
        if (root.exists()) throw new IWebMvcException("Please manually delete " + root.getAbsolutePath());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.