Examples of RuleExecutionException


Examples of org.candlepin.policy.js.RuleExecutionException

            log.warn("No method found: " + SELECT_POOL_FUNCTION);
            log.warn("Resorting to default pool selection behavior.");
            return selectBestPoolDefault(pools);
        }
        catch (RhinoException e) {
            throw new RuleExecutionException(e);
        }

        if (pools.size() > 0 && (result == null || result.isEmpty())) {
            throw new RuleExecutionException(
                "Rule did not select a pool for products: " + Arrays.toString(productIds));
        }

        List<PoolQuantity> bestPools = new ArrayList<PoolQuantity>();
        for (Pool p : pools) {
View Full Code Here

Examples of org.candlepin.policy.js.RuleExecutionException

        try {
            result = objectMapper.toObject(json, ValidationResult.class);
            finishValidation(result, entitlementPool, quantity);
        }
        catch (Exception e) {
            throw new RuleExecutionException(e);
        }

        return result;
    }
View Full Code Here

Examples of org.candlepin.policy.js.RuleExecutionException

                eventSinkProvider.get().emitCompliance(c, c.getEntitlements(), result);
            }
            return result;
        }
        catch (Exception e) {
            throw new RuleExecutionException(e);
        }
    }
View Full Code Here

Examples of org.jresearch.flexess.core.checker.RuleExecutionException

      if (newAttr != null) {
        // attribute already exists
        EClassifier oldType = oldAttr.getEType();
        EClassifier newType = newAttr.getEType();
        if ((oldType == null) || (newType == null)) {
          RuleExecutionException ex = new RuleExecutionException(MessageFormat.format("Either old or new type of the {0} attribute is null", oldAttr.getName())); //$NON-NLS-1$
          exceptions.add(ex);
          continue;
        }
        if (oldAttr.getEType().getClassifierID() != newAttr.getEType().getClassifierID()) {
          try {
View Full Code Here

Examples of org.jresearch.flexess.core.checker.RuleExecutionException

    IRoleMetaInfo roleMetaInfo = null;
    String modelId = ((SecurityModel) role.getEPackage()).getId();
    try {
      roleMetaInfo = roleService.findDynamicRole(modelId, role.getName());
    } catch (ObjectNotFoundException e1) {
      throw new RuleExecutionException(modelId, "Model is not found.");
    }
    if (roleMetaInfo != null) {
      throw new RuleExecutionException(role.getName(), "Dynamic role template with such name exists");
    }
  }
View Full Code Here

Examples of org.jresearch.flexess.core.checker.RuleExecutionException

    for (IPermissionInstanceMetaInfo info : permissions) {
      info.addPermissionParameter(makePermissionParameter(info, attribute));
      try {
        permissionInstanceService.savePermissionInstance(info);
      } catch (DataModelException e) {
        throw new RuleExecutionException(attribute.getName(), e.getMessage());
      }
    }
  }
View Full Code Here

Examples of org.jresearch.flexess.core.checker.RuleExecutionException

    // Check name duplicate
    SecurityModel model = (SecurityModel) r.getSource();
    Collection<SecurityModel> models = modelService.getEmfModels();
    for (SecurityModel securityModel : models) {
      if ((model.getName().equals(securityModel.getName())) && (!securityModel.getId().equals(model.getId()))) {
        throw new RuleExecutionException(MessageFormat.format("Another model with the {0} name exists. Duplicate model names are not allowed.", model.getName())); //$NON-NLS-1$
      }
    }
  }
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.