/** * @return the descriptor instance to associate with this XMLNode */ public Object getSunDescriptor() { return descriptor.getSunDescriptor(); }
public static SunWebApp getSunWebApp(Map properties) { if (properties == null) { return null; } WebBundleDescriptor webBundle = (WebBundleDescriptor)properties.get(HttpServletConstants.WEB_BUNDLE); return webBundle.getSunDescriptor(); }
public static SunWebApp getSunWebApp(Map properties) { if (properties == null) { return null; } WebBundleDescriptor webBundle = (WebBundleDescriptor)properties.get(HttpServletConstants.WEB_BUNDLE); return webBundle.getSunDescriptor(); }
/** * write all occurrences of the descriptor corresponding to the current * node from the parent descriptor to an JAXP DOM node and return it * * This API will be invoked by the parent node when the parent node * writes out a mix of statically and dynamically registered sub nodes. * * This method should be overriden by the sub classes if it * needs to be called by the parent node. * * @param parent node in the DOM tree * @param nodeName the name of the node * @param parentDesc parent descriptor of the descriptor to be written * @return the JAXP DOM node */ @Override public Node writeDescriptors(Node parent, String nodeName, Descriptor parentDesc) { if (parentDesc instanceof WebBundleDescriptor) { WebBundleDescriptor webBundleDescriptor = (WebBundleDescriptor)parentDesc; // security-role-assignment* SecurityRoleAssignment[]securityRoleAssignments = webBundleDescriptor.getSunDescriptor().getSecurityRoleAssignments(); for (SecurityRoleAssignment securityRoleAssignment : securityRoleAssignments) { writeDescriptor(parent, nodeName, securityRoleAssignment); } } return parent; }
private void stopCoherenceWeb() { if (wmInfo.getDescriptor() != null && wmInfo.getDescriptor().getSunDescriptor() != null) { SunWebApp sunWebApp = wmInfo.getDescriptor().getSunDescriptor(); if (sunWebApp.getSessionConfig() != null && sunWebApp.getSessionConfig().getSessionManager() != null) {
map.put(HttpServletConstants.POLICY_CONTEXT, policyContextId); SunWebApp sunWebApp = webBundle.getSunDescriptor(); String pid = (sunWebApp != null ? sunWebApp.getAttributeValue (sunWebApp.HTTPSERVLET_SECURITY_PROVIDER) : null);
/** * receives notification of the value for a particular tag * * @param element the xml element * @param value it's associated value */ public void setElementValue(XMLElement element, String value) { String name = element.getQName(); if (name.equals(RuntimeTagNames.INDEX_DIRECTORY_ENALBED)) { setDefaultServletInitParam("listings", value); } else if (name.equals(RuntimeTagNames.INDEX_DIRECTORY_SORT_BY)) { setDefaultServletInitParam("sortedBy", value); } else if (name.equals(RuntimeTagNames.SAVE_SESSIONS_ENABLED)) { WebBundleDescriptor descriptor = (WebBundleDescriptor)getParentNode().getDescriptor(); descriptor.setKeepState(value); } else if (name.equals(RuntimeTagNames.PREFER_WEB_INF_CLASSES)) { WebBundleDescriptor descriptor = (WebBundleDescriptor)getParentNode().getDescriptor(); ClassLoader clBean = descriptor.getSunDescriptor().getClassLoader(); if (clBean == null) { clBean = new ClassLoader(); descriptor.getSunDescriptor().setClassLoader(clBean); } clBean.setAttributeValue(ClassLoader.DELEGATE, Boolean.toString(!Boolean.parseBoolean(value))); } else { super.setElementValue(element, value); } }
map.put(HttpServletConstants.POLICY_CONTEXT, policyContextId); SunWebApp sunWebApp = webBundle.getSunDescriptor(); String pid = (sunWebApp != null ? sunWebApp.getAttributeValue (sunWebApp.HTTPSERVLET_SECURITY_PROVIDER) : null);
/** * Get and create a runtime SessionConfig if necessary. */ private com.sun.enterprise.deployment.runtime.web.SessionConfig getRuntimeSessionConfig() { WebBundleDescriptor webBundleDescriptor = (WebBundleDescriptor)getParentNode().getDescriptor(); SunWebApp sunDescriptor = webBundleDescriptor.getSunDescriptor(); com.sun.enterprise.deployment.runtime.web.SessionConfig runtimeSessionConfig = sunDescriptor.getSessionConfig(); if (runtimeSessionConfig == null) { runtimeSessionConfig = new com.sun.enterprise.deployment.runtime.web.SessionConfig(); sunDescriptor.setSessionConfig(runtimeSessionConfig); } return runtimeSessionConfig; }
if (lgConf != null){ String realmName = lgConf.getRealmName(); SunWebApp sunDes = wbd.getSunDescriptor(); if(sunDes != null){ SecurityRoleMapping[] srms = sunDes.getSecurityRoleMapping();
boolean delegate = true; com.sun.enterprise.deployment.runtime.web.ClassLoader clBean = wbd.getSunDescriptor().getClassLoader(); if (clBean != null) { String value = clBean.getAttributeValue(
private static void configureJspc(JspC jspc, WebBundleDescriptor wbd) { SunWebApp sunWebApp = wbd.getSunDescriptor(); if (sunWebApp == null) { return;
if (lgConf != null){ String realmName = lgConf.getRealmName(); SunWebApp sunDes = wbd.getSunDescriptor(); if(sunDes != null){ SecurityRoleMapping[] srms = sunDes.getSecurityRoleMapping();
if (newDescriptor instanceof EjbRef) { EjbRef ejbRef = (EjbRef) newDescriptor; descriptor.getSunDescriptor().addEjbRef(ejbRef); try { EjbReference ref = descriptor.getEjbReference(ejbRef.getEjbRefName()); if (newDescriptor instanceof ResourceRef) { ResourceRef resourceRef = (ResourceRef) newDescriptor; descriptor.getSunDescriptor().addResourceRef(resourceRef); try { ResourceReferenceDescriptor rrd = descriptor.getResourceReferenceByName(resourceRef.getResRefName()); if (newDescriptor instanceof ResourceEnvRef) { ResourceEnvRef resourceEnvRef = (ResourceEnvRef) newDescriptor; descriptor.getSunDescriptor().addResourceEnvRef(resourceEnvRef); try { JmsDestinationReferenceDescriptor rrd = descriptor.getJmsDestinationReferenceByName(resourceEnvRef.getResourceEnvRefName()); descriptor.getSunDescriptor().addServlet(s1descriptor); } else if (newDescriptor instanceof ServiceReferenceDescriptor) { if (newDescriptor instanceof SecurityRoleMapping) { SecurityRoleMapping srm = (SecurityRoleMapping) newDescriptor; descriptor.getSunDescriptor().addSecurityRoleMapping(srm); descriptor.getSunDescriptor().addIdempotentUrlPattern( (IdempotentUrlPattern)newDescriptor); } else if (newDescriptor instanceof SessionConfig) {
boolean delegate = true; com.sun.enterprise.deployment.runtime.web.ClassLoader clBean = wbd.getSunDescriptor().getClassLoader(); if (clBean != null) { String value = clBean.getAttributeValue(
WLSecurityRoleAssignment roleMap = (WLSecurityRoleAssignment) newDescriptor; if (descriptor!=null) { descriptor.getSunDescriptor().addWLSecurityRoleAssignment(roleMap); Role role = new Role(roleMap.getRoleName()); Application app = descriptor.getApplication(); descriptor.getSunDescriptor().addResourceRef(resourceRef); try { ResourceReferenceDescriptor rrd = descriptor.getResourceReferenceByName(resourceRef.getResRefName()); descriptor.getSunDescriptor().addResourceEnvRef(resourceEnvRef); try { JmsDestinationReferenceDescriptor rrd = descriptor.getJmsDestinationReferenceByName(resourceEnvRef.getResourceEnvRefName()); descriptor.getSunDescriptor().addEjbRef(ejbRef); try { EjbReference ref = descriptor.getEjbReference(ejbRef.getEjbRefName());
public Node writeDescriptor(Element root, WebBundleDescriptor webBundleDescriptor) { Node containerDescriptorNode = null; WebComponentDescriptor defaultServletDesc = webBundleDescriptor.getWebComponentByCanonicalName("default"); InitializationParameter listingsParam = getDefaultServletInitParam( defaultServletDesc, "listings", false); InitializationParameter sortedByParam = getDefaultServletInitParam( defaultServletDesc, "sortedBy", false); ClassLoader clBean = webBundleDescriptor.getSunDescriptor().getClassLoader(); containerDescriptorNode = appendChild(root, RuntimeTagNames.CONTAINER_DESCRIPTOR); if (listingsParam != null) { appendTextChild(containerDescriptorNode, RuntimeTagNames.INDEX_DIRECTORY_ENALBED, listingsParam.getValue()); } if (sortedByParam != null) { appendTextChild(containerDescriptorNode, RuntimeTagNames.INDEX_DIRECTORY_SORT_BY, sortedByParam.getValue()); } appendTextChild(containerDescriptorNode, RuntimeTagNames.SAVE_SESSIONS_ENABLED, Boolean.toString(webBundleDescriptor.getKeepState())); if (clBean != null) { appendTextChild(containerDescriptorNode, RuntimeTagNames.PREFER_WEB_INF_CLASSES, clBean.getAttributeValue(ClassLoader.DELEGATE)); } return containerDescriptorNode; }
SunWebApp iasBean = webBundleDescriptor.getSunDescriptor(); ResourceRef[] rr = iasBean.getResourceRef(); DefaultResourcePrincipal drp;
public Node writeDescriptor(Element root, WebBundleDescriptor webBundleDescriptor) { SessionConfig sessionConfig = webBundleDescriptor.getSessionConfig(); com.sun.enterprise.deployment.runtime.web.SessionConfig runtimeSessionConfig = webBundleDescriptor.getSunDescriptor().getSessionConfig(); Node scNode = null; if (sessionConfig != null || runtimeSessionConfig != null) {
TagNames.WL_WEB_APP_NAMESPACE); SunWebApp sunWebApp = bundleDescriptor.getSunDescriptor();