Package org.internna.iwebmvc

Examples of org.internna.iwebmvc.IWebMvcException


            if (hasText(id)) {
                Assert.isEncrypted(decipherer, id);
                return new UUID(decipherer.decrypt(id));
            }
            } catch (Exception e) {
                throw new ConversionException(paramType, new IWebMvcException("Could not convert UUID from: " + data, e));
            }
      }
        return null;
    }
View Full Code Here


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

            FullTextQuery hq = fullTextEntityManager.createFullTextQuery(parser.parse(query.trim().replaceAll(" ", "* ") + "*"), 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

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

        try {
            String name = ClassUtils.getActualClass(data).getName();
            if (name.indexOf("_$$_javassist") > 0) name = name.substring(0, name.indexOf("_$$_javassist"));
            return new NonNestedOutboundVariable(data == null ? "null" : "'" + cipherer.encrypt(name) + "'");
        } catch (Exception e) {
            throw new ConversionException(data.getClass(), new IWebMvcException("Could not generate encrypted class name from: " + data, e));
        }
    }
View Full Code Here

        if (!isAuthority(authority)) {
            try {
                Role role = roleClass.newInstance();
                entityManager.persist(role.setRole(authority));
            } catch (Exception ex) {
                throw new IWebMvcException("Could not create new role", ex);
            }
        }
    }
View Full Code Here

                type = new BeanWrapperImpl(type.newInstance()).getPropertyType(parts[index]);
            Field field = getField(type, parts[parts.length - 1]);
            Class<?> enumType = field.getType();
            return enumType.isEnum() && (position < enumType.getEnumConstants().length) ? enumType.getEnumConstants()[position] : null;
      } catch (Exception ex) {
            throw new IWebMvcException("Could not get enum value from [" + clazz.getName() + "] with position [" + position + "]", ex);
      }
    }
View Full Code Here

            try {
                String points = data.getValue();
                rating.setRating(hasText(points) ? Double.parseDouble(points) : 0D);
                return rating;
            } catch (Exception e) {
                throw new ConversionException(paramType, new IWebMvcException("Could not convert Rating from: " + data, e));
            }
      }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.internna.iwebmvc.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.