Package org.impalaframework.exception

Examples of org.impalaframework.exception.InvalidStateException


       //TODO introduce constants for bean names
    ModuleManagementFacade facade = ObjectUtils.cast(applicationContext.getBean("moduleManagementFacade"),
        ModuleManagementFacade.class);
   
    if (facade == null) {
      throw new InvalidStateException("Application context '" + applicationContext.getDisplayName()
          + "' does not contain bean named 'moduleManagementFacade'");
    }
   
    setNewOperationsFacade(facade);
    bundleContext.registerService(OperationsFacade.class.getName(), operations, null);
View Full Code Here


        try {
            Long intValue = Long.parseLong(toString);
            return intValue;
        }
        catch (NumberFormatException e) {
            throw new InvalidStateException("Attribute with name '" + attributeName + "', and value '"
                    + object + "' is not a valid Long value");
        }
    }
View Full Code Here

        try {
            Integer intValue = Integer.parseInt(toString);
            return intValue;
        }
        catch (NumberFormatException e) {
            throw new InvalidStateException("Attribute with name '" + attributeName + "', and value '"
                    + object + "' is not an integer");
        }
    }
View Full Code Here

       
        try {
            return Double.parseDouble(toString);
        }
        catch (NumberFormatException e) {
            throw new InvalidStateException("Attribute with name '" + attributeName + "', and value '"
                    + object + "' is not a double");
        }
    }
View Full Code Here

        try {
            Map<String, Object> toReturn = (Map<String, Object>) object;
            return toReturn;
        }
        catch (ClassCastException e) {
            throw new InvalidStateException("Attribute with name '" + attributeName + "', and value '"
                    + object + "' is not a valid map");
        }
    }
View Full Code Here

        try {
            Integer intValue = Integer.parseInt(toString);
            return intValue;
        }
        catch (NumberFormatException e) {
            throw new InvalidStateException("Attribute with name '" + attributeName + "', and value '"
                    + object + "' is not an integer");
        }
    }
View Full Code Here

       
        try {
            return Double.parseDouble(toString);
        }
        catch (NumberFormatException e) {
            throw new InvalidStateException("Attribute with name '" + attributeName + "', and value '"
                    + object + "' is not a double");
        }
    }
View Full Code Here

        try {
            Map<String, Object> toReturn = (Map<String, Object>) object;
            return toReturn;
        }
        catch (ClassCastException e) {
            throw new InvalidStateException("Attribute with name '" + attributeName + "', and value '"
                    + object + "' is not a valid map");
        }
    }
View Full Code Here

        if (!ArrayUtils.isNullOrEmpty(proxyTypes)) {
            ProxyFactorySourceUtils.addInterfaces(proxyFactory, proxyTypes);
        } else {
            boolean isFinal = Modifier.isFinal(reference.getServiceBeanReference().getService().getClass().getModifiers());
            if (isFinal) {
                throw new InvalidStateException("Cannot create proxy for service reference " + reference + " as no interfaces have been " +
                        "specified and the bean class is final, therefore cannot be proxied");
            }
        }

        afterInit(proxyFactory, targetSource);
View Full Code Here

       
        if (proxyTypes.length == 1) {
            if (!proxyTypes[0].isInterface()) {
                boolean isFinal = Modifier.isFinal(proxyTypes[0].getModifiers());
                if (isFinal) {
                    throw new InvalidStateException("Cannot create proxy for bean " + getBeanName() + " as no interfaces have been " +
                            " specified and the bean class is final, therefore cannot be proxied");
                }
                targetClass = proxyTypes[0];
            } else {
                targetClass = null;
View Full Code Here

TOP

Related Classes of org.impalaframework.exception.InvalidStateException

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.