Subversion Repositories Sigmater

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6 Andrea 1
<%--
2
  ~ Licensed to the Apache Software Foundation (ASF) under one
3
  ~ or more contributor license agreements. See the NOTICE file
4
  ~ distributed with this work for additional information
5
  ~ regarding copyright ownership. The ASF licenses this file
6
  ~ to you under the Apache License, Version 2.0 (the
7
  ~ "License"); you may not use this file except in compliance
8
  ~ with the License. You may obtain a copy of the License at
9
  ~
10
  ~ http://www.apache.org/licenses/LICENSE-2.0
11
  ~
12
  ~ Unless required by applicable law or agreed to in writing,
13
  ~ software distributed under the License is distributed on an
14
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
  ~ KIND, either express or implied. See the License for the
16
  ~ specific language governing permissions and limitations
17
  ~ under the License.
18
  --%>
19
 
20
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="org.apache.axis2.Constants,
21
                                                                             org.apache.axis2.description.AxisModule,
22
                                                                             org.apache.axis2.description.AxisServiceGroup,
23
                                                                             java.util.Collection" %>
24
<%@ page import="java.util.HashMap"%>
25
<%@ page import="java.util.Iterator"%>
26
<%@ page import="org.apache.axis2.util.Utils" %>
27
<jsp:include page="include/adminheader.jsp"></jsp:include>
28
<%
29
    String status = (String)request.getSession().getAttribute(Constants.ENGAGE_STATUS);
30
    HashMap moduels = (HashMap)request.getSession().getAttribute(Constants.MODULE_MAP);
31
    request.getSession().setAttribute(Constants.MODULE_MAP,null);
32
    Collection moduleCol =  moduels.values();
33
    Iterator servicesGroups = (Iterator)request.getSession().getAttribute(Constants.SERVICE_GROUP_MAP);
34
    request.getSession().setAttribute(Constants.SERVICE_GROUP_MAP,null);
35
%>
36
<h1>Engage Module for a Service Group</h1>
37
<p>To engage a module for a set of services grouped as an axis service group,</p>
38
 
39
    <ol>
40
        <li>select the module you want to engage </li>
41
        <li>select the axis service group you like the module to be engaged.</li>
42
        <li>click "Engage".</li>
43
    </ol>
44
 
45
 
46
<%
47
	if (!moduleCol.iterator().hasNext()) {%>
48
		<p>No modules are present to be engaged.</p>
49
	<%} else {
50
		if  (!servicesGroups.hasNext()) {%>
51
		<p>No Axis service groups are present to be engaged.</p>
52
		<%} else {
53
%>
54
<form method="get" name="selectModuleForm" action="axis2-admin/engageToServiceGroup">
55
    <table border="0" width="100%" cellspacing="1" cellpadding="1">
56
        <tr>
57
            <td>Select a Module :</td>
58
        </tr>
59
        <tr>
60
            <td>
61
                <select name="modules">
62
                    <%
63
                for (Iterator iterator = moduleCol.iterator(); iterator.hasNext();) {
64
                    AxisModule axisOperation = (AxisModule) iterator.next();
65
                    String modulename = axisOperation.getName();
66
            %> <option  align="left" value="<%=modulename%>"><%=modulename%></option>
67
                    <%
68
                }
69
             %>
70
            </td>
71
        </tr>
72
        <tr>
73
            <td>
74
                &nbsp;
75
                &nbsp;
76
            </td>
77
        </tr>
78
        <tr>
79
            <td>Select a Service Group :</td>
80
        </tr>
81
        <tr>
82
            <td>
83
                <select name="axisService">
84
                    <%
85
 
86
                        while(servicesGroups.hasNext()){
87
                            AxisServiceGroup axisServiceGroup = (AxisServiceGroup) servicesGroups.next();
88
                            String serviceName = axisServiceGroup.getServiceGroupName();
89
                    %> <option  align="left" value="<%=serviceName%>"><%=serviceName%></option>
90
                    <%
91
                        }
92
 
93
                    %>
94
                </select>
95
            </td>
96
        </tr>
97
        <tr>
98
            <td>
99
                &nbsp;
100
                &nbsp;
101
            </td>
102
        </tr>
103
        <tr>
104
            <td>
105
                <input name="submit" type="submit" value=" Engage " >
106
            </td>
107
        </tr>
108
        <tr>
109
            <td>
110
                &nbsp;
111
                &nbsp;
112
            </td>
113
        </tr>
114
        <tr>
115
            <td>
116
                &nbsp;
117
                &nbsp;
118
            </td>
119
        </tr>
120
        <tr>
121
            <td>
122
                <textarea cols="50"  <%
123
                    if(status == null){
124
                %>
125
                          style="display:none"
126
                        <%
127
                            } %>
128
                        ><%=Utils.sanitizeWebOutput(status)%></textarea>
129
            </td>
130
        </tr>
131
    </table>
132
</form>
133
<%
134
		}
135
	}
136
%>
137
<jsp:include page="include/adminfooter.inc"></jsp:include>
138