Package org.internna.iwebmvc.core

Examples of org.internna.iwebmvc.core.IWebMvcException


            FullTextQuery hq = fullTextEntityManager.createFullTextQuery(parsedquery, clazz);
            hq.setMaxResults(number > 0 ? number : MAX_RESULTS);
            hq.setFirstResult(offset > 0 ? offset : 0);
            return hq.getResultList();
        } catch (Exception ex) {
            throw new IWebMvcException("Could not perform search", ex);
        }
    }
View Full Code Here


        documentRepository.store(holder);
        try {
            dao.create(new TemporalFile(holder.getUri()));
        } catch (Exception e) {
            documentRepository.delete(holder.getUri());
            throw new IWebMvcException("Could not create temporal file", e);
        }
        return holder;
    }
View Full Code Here

            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

                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

    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

        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

    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

        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

        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

        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

TOP

Related Classes of org.internna.iwebmvc.core.IWebMvcException

Copyright © 2018 www.massapicom. 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.