Package org.jdesktop.wonderland.common.modules

Examples of org.jdesktop.wonderland.common.modules.ModuleRequires


        this.setInfo(info);
       
        /*
         * Fetch the module dependencies, this isn't terrible if it doesn't exist
         */
        ModuleRequires requires = this.fetchModuleRequires();
        if (requires == null) {
            requires = new ModuleRequires();
        }
        this.setRequires(requires);
       
        /*
         * Fetch the module asset servers, this isn't terrible if it doesn't exist
View Full Code Here


        for (Requires r : requires) {
            mis.add(new ModuleInfo(r.name, r.majorVersion, r.minorVersion,
                    r.miniVersion));
        }
       
        ModuleRequires mr = new ModuleRequires(mis.toArray(new ModuleInfo[0]));
       
        File moduleRequiresFile;
        if (buildDir == null) {
            moduleRequiresFile = File.createTempFile("moduleRequires", ".xml");
            moduleRequiresFile.deleteOnExit();
        } else {
            moduleRequiresFile = new File(buildDir, "moduleRequires.xml");
        }
       
        if (overwrite || !compareModuleRequires(mr, moduleRequiresFile)) {
            log("Rewriting moduleRequires file", Project.MSG_VERBOSE);
            FileOutputStream fos = new FileOutputStream(moduleRequiresFile);
            mr.encode(fos);
            fos.close();
        }
       
        ZipFileSet zfs = new ZipFileSet();
        zfs.setFile(moduleRequiresFile);
View Full Code Here

        }

        FileReader reader = null;
        try {
            reader = new FileReader(oldMRFile);
            ModuleRequires oldMR = ModuleRequires.decode(reader);
          
            return Arrays.deepEquals(newMR.getRequires(), oldMR.getRequires());
        } catch (JAXBException je) {
            // problem reading file
        } finally {
           reader.close();
        }
View Full Code Here

             */
            Map.Entry<String, Module> entry = it2.next();
            String moduleName = entry.getKey();
            Module module = entry.getValue();
            ModuleInfo info = module.getInfo();
            ModuleRequires requirements = module.getRequires();
           
            /*
             * Loop through each of the requirements of the module and add it
             * to the ModuleRequiredCheck, if it exists. (If it does exist, it
             * means we are checking to see if the module is still required and
             * we want to flag it with this module).
             */
            for (ModuleInfo infoRequires : requirements.getRequires()) {
                ModuleRequiredCheck check = required.get(infoRequires.getName());
                if (check != null) {
                    check.addRequiresModuleInfo(info);
                }
            }
View Full Code Here

         * if a dependency is not met by the new module.
         */
        Iterator<Map.Entry<String, Module>> it = installed.entrySet().iterator();
        while (it.hasNext() == true) {
            Map.Entry<String, Module> entry = it.next();
            ModuleRequires requires = entry.getValue().getRequires();
           
            /*
             * Loop through all of the requirements of the installed module. If
             * the name matches, then check to see if the versions match too.
             * If not, return false.
             */
            for (ModuleInfo requirer : requires.getRequires()) {
                if (requirer.getName().equals(pendingInfo.getName()) == true) {
                    if (ModuleOverwriteUtils.isSatisfied(pendingInfo, requirer) == false) {
                        StringBuffer reason = new StringBuffer();
                        reason.append("Module " + entry.getValue().getName());
                        reason.append(" depends on " + pendingInfo.getName());
View Full Code Here

        this.setInfo(info);
       
        /*
         * Fetch the module dependencies, this isn't terrible if it doesn't exist
         */
        ModuleRequires requires = this.fetchModuleRequires();
        if (requires == null) {
            requires = new ModuleRequires();
        }
        this.setRequires(requires);
       
        /*
         * Fetch the module asset servers, this isn't terrible if it doesn't exist
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.common.modules.ModuleRequires

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.