1 11 package org.eclipse.update.core.model; 12 13 14 30 public class PluginEntryModel extends ContentEntryModel { 31 32 private String pluginId; 33 private String pluginVersion; 34 private boolean isFragment = false; 35 private boolean unpack = true; 36 37 42 public PluginEntryModel() { 43 super(); 44 } 45 46 53 public boolean equals(Object obj) { 54 if (!(obj instanceof PluginEntryModel)) 55 return false; 56 PluginEntryModel model = (PluginEntryModel) obj; 57 58 return ( 59 (getPluginIdentifier().equals(model.getPluginIdentifier())) 60 && (getPluginVersion().equals(model.getPluginVersion())) 61 && (isFragment() == model.isFragment())); 62 } 63 64 70 public String getPluginIdentifier() { 71 return pluginId; 72 } 73 74 80 public String getPluginVersion() { 81 return pluginVersion; 82 } 83 84 92 public boolean isFragment() { 93 return isFragment; 94 } 95 96 103 public void setPluginIdentifier(String pluginId) { 104 assertIsWriteable(); 105 this.pluginId = pluginId; 106 } 107 108 115 public void setPluginVersion(String pluginVersion) { 116 assertIsWriteable(); 117 this.pluginVersion = pluginVersion; 118 } 119 120 127 public void isFragment(boolean isFragment) { 128 assertIsWriteable(); 129 this.isFragment = isFragment; 130 } 131 132 137 public boolean isUnpack() { 138 return unpack; 140 } 141 147 public void setUnpack(boolean unpack) { 148 assertIsWriteable(); 150 this.unpack = unpack; 151 } 152 153 156 public String toString() { 157 String msg = (getPluginIdentifier()!=null)?getPluginIdentifier().toString():""; msg += getPluginVersion()!=null?" "+getPluginVersion().toString():""; msg += isFragment()?" fragment":" plugin"; return msg; 161 } 162 163 } 164 | Popular Tags |