Changeset 749 for java/installer2/src/net/oni2/aeinstaller/backend/packages
- Timestamp:
- Mar 26, 2013, 6:26:41 PM (12 years ago)
- Location:
- java/installer2/src/net/oni2/aeinstaller/backend/packages
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
java/installer2/src/net/oni2/aeinstaller/backend/packages/Package.java
r720 r749 14 14 import net.oni2.aeinstaller.backend.CaseInsensitiveFile; 15 15 import net.oni2.aeinstaller.backend.Paths; 16 import net.oni2.aeinstaller.backend.depot.DepotConfig; 17 import net.oni2.aeinstaller.backend.depot.DepotManager; 18 import net.oni2.aeinstaller.backend.depot.model.NodeMod; 19 import net.oni2.aeinstaller.backend.depot.model.TaxonomyTerm; 20 import net.oni2.aeinstaller.backend.oni.Installer; 16 import net.oni2.aeinstaller.backend.oni.management.ToolsManager; 17 import net.oni2.moddepot.DepotConfig; 18 import net.oni2.moddepot.ECompatiblePlatform; 19 import net.oni2.moddepot.model.NodeMod; 21 20 import net.oni2.platformtools.PlatformInformation; 22 21 import net.oni2.platformtools.PlatformInformation.Platform; … … 43 42 private int zipSize = 0; 44 43 private NodeMod node = null; 45 private net.oni2. aeinstaller.backend.depot.model.File file = null;44 private net.oni2.moddepot.model.File file = null; 46 45 47 46 private File exeFile = null; … … 68 67 platform = nm.getPlatform(); 69 68 tool = nm.isTool(); 70 for ( TaxonomyTerm tt: nm.getTypes()) {71 Type t = PackageManager.getInstance().getTypeByName( tt.getName());69 for (String nType : nm.getTypes()) { 70 Type t = PackageManager.getInstance().getTypeByName(nType); 72 71 types.add(t); 73 72 if (!tool && !isCorePackage() && isValidOnPlatform()) … … 82 81 description = "<p>" + description + "</p>"; 83 82 } 84 file = DepotManager.getInstance().getFile( 85 nm.getUploads().firstElement().getFid()); 83 file = nm.getUploads().firstElement(); 86 84 zipSize = file.getFilesize(); 87 85 … … 107 105 */ 108 106 public void updateLocalData() { 109 File config = CaseInsensitiveFile.getCaseInsensitiveFile(getLocalPath(), "Mod_Info.cfg"); 107 File config = CaseInsensitiveFile.getCaseInsensitiveFile( 108 getLocalPath(), "Mod_Info.cfg"); 110 109 File aeicfg = new File(getLocalPath(), "aei.cfg"); 111 File plain = CaseInsensitiveFile.getCaseInsensitiveFile(getLocalPath(), "plain"); 110 File plain = CaseInsensitiveFile.getCaseInsensitiveFile(getLocalPath(), 111 "plain"); 112 112 if (config.exists()) { 113 113 Mod_Info mi = new Mod_Info(config, packageNumber); … … 230 230 public boolean isInstalled() { 231 231 if (tool) 232 return Installer.getInstalledTools().contains(packageNumber);232 return ToolsManager.getInstalledTools().contains(packageNumber); 233 233 else 234 234 return PackageManager.getInstance().isModInstalled(this); … … 323 323 */ 324 324 public boolean isCorePackage() { 325 return packageNumber < DepotConfig. getCoreNumberLimit();325 return packageNumber < DepotConfig.corePackageNumberLimit; 326 326 } 327 327 … … 329 329 * @return Get the depot file entry 330 330 */ 331 public net.oni2. aeinstaller.backend.depot.model.File getFile() {331 public net.oni2.moddepot.model.File getFile() { 332 332 return file; 333 333 } -
java/installer2/src/net/oni2/aeinstaller/backend/packages/PackageManager.java
r658 r749 14 14 15 15 import net.oni2.aeinstaller.backend.Paths; 16 import net.oni2.aeinstaller.backend.depot.DepotManager; 17 import net.oni2.aeinstaller.backend.depot.model.NodeMod; 18 import net.oni2.aeinstaller.backend.depot.model.TaxonomyTerm; 19 import net.oni2.aeinstaller.backend.oni.Installer; 16 import net.oni2.moddepot.DepotManager; 17 import net.oni2.moddepot.model.NodeMod; 18 import net.oni2.moddepot.model.TaxonomyTerm; 19 import net.oni2.aeinstaller.backend.oni.management.Installer; 20 import net.oni2.aeinstaller.backend.oni.management.ToolsManager; 20 21 21 22 import com.thoughtworks.xstream.XStream; … … 89 90 mods = new HashMap<Integer, Package>(); 90 91 91 Type localType = new Type("-Local-" , null);92 Type localType = new Type("-Local-"); 92 93 types.put("-Local-", localType); 93 94 94 95 for (TaxonomyTerm tt : DepotManager.getInstance().getTypes()) { 95 types.put(tt.getName(), new Type(tt.getName() , tt));96 types.put(tt.getName(), new Type(tt.getName())); 96 97 } 97 98 … … 110 111 111 112 for (NodeMod nm : DepotManager.getInstance().getModPackageNodes()) { 112 if (nm.getUploads().size() == 1 && nm.getStatus() == 1) {113 if (nm.getUploads().size() == 1) { 113 114 Package m = new Package(nm); 114 115 if (nm.isTool()) … … 265 266 public TreeSet<Package> getInstalledTools() { 266 267 TreeSet<Package> res = new TreeSet<Package>(); 267 for (int n : Installer.getInstalledTools()) {268 for (int n : ToolsManager.getInstalledTools()) { 268 269 res.add(getPackageByNumber(n)); 269 270 } … … 293 294 * @return Unmet dependencies 294 295 */ 295 public HashMap<Package, HashSet<Package>> checkDependencies(TreeSet<Package> mods) { 296 public HashMap<Package, HashSet<Package>> checkDependencies( 297 TreeSet<Package> mods) { 296 298 HashMap<Package, HashSet<Package>> res = new HashMap<Package, HashSet<Package>>(); 297 299 … … 317 319 * @return Incompatible mods 318 320 */ 319 public HashMap<Package, HashSet<Package>> checkIncompabitilites(TreeSet<Package> mods) { 321 public HashMap<Package, HashSet<Package>> checkIncompabitilites( 322 TreeSet<Package> mods) { 320 323 HashMap<Package, HashSet<Package>> res = new HashMap<Package, HashSet<Package>>(); 321 324 -
java/installer2/src/net/oni2/aeinstaller/backend/packages/Type.java
r648 r749 2 2 3 3 import java.util.HashSet; 4 5 import net.oni2.aeinstaller.backend.depot.model.TaxonomyTerm;6 4 7 5 /** … … 10 8 public class Type { 11 9 private String name; 12 @SuppressWarnings("unused")13 private TaxonomyTerm depotTerm;14 10 15 11 private HashSet<Package> entries = new HashSet<Package>(); … … 20 16 * @param name 21 17 * Name of type 22 * @param tt23 * Optional TaxTerm link24 18 */ 25 public Type(String name , TaxonomyTerm tt) {19 public Type(String name) { 26 20 this.name = name; 27 this.depotTerm = tt;28 21 } 29 22
Note:
See TracChangeset
for help on using the changeset viewer.