amyroh      2002/06/14 13:05:03

  Modified:    webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources
                        DeleteDataSourcesAction.java
                        DeleteEnvEntriesAction.java
               webapps/admin/resources dataSource.jsp deleteDataSources.jsp
                        envEntry.jsp listDataSources.jspf
  Log:
  Delete Environment Entry.
  
  Revision  Changes    Path
  1.2       +25 -7     
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/DeleteDataSourcesAction.java
  
  Index: DeleteDataSourcesAction.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/DeleteDataSourcesAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DeleteDataSourcesAction.java      5 May 2002 22:44:21 -0000       1.1
  +++ DeleteDataSourcesAction.java      14 Jun 2002 20:05:02 -0000      1.2
  @@ -173,9 +173,27 @@
   
           // Perform "Delete EnvEntry" transactions as required
           try {
  +            
  +            String resourcetype = dataSourcesForm.getResourcetype();
  +            String path = dataSourcesForm.getPath();
  +            String host = dataSourcesForm.getHost();
  +            String service = dataSourcesForm.getService();
  +            
  +            ObjectName dname = null;
   
  -            // Construct the MBean Name for the naming source
  -            ObjectName dname = new ObjectName(ResourceUtils.NAMINGRESOURCES_TYPE);
  +            if (resourcetype!=null) {
  +                // Construct the MBean Name for the naming source
  +                if (resourcetype.equals("Global")) {
  +                    dname = new ObjectName(ResourceUtils.NAMINGRESOURCES_TYPE +
  +                                            ResourceUtils.GLOBAL_TYPE);
  +                } else if (resourcetype.equals("Context")) {            
  +                    dname = new ObjectName (ResourceUtils.NAMINGRESOURCES_TYPE + 
  +                                ResourceUtils.CONTEXT_TYPE + ",path=" + path + 
  +                                ",host=" + host + ",service=" + service);
  +                } else if (resourcetype.equals("DefaultContext")) {
  +                    // add defaultcontext support later
  +                }
  +            }
   
               String signature[] = new String[1];
               signature[0] = "java.lang.String";
  
  
  
  1.3       +23 -13    
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/DeleteEnvEntriesAction.java
  
  Index: DeleteEnvEntriesAction.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/DeleteEnvEntriesAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeleteEnvEntriesAction.java       14 Jun 2002 13:29:29 -0000      1.2
  +++ DeleteEnvEntriesAction.java       14 Jun 2002 20:05:02 -0000      1.3
  @@ -152,11 +152,6 @@
           HttpSession session = request.getSession();
           Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY);
           
  -        getServlet().log("resourcetype = "+request.getParameter("resourcetype"));
  -        getServlet().log("path = "+request.getParameter("path"));
  -        getServlet().log("host = "+request.getParameter("host"));
  -        getServlet().log("service = "+request.getParameter("service"));
  -        
           // Has this transaction been cancelled?
           if (isCancelled(request)) {
               return (mapping.findForward("List EnvEntries Setup"));
  @@ -172,8 +167,11 @@
   
           // Perform any extra validation that is required
           EnvEntriesForm envEntriesForm = (EnvEntriesForm) form;
  -        getServlet().log("form resourcetype = "+envEntriesForm.getResourcetype());
           String envEntries[] = envEntriesForm.getEnvEntries();
  +        String resourcetype = envEntriesForm.getResourcetype();
  +        String path = envEntriesForm.getPath();
  +        String host = envEntriesForm.getHost();
  +        String service = envEntriesForm.getService();
           
           if (envEntries == null) {
               envEntries = new String[0];
  @@ -181,9 +179,21 @@
   
           // Perform "Delete EnvEntry" transactions as required
           try {
  -
  -            // Construct the MBean Name for the naming source
  -            ObjectName dname = new ObjectName(ResourceUtils.NAMINGRESOURCES_TYPE);
  +            
  +            ObjectName dname = null;
  +            if (resourcetype!=null) {
  +                // Construct the MBean Name for the naming source
  +                if (resourcetype.equals("Global")) {
  +                    dname = new ObjectName(ResourceUtils.NAMINGRESOURCES_TYPE +
  +                                                    ResourceUtils.GLOBAL_TYPE);
  +                } else if (resourcetype.equals("Context")) {            
  +                    dname = new ObjectName (ResourceUtils.NAMINGRESOURCES_TYPE + 
  +                            ResourceUtils.CONTEXT_TYPE + ",path=" + path + 
  +                            ",host=" + host + ",service=" + service);
  +                } else if (resourcetype.equals("DefaultContext")) {
  +                        // add defaultcontext support later
  +                }
  +            }
   
               String signature[] = new String[1];
               signature[0] = "java.lang.String";
  
  
  
  1.8       +6 -2      jakarta-tomcat-4.0/webapps/admin/resources/dataSource.jsp
  
  Index: dataSource.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/dataSource.jsp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- dataSource.jsp    14 Jun 2002 13:29:29 -0000      1.7
  +++ dataSource.jsp    14 Jun 2002 20:05:02 -0000      1.8
  @@ -46,8 +46,12 @@
               <controls:action url="/resources/setUpDataSource.do">
                   <bean:message key="resources.actions.datasrc.create"/>
               </controls:action>
  -            <controls:action url='<%= "/resources/listDataSources.do?forward=" 
  -                        + URLEncoder.encode("DataSources Delete List") %>'>
  +            <controls:action url='<%= 
"/resources/listDataSources.do?&resourcetype=" +
  +                               URLEncoder.encode(resourcetypeInfo) + "&path="+
  +                               URLEncoder.encode(pathInfo) + "&host="+
  +                               URLEncoder.encode(hostInfo) + "&service="+
  +                               URLEncoder.encode(serviceInfo) %> "&forward=" + 
  +                               URLEncoder.encode("DataSources Delete List") %>'>
                   <bean:message key="resources.actions.datasrc.delete"/>
               </controls:action>
            </controls:actions>
  
  
  
  1.3       +33 -0     jakarta-tomcat-4.0/webapps/admin/resources/deleteDataSources.jsp
  
  Index: deleteDataSources.jsp
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/deleteDataSources.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- deleteDataSources.jsp     10 May 2002 22:41:41 -0000      1.2
  +++ deleteDataSources.jsp     14 Jun 2002 20:05:02 -0000      1.3
  @@ -18,6 +18,22 @@
   
   <html:form action="/resources/listDataSources">
   
  +  <bean:define id="resourcetypeInfo" type="java.lang.String"
  +               name="dataSourcesForm" property="resourcetype"/>
  +  <html:hidden property="resourcetype"/>
  +
  +  <bean:define id="pathInfo" type="java.lang.String"
  +               name="dataSourcesForm" property="path"/>
  +  <html:hidden property="path"/>
  +
  +  <bean:define id="hostInfo" type="java.lang.String"
  +               name="dataSourcesForm" property="host"/>
  +  <html:hidden property="host"/>
  +
  +  <bean:define id="serviceInfo" type="java.lang.String"
  +               name="dataSourcesForm" property="service"/>
  +  <html:hidden property="service"/>
  +
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
       <tr bgcolor="7171A5">
         <td width="81%"> 
  @@ -38,6 +54,23 @@
   <br>
   <bean:define id="checkboxes" scope="page" value="true"/>
   <html:form action="/resources/deleteDataSources">
  +
  +  <bean:define id="resourcetypeInfo" type="java.lang.String"
  +               name="dataSourcesForm" property="resourcetype"/>
  +  <html:hidden property="resourcetype"/>
  +
  +  <bean:define id="pathInfo" type="java.lang.String"
  +               name="dataSourcesForm" property="path"/>
  +  <html:hidden property="path"/>
  +
  +  <bean:define id="hostInfo" type="java.lang.String"
  +               name="dataSourcesForm" property="host"/>
  +  <html:hidden property="host"/>
  +
  +  <bean:define id="serviceInfo" type="java.lang.String"
  +               name="dataSourcesForm" property="service"/>
  +  <html:hidden property="service"/>
  +
     <%@ include file="../buttons.jsp" %>
     <br>
     <%@ include file="dataSources.jspf" %>
  
  
  
  1.7       +6 -2      jakarta-tomcat-4.0/webapps/admin/resources/envEntry.jsp
  
  Index: envEntry.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/envEntry.jsp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- envEntry.jsp      14 Jun 2002 13:29:29 -0000      1.6
  +++ envEntry.jsp      14 Jun 2002 20:05:02 -0000      1.7
  @@ -45,8 +45,12 @@
               <controls:action url="/resources/setUpEnvEntry.do">
                   <bean:message key="resources.actions.env.create"/>
               </controls:action>
  -            <controls:action url='<%= "/resources/listEnvEntries.do?forward=" 
  -                        + URLEncoder.encode("EnvEntries Delete List") %>'>
  +            <controls:action url='<%= "/resources/listEnvEntries.do?resourcetype=" +
  +                            URLEncoder.encode(resourcetypeInfo) + "&path="+
  +                            URLEncoder.encode(pathInfo) + "&host="+
  +                            URLEncoder.encode(hostInfo) + "&service="+
  +                            URLEncoder.encode(serviceInfo) + "&forward=" +
  +                            URLEncoder.encode("EnvEntries Delete List") %>'>
                   <bean:message key="resources.actions.env.delete"/>
               </controls:action>
            </controls:actions>
  
  
  
  1.4       +6 -2      jakarta-tomcat-4.0/webapps/admin/resources/listDataSources.jspf
  
  Index: listDataSources.jspf
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/listDataSources.jspf,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- listDataSources.jspf      14 Jun 2002 13:29:30 -0000      1.3
  +++ listDataSources.jspf      14 Jun 2002 20:05:02 -0000      1.4
  @@ -16,8 +16,12 @@
       <bean:message key="resources.actions.datasrc.create"/>
     </controls:action>
   
  -  <controls:action url='<%= "/resources/listDataSources.do?forward=" 
  -                        + URLEncoder.encode("DataSources Delete List") %>'>
  +  <controls:action url='<%= "/resources/listDataSources.do?resourcetype=" +
  +                            URLEncoder.encode(resourcetypeInfo) + "&path="+
  +                            URLEncoder.encode(pathInfo) + "&host="+
  +                            URLEncoder.encode(hostInfo) + "&service="+
  +                            URLEncoder.encode(serviceInfo) +"&forward=" + 
  +                            URLEncoder.encode("DataSources Delete List") %>'>
       <bean:message key="resources.actions.datasrc.delete"/>
     </controls:action>
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to