1 11 package org.eclipse.update.core; 12 13 import org.eclipse.update.core.model.ImportModel; 14 import org.eclipse.update.internal.core.UpdateCore; 15 import org.eclipse.update.internal.core.UpdateManagerUtils; 16 17 32 public class Import extends ImportModel implements IImport { 33 34 private VersionedIdentifier versionId; 36 37 41 public VersionedIdentifier getVersionedIdentifier() { 42 if (versionId != null) 43 return versionId; 44 45 String id = getIdentifier(); 46 String ver = getVersion(); 47 if (id != null && ver != null) { 48 try { 49 versionId = new VersionedIdentifier(id, ver); 50 return versionId; 51 } catch (Exception e) { 52 UpdateCore.warn("Unable to create versioned identifier:" + id + ":" + ver); } 54 } 55 56 57 versionId = new VersionedIdentifier("",null); return versionId; 59 } 60 61 65 public int getRule() { 66 return UpdateManagerUtils.getMatchingRule(getMatchingRuleName()); 67 } 68 69 73 public int getIdRule() { 74 return UpdateManagerUtils.getMatchingIdRule(getMatchingIdRuleName()); 75 } 76 77 81 82 86 public int getKind() { 87 return isFeatureImport()?KIND_FEATURE:KIND_PLUGIN; 88 } 89 90 } 91 | Popular Tags |