Examples of PolicyNode


Examples of com.getperka.flatpack.policy.pst.PolicyNode

   * Tweak the value-stack push method to record the line number on which the current rule started.
   */
  @Override
  public boolean push(Object value) {
    if (value instanceof PolicyNode) {
      PolicyNode x = (PolicyNode) value;
      int startIndex = getContext().getStartIndex();
      x.setLineNumber(getContext().getInputBuffer().getPosition(startIndex).line);
    }
    return super.push(value);
  }
View Full Code Here

Examples of com.getperka.flatpack.policy.pst.PolicyNode

  protected String summarizeLocation() {
    if (location.isEmpty()) {
      return null;
    }
    PolicyNode node = location.peek();

    String toReturn = node.toString();

    if (node.getLineNumber() == -1) {
      toReturn += " (Unknown line)";
    } else {
      toReturn += " (Line " + node.getLineNumber() + ")";
    }
    return toReturn;
  }
View Full Code Here

Examples of eu.planets_project.pp.plato.model.PolicyNode

            Policy p = new Policy();
            p.setValue(getTEXT());
            return p;

        } else {
            PolicyNode node = new PolicyNode();

            node.setName(getTEXT());

            for (Node n : children) {
                if (n.isLeaf()) {
                    Policy p = new Policy();
                    p.setValue(n.getTEXT());
                    //Policy p = (Policy)n.createPolicyNode();
                    p.setName(getTEXT());
                    return p;
                } else {
                    node.addChild(n.createPolicyNode());
                }
            }

            return node;
        }
View Full Code Here

Examples of eu.planets_project.pp.plato.model.PolicyNode

                && selectedPlan.getProjectBasis().getPolicyTree().getRoot() == null) {
           
            if (user.getOrganisation() != null
                    && user.getOrganisation().getPolicyTree() != null) {
               
                PolicyNode clone = user.getOrganisation().getPolicyTree().getRoot().clone();
               
                selectedPlan.getProjectBasis().getPolicyTree().setRoot(clone);
            }
           
        }
View Full Code Here

Examples of eu.scape_project.planning.model.PolicyNode

    public void init(Plan plan) {
        super.init(plan);

        policyRoots.clear();
        if (plan.getProjectBasis().getPolicyTree() != null) {
            PolicyNode policyRoot = plan.getProjectBasis().getPolicyTree().getRoot();
            if (policyRoot != null) {
                policyRoots.add(policyRoot);
                policytreeHelper.expandAll(policyRoot);
            }
        }
View Full Code Here

Examples of eu.scape_project.planning.model.PolicyNode

            leafBeans.add(new ReportLeaf(l, plan.getAlternativesDefinition().getConsideredAlternatives()));
        }

        policyRoots.clear();
        if (plan.getProjectBasis().getPolicyTree() != null) {
            PolicyNode policyRoot = plan.getProjectBasis().getPolicyTree().getRoot();
            if (policyRoot != null) {
                policyRoots.add(policyRoot);
                policytreeHelper.expandAll(policyRoot);
            }
        }
View Full Code Here

Examples of eu.scape_project.planning.model.PolicyNode

            Policy p = new Policy();
            p.setValue(getTEXT());
            return p;

        } else {
            PolicyNode node = new PolicyNode();

            node.setName(getTEXT());

            for (Node n : children) {
                if (n.isLeaf()) {
                    Policy p = new Policy();
                    p.setValue(n.getTEXT());
                    //Policy p = (Policy)n.createPolicyNode();
                    p.setName(getTEXT());
                    return p;
                } else {
                    node.addChild(n.createPolicyNode());
                }
            }

            return node;
        }
View Full Code Here

Examples of eu.scape_project.planning.model.PolicyNode

        triggers.setTrigger(ceTrigger);
        triggers.setTrigger(new Trigger(TriggerType.CHANGED_COLLECTION_PROFILE));
        basis.setTriggers(triggers);

        PolicyTree policyTree = new PolicyTree();
        PolicyNode root = new PolicyNode();
        root.setName("Root node");
        PolicyNode child1 = new PolicyNode();
        child1.setName("Child 1");
        child1.setParent(root);
        root.getChildren().add(child1);
        policyTree.setRoot(root);
        basis.setPolicyTree(policyTree);

        return basis;
View Full Code Here

Examples of java.security.cert.PolicyNode

        MyChecker checker = new MyChecker();
        param.addCertPathChecker(checker);

        PKIXCertPathValidatorResult result =
            (PKIXCertPathValidatorResult) cpv.validate(cp, param);
        PolicyNode policyTree = result.getPolicyTree();
        PublicKey subjectPublicKey = result.getPublicKey();

        if (checker.getCount() != 2)
        {
            fail("checker not evaluated for each certificate");
View Full Code Here

Examples of java.security.cert.PolicyNode

        PKIXParameters param = new PKIXParameters(trust);
        param.addCertStore(store);
        param.setDate(validDate.getTime());
        PKIXCertPathValidatorResult result =
            (PKIXCertPathValidatorResult) cpv.validate(cp, param);
        PolicyNode policyTree = result.getPolicyTree();
        PublicKey subjectPublicKey = result.getPublicKey();

        if (!subjectPublicKey.equals(finalCert.getPublicKey()))
        {
            fail("wrong public key returned");
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.