Examples of TreeControl


Examples of org.apache.webapp.admin.TreeControl

                cObjectName = (String)
                    mBServer.invoke(fname, operation,
                                    values, createStandardConnectorTypes);
               
                // Add the new Connector to our tree control node
                TreeControl control = (TreeControl)
                    session.getAttribute("treeControlTest");
                if (control != null) {
                    String parentName = serviceName;
                    TreeControlNode parentNode = control.findNode(parentName);
                    if (parentNode != null) {
                        String nodeLabel = resources.getMessage(locale,
                            "server.service.treeBuilder.connector") + " (" +
                            cform.getPortText() + ")";
                        String encodedName =
View Full Code Here

Examples of org.apache.webapp.admin.TreeControl

                cObjectName = (String)
                    mBServer.invoke(fname, operation,
                                    values, createStandardConnectorTypes);
               
                // Add the new Connector to our tree control node
                TreeControl control = (TreeControl)
                    session.getAttribute("treeControlTest");
                if (control != null) {
                    String parentName = serviceName;
                    TreeControlNode parentNode = control.findNode(parentName);
                    if (parentNode != null) {
                        String nodeLabel =
                           "Connector (" + cform.getPortText() + ")";
                        String encodedName =
                            URLEncoder.encode(cObjectName);
View Full Code Here

Examples of org.apache.webapp.admin.TreeControl

                cObjectName = (String)
                    mBServer.invoke(fname, operation,
                                    values, createStandardConnectorTypes);
               
                // Add the new Connector to our tree control node
                TreeControl control = (TreeControl)
                    session.getAttribute("treeControlTest");
                if (control != null) {
                    String parentName =
                          TomcatTreeBuilder.SERVICE_TYPE + ",name=" + serviceName;
                    TreeControlNode parentNode = control.findNode(parentName);
                    if (parentNode != null) {
                        String nodeLabel =
                           "Connector (" + cform.getPortText() + ")";
                        String encodedName =
                            URLEncoder.encode(cObjectName);
View Full Code Here

Examples of org.apache.webapp.admin.TreeControl

               
            vObjectName = (String)
                        mBServer.invoke(fname, operation, values, createStandardValveTypes);
           
            // Add the new Valve to our tree control node
            TreeControl control = (TreeControl)
            session.getAttribute("treeControlTest");
            if (control != null) {
                TreeControlNode parentNode = control.findNode(parentNodeName);
                if (parentNode != null) {
                    String nodeLabel =
                    "Valve for " + parentNode.getLabel();
                    String encodedName =
                    URLEncoder.encode(vObjectName);
View Full Code Here

Examples of org.apache.webapp.admin.TreeControl

                cObjectName = (String)
                    mBServer.invoke(fname, operation,
                                    values, createStandardConnectorTypes);
               
                // Add the new Connector to our tree control node
                TreeControl control = (TreeControl)
                    session.getAttribute("treeControlTest");
                if (control != null) {
                    String parentName =
                          TomcatTreeBuilder.SERVICE_TYPE + ",name=" + serviceName;
                    TreeControlNode parentNode = control.findNode(parentName);
                    if (parentNode != null) {
                        String nodeLabel =
                           "Connector (" + cform.getPortText() + ")";
                        String encodedName =
                            URLEncoder.encode(cObjectName);
View Full Code Here

Examples of org.apache.webapp.admin.TreeControl

    public void doView(RenderRequest request, RenderResponse response)
    throws PortletException, IOException
    {
        response.setContentType("text/html");
       
        TreeControl control = (TreeControl) request.getPortletSession().getAttribute("j2_tree");
        if(control == null)
        {
            Collection apps = registry.getPortletApplications();
          control = buildTree(apps, request.getLocale());
          request.getPortletSession().setAttribute("j2_tree", control);
View Full Code Here

Examples of org.apache.webapp.admin.TreeControl

    }

   
  public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException, IOException
  {
    TreeControl control = (TreeControl) actionRequest.getPortletSession().getAttribute("j2_tree");
    //assert control != null
    if(control != null)
    {
        String searchString = actionRequest.getParameter("query");
        if(searchString != null)
        {
            SearchResults results = searchEngine.search(searchString);
            actionRequest.getPortletSession().setAttribute("search_results", results.getResults());
        }
       
      String node = actionRequest.getParameter("node");
      if(node != null)
      {
          TreeControlNode controlNode = control.findNode(node);
          if(controlNode != null)
          {
              controlNode.setExpanded(!controlNode.isExpanded());
          }
      }
     
      String selectedNode = actionRequest.getParameter(PortletApplicationResources.REQUEST_SELECT_NODE);
      if(selectedNode != null)
      {
          control.selectNode(selectedNode);
          TreeControlNode child = control.findNode(selectedNode);
          if(child != null)
          {
              MutablePortletApplication pa = null;
             
            String domain = child.getDomain();
View Full Code Here

Examples of org.apache.webapp.admin.TreeControl

                                PortletApplicationResources.PORTLET_URL,
                                null,
                                true,
                                "J2_DOMAIN");
   
    TreeControl control = new TreeControl(root);
   
   
    TreeControlNode portletApps =
      new TreeControlNode("APP_ROOT",
                                null,
View Full Code Here

Examples of org.apache.webapp.admin.TreeControl

        {
            request.setAttribute("errorMessage", errorMessage);           
        }
       
        // check for refresh on users list
        TreeControl control = null;
        String refresh = (String)PortletMessaging.consume(request, "users", "refresh");
        if (refresh == null)
        {       
            control = (TreeControl) request.getPortletSession().getAttribute(TREE_CONTROL);
        }
View Full Code Here

Examples of org.apache.webapp.admin.TreeControl

            if (!isEmpty(userName) && !isEmpty(password))
            {
                try
                {           
                    userManager.addUser(userName, password);
                    TreeControl control = (TreeControl) actionRequest.getPortletSession().getAttribute(TREE_CONTROL);
                    Iterator users = userManager.getUsers(USER_FILTER);
                    control = buildTree(users, actionRequest.getLocale());
                    actionRequest.getPortletSession().setAttribute(TREE_CONTROL, control);
                    selectNode(actionRequest, control, userName);
                   
                    User user = userManager.getUser(userName);
                    String role = actionRequest.getParameter(ROLES_CONTROL);
                    if (!isEmpty(role) && user != null)
                    {
                        roleManager.addRoleToUser(userName, role);
                    }

                    String rule = actionRequest.getParameter(RULES_CONTROL);
                    if (!isEmpty(rule) && user != null)
                    {
                        Principal principal = getPrincipal(user.getSubject(), UserPrincipal.class);                        
                        profiler.setRuleForPrincipal(principal, profiler.getRule(rule), "page");
                    }
                   
                }
                catch (SecurityException se)
                {
                    PortletMessaging.publish(actionRequest, "user.error", se.getMessage());
                }
               
            }
                       
           
            return;
        }
        TreeControl control = (TreeControl) actionRequest.getPortletSession().getAttribute(TREE_CONTROL);
        //assert control != null
        if (control != null)
        {
            // expand or contact non-leaf nodes
            String node = actionRequest.getParameter(SecurityResources.REQUEST_NODE);
            if (node != null)
            {
                TreeControlNode controlNode = control.findNode(node);
                if (controlNode != null)
                {
                    controlNode.setExpanded(!controlNode.isExpanded());
                }
            }
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.