Methods Summary |
---|
public void | addDescriptor(java.lang.Object newDescriptor)Adds a new DOL descriptor instance to the descriptor instance associated with
this XMLNode
if (newDescriptor instanceof SecurityRoleMapping) {
SecurityRoleMapping roleMap = (SecurityRoleMapping)newDescriptor;
descriptor.addSecurityRoleMapping(roleMap);
Application app = descriptor.getApplication();
if (app!=null) {
Role role = new Role(roleMap.getRoleName());
SecurityRoleMapper rm = app.getRoleMapper();
if (rm != null) {
List<PrincipalNameDescriptor> principals = roleMap.getPrincipalNames();
for (int i = 0; i < principals.size(); i++) {
rm.assignRole(principals.get(i).getPrincipal(),
role, descriptor);
}
List<String> groups = roleMap.getGroupNames();
for (int i = 0; i < groups.size(); i++) {
rm.assignRole(new Group(groups.get(i)),
role, descriptor);
}
}
}
}
|
public java.lang.Object | getDescriptor()
return descriptor;
|
public java.lang.String | getDocType()
return DTDRegistry.SUN_EJBJAR_300_DTD_PUBLIC_ID;
|
public java.lang.String | getSystemID()
return DTDRegistry.SUN_EJBJAR_300_DTD_SYSTEM_ID;
|
public java.util.List | getSystemIDs()
return null;
|
protected com.sun.enterprise.deployment.node.XMLElement | getXMLRootTag()
return new XMLElement(RuntimeTagNames.S1AS_EJB_RUNTIME_TAG);
|
public static java.lang.String | registerBundle(java.util.Map publicIDToDTD)register this node as a root node capable of loading entire DD files
publicIDToDTD.put(DTDRegistry.SUN_EJBJAR_200_DTD_PUBLIC_ID, DTDRegistry.SUN_EJBJAR_200_DTD_SYSTEM_ID);
publicIDToDTD.put(DTDRegistry.SUN_EJBJAR_201_DTD_PUBLIC_ID, DTDRegistry.SUN_EJBJAR_201_DTD_SYSTEM_ID);
publicIDToDTD.put(DTDRegistry.SUN_EJBJAR_210_DTD_PUBLIC_ID, DTDRegistry.SUN_EJBJAR_210_DTD_SYSTEM_ID);
publicIDToDTD.put(DTDRegistry.SUN_EJBJAR_211_DTD_PUBLIC_ID, DTDRegistry.SUN_EJBJAR_211_DTD_SYSTEM_ID);
publicIDToDTD.put(DTDRegistry.SUN_EJBJAR_300_DTD_PUBLIC_ID, DTDRegistry.SUN_EJBJAR_300_DTD_SYSTEM_ID);
if (!restrictDTDDeclarations()) {
publicIDToDTD.put(DTDRegistry.SUN_EJBJAR_210beta_DTD_PUBLIC_ID, DTDRegistry.SUN_EJBJAR_210beta_DTD_SYSTEM_ID);
}
return RuntimeTagNames.S1AS_EJB_RUNTIME_TAG;
|
public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, com.sun.enterprise.deployment.Descriptor descriptor)write the descriptor class to a DOM tree and return it
if (! (descriptor instanceof EjbBundleDescriptor)) {
throw new IllegalArgumentException(getClass() +
" cannot handles descriptors of type " + descriptor.getClass());
}
EjbBundleDescriptor bundleDescriptor = (EjbBundleDescriptor) descriptor;
Node ejbs = super.writeDescriptor(parent, descriptor);
// security-role-mapping*
List<SecurityRoleMapping> roleMappings = bundleDescriptor.getSecurityRoleMappings();
for (int i = 0; i < roleMappings.size(); i++) {
SecurityRoleMappingNode srmn = new SecurityRoleMappingNode();
srmn.writeDescriptor(ejbs, RuntimeTagNames.SECURITY_ROLE_MAPPING, roleMappings.get(i));
}
// entreprise-beans
EntrepriseBeansRuntimeNode ejbsNode = new EntrepriseBeansRuntimeNode();
ejbsNode.writeDescriptor(ejbs, RuntimeTagNames.EJBS, bundleDescriptor);
return ejbs;
|