Examples of CMBException


Examples of com.comcast.cmb.common.util.CMBException

    while (policyIterator.hasNext()) {
     
      String policyAttribute = policyIterator.next();
     
      if (!CMBPolicy.POLICY_ATTRIBUTES.contains(policyAttribute)) {
          throw new CMBException(CMBErrorCodes.InvalidAttributeValue, "Invalid value for the parameter Policy");
      }
     
    }
 
    JSONArray stmts = json.getJSONArray("Statement");
   
    if (stmts != null) {
     
      for (int i=0; i<stmts.length(); i++) {
       
        Iterator<String> stmtIterator = stmts.getJSONObject(i).keys();
       
        while (stmtIterator.hasNext()) {
         
          String statementAttribute = stmtIterator.next();
         
          if (!CMBPolicy.STATEMENT_ATTRIBUTES.contains(statementAttribute)) {
                throw new CMBException(CMBErrorCodes.InvalidAttributeValue, "Invalid value for the parameter Policy");
          }
        }
      }
    }
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.