<%@ include file="/sdk/oemTop.jspf" %> <%@ include file="/oemNoscript.jspf" %> <%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix"%> <%@ taglib uri="http://xmlns.oracle.com/oem/jsp/tag" prefix="oem"%> <%@ page import="oracle.sysman.emSDK.util.jdk.NLSUtil"%> <%@ page import="oracle.cabo.ui.data.BundleDataObject"%> <%@ page import="oracle.sysman.emSDK.util.jdk.NLSUtil"%> <%@ page import="oracle.sysman.db.rsc.sec.EUSMsg"%> <%@ page import="oracle.cabo.ui.data.BundleDataObject"%> <%@ page import="oracle.sysman.emo.adm.security.eus.EUSConstants"%> <%@ page import="oracle.sysman.emo.adm.security.eus.EUSComponent"%> <%@ page import="oracle.sysman.emo.adm.security.eus.EUSSubComponent"%> <%@ page import="oracle.sysman.emo.adm.security.eus.EUSComponentType"%> <%@ page import="oracle.sysman.emo.adm.security.eus.EUSSubComponentType"%> <%@ page import="java.util.ResourceBundle"%> <%@ page import="java.util.List"%> <%@ page import="java.util.ArrayList"%> <%@ page import="java.util.Map"%> <%@ page import="java.util.Set"%> <%@ page import="java.util.Iterator"%> <%@ page import="oracle.sysman.emo.util.UIXDataSource"%> <%@ page import="oracle.sysman.db.adm.ParameterNames"%> <% EUSComponent eusComponent=null; String sSubCompPropertyUserLOv=""; String sSubCompPropertySubtreeLOv=""; String sCurrentJSP="/database/security/eus/euscreateeditsubcomponent_mappings"; request.setAttribute("eusBundle", new BundleDataObject(NLSUtil.getBundle(EUSMsg.class.getName(), request))); String dbVersion = (String)request.getAttribute("DBVERSION"); int iSelectedTab = 0; int iEUSComponentType=0; if(request.getAttribute("SELECTED_TAB")!=null) { String sSelected=(String)request.getAttribute("SELECTED_TAB"); iSelectedTab=Integer.parseInt(sSelected); } EUSSubComponentType fromRequestSubComponentType=null; String sFRomRequestSubComponentTYpe="0"; if(request.getAttribute(EUSConstants.SUB_COMPONENT_TYPE) != null) { fromRequestSubComponentType=(EUSSubComponentType) request.getAttribute(EUSConstants.SUB_COMPONENT_TYPE); sFRomRequestSubComponentTYpe=String.valueOf(fromRequestSubComponentType.getType()); } EUSComponentType fromRequestComponentType=null; String sFRomRequestComponentTYpe="0"; if(request.getAttribute(EUSConstants.EUS_COMPONENT_TYPE) != null) { fromRequestComponentType=(EUSComponentType) request.getAttribute(EUSConstants.EUS_COMPONENT_TYPE); sFRomRequestComponentTYpe=String.valueOf(fromRequestComponentType.getType()); iEUSComponentType=Integer.parseInt(sFRomRequestComponentTYpe); } ResourceBundle eusBundle=NLSUtil.getBundle(EUSMsg.class.getName(), request); EUSSubComponent eusSubComponent=(EUSSubComponent)request.getAttribute(EUSConstants.EUS_SUB_COMPONENT_CACHED_OBJECT); String sPageTitle= ""; String sEvent=""; if(request.getAttribute("SUB_COMPONENT_EVENT") != null && ((String)request.getAttribute("SUB_COMPONENT_EVENT")).equals(EUSConstants.EUS_CREATE_SUB_COMPONENT)) { sPageTitle = eusBundle.getString("CREATE_SUB_COMPONENT_"+eusSubComponent.getType()+"_PAGE_TITLE"); sEvent=EUSConstants.EUS_CREATE_SUB_COMPONENT; } else { sPageTitle = eusBundle.getString("CONFIGURE_SUB_COMPONENT_"+eusSubComponent.getType()+"_PAGE_TITLE"); sEvent=EUSConstants.EUS_EDIT_SUB_COMPONENT ; } sPageTitle = sPageTitle + request.getAttribute("CONFIGURE_SUB_COMPONENT_PAGE_TITLE"); String sSubComponentName = (String) request.getAttribute("CONFIGURE_SUB_COMPONENT_PAGE_TITLE"); String sFormDestinationURL=(String)request.getAttribute(EUSConstants.EUS_BASE_URL_TO_COMPONENT)+"&SUB_COMPONENT_TYPE="+sFRomRequestSubComponentTYpe; String sCancelDestinationURL=request.getContextPath()+sFormDestinationURL+ "&event="+sEvent+"&subevent=cancel"; String sCancelJSFunction="cancelMainForm('"+sCancelDestinationURL+"')"; String sUserLOVURL=request.getContextPath()+sFormDestinationURL+"&event="+sEvent+"&subevent=getUsers&_em.coIFR=true"; String sSubtreeLOVURL=request.getContextPath()+sFormDestinationURL+"&event="+sEvent+"&subevent=getUserSearchBases&_em.coIFR=true"; String sFromUserJSFunction="getFromUser('"+sUserLOVURL+"','"+sSubtreeLOVURL+"')"; String sDBUserLOVURL=request.getContextPath()+sFormDestinationURL+"&event="+sEvent+"&subevent=getDBUsers&_em.coIFR=true"; String sDBUserAction="openWindow(window, '"+sDBUserLOVURL+"','lovWindow',{width:700, height:600},true, 'dialog','')"; if(iEUSComponentType==1) sDBUserAction="getFromDBUser('"+sDBUserLOVURL+"')"; String sSubmitDestinationURL=request.getContextPath()+sFormDestinationURL+ "&event="+sEvent+"&subevent=commit"; String sSubmitJSFunction=""; if(iEUSComponentType==1) sSubmitJSFunction="submitMainFormForUser('"+sSubmitDestinationURL+"')"; else sSubmitJSFunction="submitMainFormForDomain('"+sSubmitDestinationURL+"')"; EUSSubComponentType selectedSubComponentType = null; String sCreateEditSubComponentInstructionText=eusBundle.getString("CREATE_EDIT_INS_TEXT_FOR_SUBCOMP_"+eusSubComponent.getType()+"_IN_COMP_"+sFRomRequestComponentTYpe); String isUserLovSelected="true"; String isSubTreeLovSelected="false"; String sUserLov=""; String sSubTreeLov=""; String sDBUserLov = ""; String sDomainUserLov = ""; String sMappingType="ENTRY"; String sSubComponentProperty1Value=""; String sSubComponentProperty3Value=""; String sSubComponentProperty4Value=""; String isDatabaseSelected="true"; String isDomainSelected="false"; String sDomainOrDatabase="Database"; List availableDatabases=(List)request.getAttribute("EUS_AVAILABLE_DATABASES"); List availableDomains = (List)request.getAttribute("EUS_AVAILABLE_DOMAINS"); List availableScope=new ArrayList(); if(request.getAttribute("SUB_COMPONENT_PROPERTIES") != null) { Map mappingProperties= (Map) request.getAttribute("SUB_COMPONENT_PROPERTIES"); int iMappingTypePropertyNumber=((iEUSComponentType==1) ? 6 : 4); sMappingType=(String) mappingProperties.get(new Integer(iMappingTypePropertyNumber)); if(mappingProperties != null && mappingProperties.size() > 0) { Set keys=mappingProperties.keySet(); Iterator iterator=keys.iterator(); while(iterator.hasNext()) { Integer iKey=(Integer)iterator.next(); if(iKey.intValue()==1) { if(sMappingType.equalsIgnoreCase("ENTRY")) { if(request.getAttribute(EUSConstants.SELECTED_USER_GROUP) != null && String.valueOf(request.getAttribute(EUSConstants.SELECTED_USER_GROUP)).equals("")==false) { sUserLov= (String) request.getAttribute(EUSConstants.SELECTED_USER_GROUP); isUserLovSelected = "true"; } else { if(mappingProperties.get(iKey) != null && String.valueOf(mappingProperties.get(iKey)).equals("")==false) { sUserLov= (String) mappingProperties.get(iKey); isUserLovSelected = "true"; } } sSubComponentProperty1Value=sUserLov; } else if(sMappingType.equalsIgnoreCase("SUBTREE")) { if(request.getAttribute(EUSConstants.SELECTED_USER_GROUP) != null && String.valueOf(request.getAttribute(EUSConstants.SELECTED_USER_GROUP)).equals("")==false) { sSubTreeLov = (String) request.getAttribute(EUSConstants.SELECTED_USER_GROUP); isSubTreeLovSelected = "true"; } else { if(mappingProperties.get(iKey) != null && String.valueOf(mappingProperties.get(iKey)).equals("")==false) { sSubTreeLov = (String) mappingProperties.get(iKey); isSubTreeLovSelected = "true"; } } sSubComponentProperty1Value=sSubTreeLov; } else { isUserLovSelected = "true"; } } else if(iKey.intValue()==3) { if(request.getAttribute(EUSConstants.SELECTED_DB_USER) != null && String.valueOf(request.getAttribute(EUSConstants.SELECTED_DB_USER)).equals("")==false) { sDBUserLov = (String) request.getAttribute(EUSConstants.SELECTED_DB_USER); } else { if(mappingProperties.get(iKey) != null && String.valueOf(mappingProperties.get(iKey)).equals("")==false) { sDBUserLov = (String) mappingProperties.get(iKey); } } } else if(iKey.intValue()==7) { if(mappingProperties.get(iKey) != null && String.valueOf(mappingProperties.get(iKey)).equals("")==false) { sDomainOrDatabase=(String) mappingProperties.get(iKey); if(sDomainOrDatabase.equalsIgnoreCase("DOMAIN")) { availableScope=availableDomains; isDatabaseSelected="false"; isDomainSelected="true"; sDomainUserLov=sDBUserLov; sDBUserLov=""; } else if(sDomainOrDatabase.equalsIgnoreCase("DATABASE")) { availableScope=availableDatabases; isDatabaseSelected="true"; isDomainSelected="false"; } } } else if(iEUSComponentType==1 && iKey.intValue()==4) { if(mappingProperties.get(iKey) != null && String.valueOf(mappingProperties.get(iKey)).equals("")==false) { sSubComponentProperty4Value = String.valueOf(mappingProperties.get(iKey)); } } } } } StringBuffer oemTitle = (StringBuffer)request.getAttribute("_emSDK_PageTitle"); oemTitle.append(" - "); oemTitle.append(sPageTitle); String sMovetoDomainOrDBURL=request.getContextPath()+sFormDestinationURL+ "&event="+sEvent+"&subevent=mappingdomainordb"; String sMoveToDomainoDbJS= "mappingdomainordb('"+sMovetoDomainOrDBURL+"','"+isDatabaseSelected+"','"+isDomainSelected+"')"; %> <%@ include file="/oemTitle.jspf" %> <% if (iEUSComponentType == 1) { eusComponent=(EUSComponent)request.getAttribute(EUSConstants.EUS_COMPONENT_CACHED_OBJECT); sSubCompPropertyUserLOv=eusComponent.getComponentName(); sSubCompPropertySubtreeLOv=sSubCompPropertyUserLOv.substring((sSubCompPropertyUserLOv.indexOf(",")+1),sSubCompPropertyUserLOv.length()); if(sMappingType.equalsIgnoreCase("ENTRY")) { sSubComponentProperty1Value=sSubCompPropertyUserLOv; isUserLovSelected="true"; isSubTreeLovSelected="false"; } else { sSubComponentProperty1Value=sSubCompPropertySubtreeLOv; isSubTreeLovSelected="true"; isUserLovSelected="false"; } %> <% } else { %> <% } %> <%@ include file="/enablePPR.jspf" %> <%@ include file="/oemGlobal.jspf" %> <%@ include file="/database/security/common/entdbseclogout.jspf" %> " onClick="<%=sCancelJSFunction%>" shortDesc="<%=eusBundle.getString(\"EUS_CANCEL_TEXT\")%>" /> " onClick="<%=sSubmitJSFunction%>" shortDesc="<%=eusBundle.getString(\"EUS_CONTINUE_TEXT\")%>" /> " /> <% if(iEUSComponentType==1) { %> " value="ENTRY" selected="<%=isUserLovSelected%>" shortDesc="<%=eusBundle.getString(\"EUS_USER_TEXT\")%>" required="uiOnly" /> " value="SUBTREE" selected="<%=isSubTreeLovSelected%>" shortDesc="<%=eusBundle.getString(\"EUS_SUBTREE_TEXT\")%>" required="uiOnly"/> <% } else { %> " value="ENTRY" selected="<%=isUserLovSelected%>" shortDesc="<%=eusBundle.getString(\"EUS_USER_TEXT\")%>" required="uiOnly"/> " value="SUBTREE" selected="<%=isSubTreeLovSelected%>" shortDesc="<%=eusBundle.getString(\"EUS_SUBTREE_TEXT\")%>" required="uiOnly"/> " searchDesc="<%=eusBundle.getString(\"EUS_USER_TEXT\")%>"/> <% } %> <% String sCreateMappingSchemaInstructionTextKey="EUS_CREATE_MAPPING_SCHEMA_INS_TXT_FOR_COMP_"+iEUSComponentType; String sCreateMappingSchemaInstructionText=eusBundle.getString(sCreateMappingSchemaInstructionTextKey); %> <% switch(iEUSComponentType) { case 1: %> " value="DATABASE" selected="<%=isDatabaseSelected%>" shortDesc="<%=eusBundle.getString(\"EUS_DATABASE_TEXT\")%>" onClick="<%=sMoveToDomainoDbJS%>"/> " value="DOMAIN" selected="<%=isDomainSelected%>" shortDesc="<%=eusBundle.getString(\"EUS_DOMAIN_TEXT\")%>" onClick="<%=sMoveToDomainoDbJS%>"/> <% if(isDatabaseSelected.equals("true")) { %> " labeledNodeId="SUB_COMPONENT_PROPERTY_4"/> <% } else if(isDomainSelected.equals("true")) { %> " labeledNodeId="SUB_COMPONENT_PROPERTY_4"/> <% } %> " > <% if(availableScope != null && availableScope.size() > 0) { for(int i=0;i <% } } %> " labeledNodeId="SUB_COMPONENT_PROPERTY_3"/> <% if(isDatabaseSelected.equals("true")) { %> " searchDesc="<%=eusBundle.getString(\"EUS_SCHEMA_TEXT\")%>"/> <% } else if(isDomainSelected.equals("true")) { %> " text="<%=sDomainUserLov%>" /> <% } %> <% break; case 3: %> " text="<%=sDBUserLov%>" shortDesc="<%=eusBundle.getString(\"EUS_SCHEMA_TEXT\")%>" required="uiOnly"/> <% break; case 4: %> " text="<%=sDBUserLov%>" shortDesc="<%=eusBundle.getString(\"EUS_SCHEMA_TEXT\")%>" searchDesc="<%=eusBundle.getString(\"EUS_SCHEMA_TEXT\")%>" required="uiOnly"/> <% break; } %> " onClick="<%=sCancelJSFunction%>" shortDesc="<%=eusBundle.getString(\"EUS_CANCEL_TEXT\")%>" /> " onClick="<%=sSubmitJSFunction%>" shortDesc="<%=eusBundle.getString(\"EUS_CONTINUE_TEXT\")%>" /> <% String sDestination="/console/database/EntDBSec/EUS/EUSComponents?event=EUS_COMPONENTS_MAIN_PAGE&EUS_COMPONENT_TYPE="+iEUSComponentType; String sBreadCrumbMainPageTitle=eusBundle.getString("COMPONENT_TYPE_"+iEUSComponentType+"_PAGE_TITLE"); %> <% String sConfigureComponentBreadPageTitle=eusBundle.getString("CONFIGURE_COMPONENT_"+iEUSComponentType+"_PAGE_TITLE"); String sBreadCrumbComponentName=""; if(request.getAttribute(EUSConstants.EUS_COMPONENT_EVENT) != null && ((String)request.getAttribute(EUSConstants.EUS_COMPONENT_EVENT)).equals(EUSConstants.EUS_NEW_STATUS)) { sConfigureComponentBreadPageTitle=eusBundle.getString("CREATE_COMPONENT_"+iEUSComponentType+"_PAGE_TITLE"); } if(request.getAttribute(EUSConstants.CONFIGURE_COMPONENT_PAGE_TITLE) != null) sBreadCrumbComponentName=(String) request.getAttribute(EUSConstants.CONFIGURE_COMPONENT_PAGE_TITLE); sConfigureComponentBreadPageTitle = sConfigureComponentBreadPageTitle + sBreadCrumbComponentName; %>