Package org.jresearch.flexess.core.checker

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


    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

    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

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

Related Classes of org.jresearch.flexess.core.checker.RuleExecutionException

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.