<%-- IBM Confidential OCO Source Material --%> <%-- 5724-i63, 5724-H88 (C) COPYRIGHT International Business Machines Corp. 1997, 2010 --%> <%-- The source code for this program is not published or otherwise divested --%> <%-- of its trade secrets, irrespective of what has been deposited with the --%> <%-- U.S. Copyright Office. --%> <%@ page import="java.util.*"%> <%@ page import="org.apache.struts.tiles.beans.SimpleMenuItem"%> <%@ page import="com.ibm.ws.*"%> <%@ page import="com.ibm.wsspi.*"%> <%@ page import="com.ibm.ws.console.core.selector.*"%> <%@ page import="com.ibm.ws.console.core.item.*"%> <%@ page import="com.ibm.ws.console.core.ConfigFileHelper"%> <%@ page import="com.ibm.websphere.management.authorizer.AdminAuthorizer"%> <%@ page import="com.ibm.websphere.management.authorizer.AdminAuthorizerFactory"%> <%@ page import="com.ibm.websphere.management.metadata.*"%> <%@ page import="com.ibm.ws.security.core.SecurityContext"%> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %> <% AdminAuthorizer adminAuthorizer = AdminAuthorizerFactory.getAdminAuthorizer(); String contextUri = ConfigFileHelper.decodeContextUri((String)contextId); String contextType=(String)request.getAttribute("contextType"); java.util.Properties props= null; java.util.ArrayList list_ext = new java.util.ArrayList(); for(int i=0;i0){ if(contextId!=null && contextId!="nocontext"){ props = ConfigFileHelper.getNodeMetadataProperties((String)contextId); //213515 } props = ConfigFileHelper.getAdditionalAdaptiveProperties(request, props, formName); // LIDB2303A // LI3969 // Add user roles to props String[] userRoles = (String[]) session.getAttribute("userRoles"); if (userRoles != null) { props.put("userRoles", userRoles); } // list_ext = LinkSelector.getLinks(extensions,list_ext,props,(String)perspective,"additional.properties"); // TODO: use this one if we don't support WAS v6.0.2.. The API below is new in WAS 6.1 to do the cross component dynamic link support list_ext = LinkSelector.getLinks(extensions,list_ext,props,(String)perspective,"additional.properties", request, formName); // LIDB3509C } pageContext.setAttribute("list_ext",list_ext); %> <% String parentType=""; String resourceUri1=""; for(int z=0;z <% if (list_ext.size() > 0 ) { %> <% String targetString = "detail"; String taskClass = "sub-category"; String groupClass = "sub-category-container"; boolean showItem = true; if (SecurityContext.isSecurityEnabled()) { String[] roles = item.getRoles(); showItem = false; for (int i = 0; i < roles.length; i++) { if (adminAuthorizer.checkAccess(contextUri, roles[i])) { showItem = true; break; } } } if (showItem == true) { %> <% String parentId = item.getParentId(); if (parentId.equals("root")) { parentId = "admin_domain"; } String link = item.getLink(); String icon = request.getContextPath()+"/images/onepix.gif"; %> <% if (item.isExternalLink()) { externalMarker = "..."; targetString = "_blank"; %> <% } if (link.equals("")) { if (staticTree.indexOf(parentId)>-1) { parIndex = staticTree.indexOf(parentId); level = ((Integer)staticTreeLevels.get(parIndex)).intValue(); level = level + 1; staticTree.add(item.getNodeId()); staticTreeLevels.add(new Integer(level)); if (level > 1) { // sub item taskClass="sub-category"; groupClass="sub-category-container"; } else // main item { taskClass="main-category"; groupClass="main-category-container"; } if (level == 1) { if (counter > 0) { for (int i=1;i"); } } %>
<% } else { if (counter > 0) { for (int i=1;i"); } } if (priorlevel >= level) { %> <% } %>
<% } } } else { if (staticTree.indexOf(parentId)>-1) { parIndex = staticTree.indexOf(parentId); level = ((Integer)staticTreeLevels.get(parIndex)).intValue(); level = level + 1; if (level < priorlevel) { %>
    <% } if (level > priorlevel) { %>
      <% } %> <%if (item.getSummary()!=null) { request.setAttribute("com.ibm.ws.console.formName" , formName); %>
    • <% } else {%> <% } %> <% } } priorPar = parentId; priorlevel = level; %> <% if (item.isExternalLink()) { externalMarker = ""; targetString = "detail"; %> <% } counter = counter + 1; } %>
<% } %>