FileDocCategorySizeDatePackage
ResourceRef.javaAPI DocGlassfish v2 API3870Fri May 04 22:35:10 BST 2007com.sun.enterprise.tools.upgrade.transform.elements

ResourceRef

public class ResourceRef extends GenericElement
author
prakash

Fields Summary
Constructors Summary
public ResourceRef()
Creates a new instance of ApplicationRef

    
Methods Summary
protected java.util.ListgetInsertElementStructure(org.w3c.dom.Element element, org.w3c.dom.Element parentEle)

        // resource-ref is an element in cluster and server.  In cluster there are 3 elements after this.  
        // In server there are only two after this.
        java.util.List insertStrucure = com.sun.enterprise.tools.upgrade.transform.ElementToObjectMapper.getMapper().getInsertElementStructure(element.getTagName());
        String parentName = parentEle.getTagName();
        if(parentName != null){
            if(parentName.equals("cluster")){
                insertStrucure.add(0,"application-ref");
            }
        }
        return insertStrucure;
    
public voidtransform(org.w3c.dom.Element element, org.w3c.dom.Element parentSource, org.w3c.dom.Element parentResult)
element - resource-ref parentSource - server or cluster parentResult - server or cluster

        if(parentSource.getTagName().equals("cluster")){
            super.transform(element,parentSource,parentResult);
        }else{
            // If parent is server instead of cluster, the GenericResource adds resource ref to target server for AS7.x source
            if(super.commonInfoModel.getSourceVersion().equals(com.sun.enterprise.tools.upgrade.common.UpgradeConstants.VERSION_7X))
                return;
            //Added for CR 6363168
            if(element.getAttribute("ref").equals("jdbc/PointBase"))
                return;
            super.transform(element,parentSource,parentResult);
        }