Examples of ModuleList


Examples of org.apache.geronimo.deployment.ModuleList

    protected void basicInitContext(EARContext earContext, Module module, XmlObject gerWebApp, boolean hasSecurityRealmName) throws DeploymentException {
        //complete manifest classpath
        EARContext moduleContext = module.getEarContext();
        ClassPathList manifestcp = (ClassPathList) moduleContext.getGeneralData().get(ClassPathList.class);
        ModuleList moduleLocations = (ModuleList) module.getRootEarContext().getGeneralData().get(ModuleList.class);
        URI baseUri = URI.create(module.getTargetPath());
        URI resolutionUri = invertURI(baseUri);
        earContext.getCompleteManifestClassPath(module.getModuleFile(), baseUri, resolutionUri, manifestcp, moduleLocations);

View Full Code Here

Examples of org.apache.geronimo.deployment.ModuleList

                module.getModuleName(),
                jarFile,
                null,
                null,
                new LinkedHashSet<Module>(Collections.singleton(module)),
                new ModuleList(),
                null);
    }
View Full Code Here

Examples of org.apache.geronimo.deployment.ModuleList

        AbstractName earName = naming.createRootName(artifact, artifact.toString(), NameFactory.J2EE_APPLICATION);

        // get the modules either the application plan or for a stand alone module from the specific deployer
        // todo change module so you can extract the real module path back out.. then we can eliminate
        // the moduleLocations and have addModules return the modules
        ModuleList moduleLocations = new ModuleList();
        LinkedHashSet<Module> modules = new LinkedHashSet<Module>();
        try {
            addModules(earFile, application, gerApplication, moduleLocations, modules, environment, earName, idBuilder);
            if (application == null && modules.isEmpty()) {
                //if no application.xml and no modules detected, return null for stand-alone module processing
View Full Code Here

Examples of org.apache.geronimo.deployment.ModuleList

    protected void basicInitContext(EARContext earContext, Module module, XmlObject gerWebApp, boolean hasSecurityRealmName) throws DeploymentException {
        //complete manifest classpath
        EARContext moduleContext = module.getEarContext();
        ClassPathList manifestcp = (ClassPathList) moduleContext.getGeneralData().get(ClassPathList.class);
        ModuleList moduleLocations = (ModuleList) module.getRootEarContext().getGeneralData().get(ModuleList.class);
        moduleContext.getCompleteManifestClassPath(module.getModuleFile(), URI.create(module.getTargetPath()).resolve(RELATIVE_MODULE_BASE_URI), manifestcp, moduleLocations);


        WebAppType webApp = (WebAppType) module.getSpecDD();
//      makeMetadataComplete(webApp, module);
View Full Code Here

Examples of org.apache.geronimo.deployment.ModuleList

        serviceBuilders.build(geronimoOpenejb, earContext, ejbModule.getEarContext());

        ClassPathList manifestcp = new ClassPathList();
        manifestcp.add(module.getTargetPath());
        EARContext moduleContext = module.getEarContext();
        ModuleList moduleLocations = (ModuleList) module.getRootEarContext().getGeneralData().get(ModuleList.class);
        moduleContext.getCompleteManifestClassPath(module.getModuleFile(), URI.create(module.getTargetPath()), manifestcp, moduleLocations);
        moduleContext.getGeneralData().put(ClassPathList.class, manifestcp);

        for (ModuleBuilderExtension builder : moduleBuilderExtensions) {
            try {
View Full Code Here

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

     * Reloads the list of modules from the server from scratch
     */
    private synchronized void reload() {
        /* Clear out the existing cache, load from the server */
        this.cachedModules.clear();
        ModuleList list = ModuleUtils.fetchModuleList(this.serverURL);
        if (list == null) {
            logger.info("[MODULES] No module information found");
            return;
        }
       
        /* Loop through each and create the module object, insert into map */
        for (ModuleInfo moduleInfo : list.getModuleInfos()) {
            CachedModule cachedModule = new CachedModule(serverURL, moduleInfo);
            this.cachedModules.put(moduleInfo.getName(), cachedModule);
        }
    }
View Full Code Here

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

        final ServerSessionManager targetServer =
                (ServerSessionManager) targetServerSelector.getSelectedItem();

        // Check we are not about to overwrite an existing module
        String url = targetServer.getServerURL();
        ModuleList moduleList = ModuleUtils.fetchModuleList(url);
        ModuleInfo[] modules = moduleList.getModuleInfos();
        if (modules != null) {
            boolean conflict = false;
            for (int i = 0; i < modules.length && !conflict; i++) {
                if (moduleName.equals(modules[i].getName())) {
                    conflict = true;
View Full Code Here

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

     */
    @GET
    @Produces({"application/xml", "application/json"})
    public Response getModuleList(@PathParam("state") String state) {
        ModuleManager manager = ModuleManager.getModuleManager();
        ModuleList moduleList = new ModuleList();
       
        /*
         * Check the state given, and fetch the modules. If the module state is
         * invalid, return a BAD_REQUEST error. Otherwise fetch the module list
         * according to the state and return a ModuleList object.
         */
        if (state == null) {
            return Response.status(Response.Status.BAD_REQUEST).build();
        }
        else if (state.equals("installed") == true) {
            Map<String, Module> modules = manager.getInstalledModules();

            // sort in dependecy order
            List<String> ordered = DeployManager.getDeploymentOrder(modules);

            // create the list of infos in the correct order
            Collection<ModuleInfo> list = new LinkedList();
            for (String moduleName : ordered) {
                Module module = modules.get(moduleName);
                list.add(module.getInfo());
            }

            moduleList.setModuleInfos(list.toArray(new ModuleInfo[] {}));
            return Response.ok(moduleList).build();
        }
        else if (state.equals("pending") == true) {
            Map<String, Module> modules = manager.getPendingModules();
            Collection<ModuleInfo> list = new LinkedList();
            Iterator<Map.Entry<String, Module>> it = modules.entrySet().iterator();
            while (it.hasNext() == true) {
                Map.Entry<String, Module> entry = it.next();
                list.add(entry.getValue().getInfo());
            }
            moduleList.setModuleInfos(list.toArray(new ModuleInfo[] {}));
            return Response.ok(moduleList).build();
        }
        else if (state.equals("uninstall") == true) {
            Map<String, ModuleInfo> modules = manager.getUninstallModuleInfos();
            Collection<ModuleInfo> list = new LinkedList();
            Iterator<Map.Entry<String, ModuleInfo>> it = modules.entrySet().iterator();
            while (it.hasNext() == true) {
                Map.Entry<String, ModuleInfo> entry = it.next();
                list.add(entry.getValue());
            }
            moduleList.setModuleInfos(list.toArray(new ModuleInfo[] {}));
            return Response.ok(moduleList).build();
        }
        else {
            return Response.status(Response.Status.BAD_REQUEST).build();
        }
View Full Code Here

Examples of test.list.types.ModuleList

  public void run() {
    String[] strs = new String[8];
    Modules[] mods = new Modules[8];
    Module[] mod = new Module[8];
    Module m = factory.makeModule_Default("amodule");
    ModuleList l;
    boolean exceptionThrown = false;

    try {
      mods[0] = factory.ModulesFromTerm(factory.getPureFactory().parse("meuk([\"m1\",\"m2\",\"m3\",\"m4\"])"));
    }
    catch (RuntimeException e) {
      exceptionThrown = true;
    }

    testAssert(exceptionThrown, "negative fromTermTest");
    exceptionThrown = false;

    mods[0] = factory.ModulesFromTerm(factory.getPureFactory().parse("[\"m1\",\"m2\",\"m3\",\"m4\"]"));

    mod[0] = mods[0].getHead();
    testAssert("\"m1\"".equals(mod[0].toString()), "getFirstTest");

    testAssert(mods[0].hasTail(), "hasTail test");

    mods[4] = mods[0].getTail();
    testAssert("[\"m2\",\"m3\",\"m4\"]".equals(mods[4].toString()), "getNextTest");

    mods[1] = factory.makeModules(m, factory.makeModules());
    strs[1] = mods[1].toString();
    testAssert("[\"amodule\"]".equals(strs[1]), "toStringTest1");

    mods[2] = factory.makeModules(m, mods[1]);
    strs[2] = mods[2].toString();
    testAssert("[\"amodule\",\"amodule\"]".equals(strs[2]), "toStringTest2");

    mods[3] = factory.makeModules(m, mods[2]);
    strs[3] = mods[3].toString();
    testAssert("[\"amodule\",\"amodule\",\"amodule\"]".equals(strs[3]), "toStringTest3");

    l = factory.makeModuleList_Modules(mods[3]);
    strs[4] = l.toString();

    testAssert("list([\"amodule\",\"amodule\",\"amodule\"])".equals(strs[4]), "toStringTest4");

    /*
     * If the hash code generator does not generate different hash codes
     * for these two constructors (they have the same pattern, same
     * alternative name, but a different type) then a ClassCastException
     * will occurr:
     */
    l = factory.makeModuleList_Modules(mods[3]);
    testAssert(l.isSortModuleList() == true, "is<type> test");
    testAssert(l.isModules() == true, "is<cons> test");

    String example = "[]";
    ATerm termExample;

    try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.