Package org.jresearch.flexess.core.model.uam

Examples of org.jresearch.flexess.core.model.uam.Permission


    this.permissionInstanceService = permissionInstanceService;
  }

  @Override
  public void executeRule(IRuleDefinition rule) throws RuleExecutionException {
    Permission oldPermission = (Permission) rule.getParent();
    EAttribute newAttribute = (EAttribute) rule.getSource();
    String defaultValue = newAttribute.getDefaultValueLiteral();
    String appId = ((SecurityModel) oldPermission.getEPackage()).getId();
    List<IPermissionInstanceMetaInfo> permissions = permissionInstanceService.getPermissionInstanceByPermission(appId, oldPermission.getId());
    for (IPermissionInstanceMetaInfo info : permissions) {
      IPermissionParameter parameter = info.getPermissionParameterByName(newAttribute.getName());
      try {
        EcoreUtil.createFromString(newAttribute.getEAttributeType(), parameter.getValue());
      } catch (Exception e) {
View Full Code Here


    this.permissionInstanceService = permissionInstanceService;
  }

  @Override
  public void executeRule(IRuleDefinition rule) throws RuleExecutionException {
    Permission permission = (Permission) rule.getParent();
    EAttribute attribute = (EAttribute) rule.getSource();
    String appId = ((SecurityModel) permission.getEPackage()).getId();
    List<IPermissionInstanceMetaInfo> permissions = permissionInstanceService.getPermissionInstanceByPermission(appId, permission.getId());
    for (IPermissionInstanceMetaInfo info : permissions) {
      info.removePermissionParameterByName(attribute.getName());
      try {
        permissionInstanceService.savePermissionInstance(info);
      } catch (DataModelException e) {
View Full Code Here

  private IRoleInstanceService roleInstanceService;

  @Override
  public void executeRule(IRuleDefinition rule) throws RuleExecutionException {
    Role role = (Role) rule.getParent();
    Permission permission = (Permission) rule.getSource();
    String appId = ((SecurityModel) permission.getEPackage()).getId();
    List<IRoleInstanceMetaInfo> instances = roleInstanceService.getRoleInstances(appId, role.getId());
    for (IRoleInstanceMetaInfo info : instances) {
      info.removePermissionInstance(permission.getId());
      try {
        roleInstanceService.saveRoleInstance(info);
      } catch (DataModelException e) {
        // should never happen
        logger.error("Error saving role instabce", e); //$NON-NLS-1$
View Full Code Here

    //
    if (args.length == 0) {
      System.out.println("Enter a list of file paths or URIs that have content like this:");
      try {
        Resource resource = resourceSet.createResource(URI.createURI("http:///My.uam"));
        Permission root = UamFactory.eINSTANCE.createPermission();
        resource.getContents().add(root);
        resource.save(System.out, null);
      }
      catch (IOException exception) {
        exception.printStackTrace();
View Full Code Here

TOP

Related Classes of org.jresearch.flexess.core.model.uam.Permission

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.