FileDocCategorySizeDatePackage
ExtractUtils.javaAPI DocGlassfish v2 API4145Fri May 04 22:34:58 BST 2007com.sun.enterprise.tools.common.util

ExtractUtils

public class ExtractUtils extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidcopyUserInfo(com.sun.forte4j.j2ee.lib.dd.ejb2.gen.EjbJar from, com.sun.forte4j.j2ee.lib.dd.ejb2.gen.EjbJar to)
Copy the UserInfo . Also convert icon urls into icon references.

param
from copy from here
param
to copy to here

        String url;
        String reference;

        url = from.getLargeIcon();
        reference = urlToReference(url);
        to.setLargeIcon(reference);

        url = from.getSmallIcon();
        reference = urlToReference(url);
        to.setSmallIcon(reference);
        
//        System.out.println("Copying " + from.getDescription()); //NOI18N

        to.setDescription(from.getDescription());
        to.setDisplayName(from.getDisplayName());
    
static java.lang.StringurlToReference(java.lang.String url)
convert an icon urls into an icon references.

param
url a string representing the url of an icon.
return
The name of the ArchiveEntry in a form appropriate for putting in a deployment descriptor.

        if ((url == null)        ||
            (url.equals("null")) ||             // NOI18N
            (url.length() == 0)    ) {
            return null;
        }
        // Make an ArchiveEntry.
        // This is a little bit inefficient as we throw this away
        // and it will be made again later.
        ArchiveEntry archiveEntry = J2eeDataObject.urlToArchiveEntry(url);
        return archiveEntry.getName();