Package org.impalaframework.exception

Examples of org.impalaframework.exception.InvalidStateException


       
        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


        //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 {
            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

    public static byte[] getBytes(File file) throws IOException {
        if (file == null)
            throw new IllegalArgumentException("File is null");

        if (!file.exists())
            throw new InvalidStateException("File " + file + " does not exist");

        return FileCopyUtils.copyToByteArray(file);
    }
View Full Code Here

      else {
        String parentName = parent.getName();
        newParent = newRootDefinition.findChildDefinition(parentName, true);

        if (newParent == null) {
          throw new InvalidStateException("Unable to find parent module '" + parentName + "' in " + newRootDefinition);
        }
      }

      newParent.addChildModuleDefinition(moduleDefinition);
     
View Full Code Here

          TransitionSet transitions = calculator.getTransitions(oldRootDefinition, newRootDefinition);
          moduleStateHolder.processTransitions(transitions);
          return true;
        }
        else {
          throw new InvalidStateException("Module to remove does not have a parent module. "
              + "This is unexpected state and may indicate a bug");
        }
      }
    }
    return false;
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

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.