Examples of SecurityRule


Examples of com.cloud.network.security.SecurityRule

        return "revokesecuritygroupegress";
    }

    @Override
    public long getEntityOwnerId() {
        SecurityRule rule = _entityMgr.findById(SecurityRule.class, getId());
        if (rule != null) {
            SecurityGroup group = _entityMgr.findById(SecurityGroup.class, rule.getSecurityGroupId());
            if (group != null) {
                return group.getAccountId();
            }
        }
View Full Code Here

Examples of com.cloud.network.security.SecurityRule

        return "revokesecuritygroupingress";
    }

    @Override
    public long getEntityOwnerId() {
        SecurityRule rule = _entityMgr.findById(SecurityRule.class, getId());
        if (rule != null) {
            SecurityGroup group = _entityMgr.findById(SecurityGroup.class, rule.getSecurityGroupId());
            if (group != null) {
                return group.getAccountId();
            }
        }
View Full Code Here

Examples of com.cloud.network.security.SecurityRule

        return "revokesecuritygroupegress";
    }

    @Override
    public long getEntityOwnerId() {
        SecurityRule rule = _entityMgr.findById(SecurityRule.class, getId());
        if (rule != null) {
            SecurityGroup group = _entityMgr.findById(SecurityGroup.class, rule.getSecurityGroupId());
            if (group != null) {
                return group.getAccountId();
            }
        }
View Full Code Here

Examples of com.cloud.network.security.SecurityRule

        return "revokesecuritygroupingress";
    }

    @Override
    public long getEntityOwnerId() {
        SecurityRule rule = _entityMgr.findById(SecurityRule.class, getId());
        if (rule != null) {
            SecurityGroup group = _entityMgr.findById(SecurityGroup.class, rule.getSecurityGroupId());
            if (group != null) {
                return group.getAccountId();
            }
        }
View Full Code Here

Examples of com.cloud.network.security.SecurityRule

        return "revokesecuritygroupegress";
    }

    @Override
    public long getEntityOwnerId() {
        SecurityRule rule = _entityMgr.findById(SecurityRule.class, getId());
        if (rule != null) {
            SecurityGroup group = _entityMgr.findById(SecurityGroup.class, rule.getSecurityGroupId());
            if (group != null) {
                return group.getAccountId();
            }
        }
View Full Code Here

Examples of com.cloud.network.security.SecurityRule

        return "revokesecuritygroupingress";
    }

    @Override
    public long getEntityOwnerId() {
        SecurityRule rule = _entityMgr.findById(SecurityRule.class, getId());
        if (rule != null) {
            SecurityGroup group = _entityMgr.findById(SecurityGroup.class, rule.getSecurityGroupId());
            if (group != null) {
                return group.getAccountId();
            }
        }
View Full Code Here

Examples of org.springframework.webflow.security.SecurityRule

  public void testFlowSecured() {
    model.setSecured(new SecuredModel("ROLE_USER"));
    model.setStates(singleList(new EndStateModel("end")));
    Flow flow = getFlow(model);
    SecurityRule rule = (SecurityRule) flow.getAttributes().get(SecurityRule.SECURITY_ATTRIBUTE_NAME);
    assertNotNull(rule);
    assertEquals(SecurityRule.COMPARISON_ANY, rule.getComparisonType());
    assertEquals(1, rule.getAttributes().size());
    assertTrue(rule.getAttributes().contains("ROLE_USER"));
  }
View Full Code Here

Examples of org.springframework.webflow.security.SecurityRule

  public void testFlowSecuredState() {
    EndStateModel end = new EndStateModel("end");
    end.setSecured(new SecuredModel("ROLE_USER"));
    model.setStates(singleList(end));
    Flow flow = getFlow(model);
    SecurityRule rule = (SecurityRule) flow.getState("end").getAttributes().get(
        SecurityRule.SECURITY_ATTRIBUTE_NAME);
    assertNotNull(rule);
    assertEquals(SecurityRule.COMPARISON_ANY, rule.getComparisonType());
    assertEquals(1, rule.getAttributes().size());
    assertTrue(rule.getAttributes().contains("ROLE_USER"));
  }
View Full Code Here

Examples of org.springframework.webflow.security.SecurityRule

    TransitionModel transition = new TransitionModel();
    transition.setTo("end");
    transition.setSecured(new SecuredModel("ROLE_USER"));
    model.setGlobalTransitions(singleList(transition));
    Flow flow = getFlow(model);
    SecurityRule rule = (SecurityRule) flow.getGlobalTransitionSet().toArray()[0].getAttributes().get(
        SecurityRule.SECURITY_ATTRIBUTE_NAME);
    assertNotNull(rule);
    assertEquals(SecurityRule.COMPARISON_ANY, rule.getComparisonType());
    assertEquals(1, rule.getAttributes().size());
    assertTrue(rule.getAttributes().contains("ROLE_USER"));
  }
View Full Code Here

Examples of org.springframework.webflow.security.SecurityRule

    }
  }

  private void parseAndPutSecured(SecuredModel secured, MutableAttributeMap attributes) {
    if (secured != null) {
      SecurityRule rule = new SecurityRule();
      rule.setAttributes(SecurityRule.commaDelimitedListToSecurityAttributes(secured.getAttributes()));
      String comparisonType = secured.getMatch();
      if ("any".equals(comparisonType)) {
        rule.setComparisonType(SecurityRule.COMPARISON_ANY);
      } else if ("all".equals(comparisonType)) {
        rule.setComparisonType(SecurityRule.COMPARISON_ALL);
      } else {
        // default to any
        rule.setComparisonType(SecurityRule.COMPARISON_ANY);
      }
      attributes.put(SecurityRule.SECURITY_ATTRIBUTE_NAME, rule);
    }
  }
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.