Package com.baasbox.exception

Examples of com.baasbox.exception.ConfigurationException


      for (Object v : values) {
          try {
        if ( ((String)en.getMethod("getKey").invoke(v)).equalsIgnoreCase(iKey)  )
          return v;
      } catch (Exception e) {
        throw new ConfigurationException ("Is it " + en.getCanonicalName() + " an Enum that implements the IProperties interface?",e );
      }
        }
    return null;
  //findByKey
View Full Code Here


          try {
            String key=StringUtils.join(Arrays.copyOfRange(splittedKeys, 1, splittedKeys.length),".");
        if ( ((String)en.getMethod("getKey").invoke(v)).equalsIgnoreCase(key)  )
          return v;
      } catch (Exception e) {
        throw new ConfigurationException ("Is it " + en.getCanonicalName() + " an Enum that implements the IProperties interface?",e );
      }
        }
    return null;
  //findByKey
View Full Code Here

    }catch (Exception e) {
      if (e.getCause() instanceof IllegalStateException) throw new IllegalStateException(e.getCause());
      if (e.getCause() instanceof PushSwitchException) throw (PushSwitchException) e.getCause();
      if (e.getCause() instanceof PushNotInitializedException) throw (PushNotInitializedException) e.getCause();
      if (e.getCause() instanceof PushInvalidApiKeyException) throw (PushInvalidApiKeyException) e.getCause();
      throw new ConfigurationException ("Invalid key (" +iKey+ ") or value (" +value+")"  ,e );
    }
  }  //setByKey
View Full Code Here

      String[] splittedKeys=completeKey.split("\\.");
      String section=splittedKeys[0];
      Class en = PropertiesConfigurationHelper.CONFIGURATION_SECTIONS.get(section);
      en.getMethod("override",Object.class).invoke(enumValue,value);
    } catch (Exception e) {
      throw new ConfigurationException ("Invalid key -" +completeKey+ "- or value -" +value+"-"  ,e );
    }
  }
View Full Code Here

      String section=splittedKeys[0];
      Class en = PropertiesConfigurationHelper.CONFIGURATION_SECTIONS.get(section);
      en.getMethod("setVisible",boolean.class).invoke(enumValue,value);
    } catch (Exception e) {
      Logger.error("Invalid key -" +completeKey+ "- or value -" +value+"-",e);
      throw new ConfigurationException ("Invalid key -" +completeKey+ "- or value -" +value+"-"  ,e );
    }
  }
View Full Code Here

      String section=splittedKeys[0];
      Class en = PropertiesConfigurationHelper.CONFIGURATION_SECTIONS.get(section);
      en.getMethod("setEditable",boolean.class).invoke(enumValue,value);
    } catch (Exception e) {
      Logger.error("Invalid key -" +completeKey+ "- or value -" +value+"-",e);
      throw new ConfigurationException ("Invalid key -" +completeKey+ "- or value -" +value+"-"  ,e );
    }
  }
View Full Code Here

TOP

Related Classes of com.baasbox.exception.ConfigurationException

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.