Package com.sun.xacml

Examples of com.sun.xacml.Target


  {
    final CombiningAlgorithm alg = getCombiningAlgorithm();
    if(!(alg instanceof PolicyCombiningAlgorithm))
      {throw new IllegalStateException("Combining algorithm must be a policy combining algorithm");}
    final PolicyCombiningAlgorithm algorithm = (PolicyCombiningAlgorithm)alg;
    final Target target = getTarget().getTarget();
    final List<PolicyTreeElement> copy = new ArrayList<PolicyTreeElement>(children.size());
    for(final PolicyElementNode child : children)
      copy.add(child.create());
    final URI useId = (id == null) ? getId() : id;
    return new PolicySet(useId, algorithm, getDescription(), target, copy);
View Full Code Here


    return new PolicySet(URI.create(policySetID), alg, createEmptyTarget());
  }

  public static Target createEmptyTarget()
  {
    return new Target(Collections.EMPTY_LIST, Collections.EMPTY_LIST, Collections.EMPTY_LIST);
  }
View Full Code Here

  {
    return createDefaultPolicy(createUniqueId(parent, DEFAULT_POLICY_ID));
  }
  public static Policy createDefaultPolicy(String policyID)
  {
    final Target emptyTarget = createEmptyTarget();
    final RuleCombiningAlgorithm alg = new OrderedPermitOverridesRuleAlg();
    final Rule denyEverythingRule = createDefaultRule("DenyAll");
    final List<Rule> rules = Collections.singletonList(denyEverythingRule);
    return new Policy(URI.create(policyID), alg, DEFAULT_DESCRIPTION, emptyTarget, rules);
  }
View Full Code Here

  {
    return createPolicy(null);
  }
  public Policy createPolicy(URI id)
  {
    final Target target = getTarget().getTarget();
    final RuleCombiningAlgorithm algorithm = (RuleCombiningAlgorithm)getCombiningAlgorithm();
    final List<Rule> rawRules = new ArrayList<Rule>(rules.size());
    for(final RuleNode rule : rules)
      rawRules.add(rule.createRule());
    final URI useId = (id == null) ? getId() : id;
View Full Code Here

  public void setNode(XACMLTreeNode treeNode)
  {
    if(!(treeNode instanceof TargetNode))
      {throw new IllegalArgumentException("TargetEditor can only edit TargetNodes");}
    this.node = (TargetNode)treeNode;
    final Target target = node.getTarget();
   
    ((TargetTableModel)subjectTargetTable.getModel()).setTarget(target == null ? null : target.getSubjects());
    ((TargetTableModel)actionTargetTable.getModel()).setTarget(target == null ? null : target.getActions());
    ((TargetTableModel)resourceTargetTable.getModel()).setTarget(target == null ? null : target.getResources());
    //XACML 2.0:
    //environmentTargetModel.setTarget(target.getEnvironment());
  }
View Full Code Here

    final List<List<TargetMatch>> subjects = ((TargetTableModel)subjectTargetTable.getModel()).createTarget();
    final List<List<TargetMatch>> resources = ((TargetTableModel)resourceTargetTable.getModel()).createTarget();
    final List<List<TargetMatch>> actions = ((TargetTableModel)actionTargetTable.getModel()).createTarget();
    //XACML 2.0:
    //List environments = ((TargetTableModel)environmentTargetTable.getModel()).createTarget();
    final Target target = new Target(subjects, resources, actions);
    node.setTarget(target);
  }
View Full Code Here

        m_policyIndex = policyIndex;
        m_combiningAlg = combiningAlg;
        m_policyFinder = policyFinder;
        m_target =
                new Target(new TargetSection(null,
                                             TargetMatch.SUBJECT,
                                             PolicyMetaData.XACML_VERSION_2_0),
                           new TargetSection(null,
                                             TargetMatch.RESOURCE,
                                             PolicyMetaData.XACML_VERSION_2_0),
View Full Code Here

TOP

Related Classes of com.sun.xacml.Target

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.