_jspx_out = out;
out.write("\r\n");
UserManager um = UserManager.getInstance();
Group group = um.getGroup(request.getParameter("name"));
PropertySet ps = null;
if (request.getParameter("propertyAdd") != null) {
ps = group.getPropertySet();
setPropertyValue(ps, request.getParameter("propertyKey"), Integer.parseInt(request.getParameter("propertyType")), request.getParameter("propertyValue"));
}
else if (request.getParameter("propertyDel") != null)
{
ps = group.getPropertySet();
ps.remove(request.getParameter("propertyDel"));
}
out.write("\r\n\r\n");
out.write("<h1>View Group : ");
out.print( group.getName() );
out.write("</h1>\r\n");
out.write("<hr>\r\n\r\n");
out.write("<h4>Details");
out.write("</h4>\r\nName: ");
out.print( group.getName() );
out.write("<br>\r\nClass: ");
out.print( group.getClass() );
out.write("<br>\r\n\r\n");
out.write("<h4>Providers");
out.write("</h4>\r\nCredentialsProvider: ");
out.print( (group.getCredentialsProvider() != null ? group.getCredentialsProvider().getClass().toString() : "None") );
out.write("<br>\r\nAccessProvider: ");
out.print( (group.getAccessProvider() != null ? group.getAccessProvider().getClass().toString() : "None" ));
out.write("<br>\r\nProfileProvider: ");
out.print( (group.getProfileProvider() != null ? group.getProfileProvider().getClass().toString() : "None"));
out.write("<br>\r\n\r\n");
out.write("<h4>Users");
out.write("</h4>\r\n\r\n");
Collection users = group.getUsers();
out.write("\r\n");
out.print( users.size() );
out.write(" users");
out.write("<br>\r\n\r\n");
out.write("<ol>\r\n");
for (Iterator iterator = users.iterator(); iterator.hasNext();)
{
String userName = (String) iterator.next();
out.write("\r\n\t\t");
out.write("<li>");
out.write("<a href=\"viewuser.jsp?name=");
out.print( URLEncoder.encode(userName) );
out.write("\">");
out.print( userName);
out.write("</a>");
out.write("</li>\r\n");
}
out.write("\r\n");
out.write("</ol>\r\n\r\n");
out.write("<h4>Properties");
out.write("</h4>\r\n");
ps = group.getPropertySet();
if (ps != null)
{
Collection keys = ps.getKeys();
for (Iterator iterator = keys.iterator(); iterator.hasNext();)
{
String key = (String) iterator.next();
out.write("\r\n\t\t");
out.print( key );
out.write(" : ");
out.print( getPropertyValue(ps, key) );
out.write(" (");
out.print( getTypeName(ps.getType(key)) );
out.write(") [");
out.write("<a href=\"viewgroup.jsp?name=");
out.print( URLEncoder.encode(group.getName()) );
out.write("&propertyDel=");
out.print( URLEncoder.encode(key) );
out.write("\">Del");
out.write("</a>]");
out.write("<br>\r\n");
}
out.write("\r\n\r\n");
out.write("<form action=\"viewgroup.jsp\" method=\"post\">\r\n");
out.write("<input type=\"hidden\" name=\"name\" value=\"");
out.print( group.getName() );
out.write("\">\r\n");
out.write("<h4>Add Property");
out.write("</h4>\r\nKey: ");
out.write("<input name=\"propertyKey\" type=\"text\">");
out.write("<br>\r\nType:\r\n");