1 23 24 36 37 39 package com.sun.enterprise.tools.common.util; 40 41 import org.netbeans.modules.jarpackager.api.ArchiveEntry; 42 import com.sun.forte4j.j2ee.lib.dd.ejb2.gen.EjbJar; 43 import com.sun.forte4j.j2ee.lib.dataobject.J2eeDataObject; 44 45 public class ExtractUtils { 46 47 54 static String urlToReference(String url) { 55 if ((url == null) || 56 (url.equals("null")) || (url.length() == 0) ) { 58 return null; 59 } 60 ArchiveEntry archiveEntry = J2eeDataObject.urlToArchiveEntry(url); 64 return archiveEntry.getName(); 65 } 66 67 74 static public void copyUserInfo(EjbJar from, EjbJar to) { 75 String url; 76 String reference; 77 78 url = from.getLargeIcon(); 79 reference = urlToReference(url); 80 to.setLargeIcon(reference); 81 82 url = from.getSmallIcon(); 83 reference = urlToReference(url); 84 to.setSmallIcon(reference); 85 86 88 to.setDescription(from.getDescription()); 89 to.setDisplayName(from.getDisplayName()); 90 } 91 } 92 | Popular Tags |