Package org.jwall.web.policy

Examples of org.jwall.web.policy.Parameter


          return this;
        }

       
        if( arg1.getType() == TreeNode.PARAMETER_NODE ){
          Parameter p = (Parameter) arg1;
         
          StringBuffer s = new StringBuffer("<html>Parameter: <b>"+p.getName()+"</b>");
         
          s.append(", Regexp: <b>" + p.getRegexp() + "</b>");
          if( p.isRequired() )
            s.append(", Required: <b>"+p.isRequired()+"</b>");

          if( p.getScope() != null  )
            s.append(", Scope: <b>"+p.getScope()+"</b>");
         
          s.append("</html>");
            setText( s.toString() );
            setIcon( WebPolicyEditor.getIcon(p) );
View Full Code Here


            setIcon( WebPolicyEditor.getIcon( c ) );
            return this;
        }

        if( arg1.getType() == TreeNode.PARAMETER_NODE ){
            Parameter p = (Parameter) arg1;

            StringBuffer s = new StringBuffer("<html>");

            if( p.isInherited() ){
                setInheritanceColors();
                s.append( "<i>" );
            }

            s.append("Parameter: <b>"+p.getName()+"</b>");

            if( p.getRegexp().startsWith("$") )
                s.append(", Type: <b>" + p.getRegexp() + "</b>");
            else
                s.append(", Regexp: <b>" + p.getRegexp() + "</b>");

            if( p.isRequired() )
                s.append(", Required: <b>"+p.isRequired()+"</b>");

            if( p.getScope() != null  )
                s.append(", Scope: <b>"+p.getScope()+"</b>");

            if( p.isInherited() ){
                s.append( "</i>" );
            }
            s.append("</html>");
            setText( s.toString() );
            setIcon( WebPolicyEditor.getIcon(p) );
View Full Code Here

      log.debug("RuleTreeModel.actionPerformed:: e: "
          + e.getActionCommand() + ", node=" + node);

      if (AbstractTreeAction.TREE_INSERT_PARAMETER == e
          .getActionCommand()) {
        Parameter param = new Parameter();
        param.setName("p1");
        param.setRegexp(".*");
        param.setRequired(false);
        node.add(param);
        rmodel.notify(node);

        jtree.startEditingAtPath(new TreePath(PolicyTreeModel
            .getPath(param)));
View Full Code Here

    Object o = super.getCellEditorValue();
    if (cancelled)
      return o;

    if (node.getType() == TreeNode.PARAMETER_NODE) {
      Parameter param = (Parameter) node;
      param.setName(name.getText());
      param.setRegexp(value.getText());
      param.setRequired(required.isSelected());
      param.setScope("" + scope.getSelectedItem());

      return param;
    }

    if (nodeType == TreeNode.CONTEXT_NODE) {
View Full Code Here

    if (node.getType() == TreeNode.PARAMETER_NODE) {

      scopes = new String[] { "any", "body", "header" };
      this.scope = new JComboBox(scopes);
      Parameter param = (Parameter) node;
      JLabel l1 = new JLabel("Parameter: ");
      l1.setFont(f);
      l1.setAlignmentY(Component.CENTER_ALIGNMENT);
      p.add(l1);

      String v = param.getName();
      name = new JTextField(v, v.length() + 2);
      name.addKeyListener(this);
      name.setFont(f);
      name.setAlignmentY(Component.CENTER_ALIGNMENT);
      p.add(name);

      JLabel l2 = new JLabel("Type: ");
      l2.setFont(f);
      l2.setAlignmentY(Component.CENTER_ALIGNMENT);
      p.add(l2);

      v = param.getRegexp();
      value = new JTextField(v, v.length() + 4);
      value.addKeyListener(this);
      value.addFocusListener(this);
      value.setFont(f);
      value.setAlignmentY(Component.CENTER_ALIGNMENT);
View Full Code Here

      log.warning("ClassTreeView.actionPerformed:: e: "
          + e.getActionCommand() + ", node=" + node);

      if (AbstractTreeAction.TREE_INSERT_PARAMETER == e
          .getActionCommand()) {
        Parameter param = new Parameter();
        param.setName("p1");
        param.setRegexp(".*");
        param.setRequired(false);
        node.add(param);
        treeModel.notify(node);
      }

      if (AbstractTreeAction.TREE_INSERT_RESOURCE == e.getActionCommand()) {
View Full Code Here

TOP

Related Classes of org.jwall.web.policy.Parameter

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.