Examples of IModule


Examples of org.eclipse.wst.server.core.IModule

        if (!ProjectHelper.isContentProject(project)) {
            return;
        }

        IModule module = ServerUtil.getModule(project);

        if (module == null) {
            return;
        }
View Full Code Here

Examples of org.eclipse.wst.server.core.IModule

            return null;
        }
    }

    private static IServer getDefaultServer(IProject project) {
        IModule module = org.eclipse.wst.server.core.ServerUtil.getModule(project);
        if (module==null) {
            // if there's no module for a project then there's no IServer for sure - which
            // is what we need to create a RepositoryInfo
            return null;
        }
        IServer server = ServerCore.getDefaultServer(module);
        if (server!=null) {
            return server;
        }
        // then we cannot create a repository
        IServer[] allServers = ServerCore.getServers();
        out: for (int i = 0; i < allServers.length; i++) {
            IServer aServer = allServers[i];
            IModule[] allModules = aServer.getModules();
            for (int j = 0; j < allModules.length; j++) {
                IModule aMoudle = allModules[j];
                if (aMoudle.equals(module)) {
                    server = aServer;
                    break out;
                }
            }
        }
View Full Code Here

Examples of org.eclipse.wst.server.core.IModule

        }
        return server;
    }

    private static Set<IServer> getAllServers(IProject project) {
        IModule module = org.eclipse.wst.server.core.ServerUtil.getModule(project);
        if (module==null) {
            // if there's no module for a project then there's no IServer for sure - which
            // is what we need to create a RepositoryInfo
            return null;
        }
        Set<IServer> result = new HashSet<IServer>();
        IServer defaultServer = ServerCore.getDefaultServer(module);
        if (defaultServer!=null) {
            result.add(defaultServer);
        }
       
        IServer[] allServers = ServerCore.getServers();
        for (int i = 0; i < allServers.length; i++) {
            IServer aServer = allServers[i];
            IModule[] allModules = aServer.getModules();
            for (int j = 0; j < allModules.length; j++) {
                IModule aMoudle = allModules[j];
                if (aMoudle.equals(module)) {
                    result.add(aServer);
                    break;
                }
            }
        }
View Full Code Here

Examples of org.eclipse.wst.server.core.IModule

    }

    public void installModule(final IProject project) throws CoreException, InterruptedException {

        // not sure why we need to poll at all here ... there is some async operation that I'm not aware of
        IModule bundleModule = new Poller().pollUntil(new Callable<IModule>() {
            @Override
            public IModule call() throws Exception {
                return ServerUtil.getModule(project);
            }
        }, notNullValue(IModule.class));
View Full Code Here

Examples of org.eclipse.wst.server.core.IModule

        IServerWorkingCopy wc = server.createWorkingCopy();
        // add the bundle and content projects, ie modules, to the server
        List<IModule> modules = new LinkedList<IModule>();
        for (IProject project : projects.getBundleProjects()) {
            IModule module = ServerUtil.getModule(project);
            if (module != null && shouldDeploy(module)) {
                modules.add(module);
            }
        }
        for (IProject project : projects.getContentProjects()) {
            IModule module = ServerUtil.getModule(project);
            if (module != null && shouldDeploy(module)) {
                modules.add(module);
            }
        }
        wc.modifyModules(modules.toArray(new IModule[modules.size()]), new IModule[0], monitor);
View Full Code Here

Examples of org.eclipse.wst.server.core.IModule

        if (setupServerWizardPage.getStartServer()) {
            server.start(ILaunchManager.RUN_MODE, monitor);
        }
        List<IModule[]> modules = new ArrayList<IModule[]>();
        for (IProject project : createdProjects) {
            IModule module = ServerUtil.getModule(project);
            if (module != null) {
                modules.add(new IModule[] { module });
            }
        }
View Full Code Here

Examples of org.eclipse.wst.server.core.IModule

                if (!ProjectHelper.isContentProject(project)) {
                    continue;
                }

                IModule module = ServerUtil.getModule(project);

                if (module == null) {
                    continue;
                }
View Full Code Here

Examples of org.eclipse.wst.server.core.IModule

        final List<Integer> deltaKindList = new ArrayList<Integer>();
        final Iterator<IModule[]> iterator = moduleList.iterator();
        while (iterator.hasNext()) {
            IModule[] module = iterator.next();
            if (hasBeenPublished(module)) {
                IModule m = module[module.length - 1];
                if ((m.getProject() != null && !m.getProject().isAccessible())
                        || getPublishedResourceDelta(module).length == 0) {
                    deltaKindList.add(new Integer(ServerBehaviourDelegate.NO_CHANGE));
                }
                else {
                    deltaKindList.add(new Integer(ServerBehaviourDelegate.CHANGED));
View Full Code Here

Examples of org.eclipse.wst.server.core.IModule

        project.createOrUpdateFile(Path.fromPortableString("jcr_root/content/5_file.txt"), new ByteArrayInputStream(
                new byte[0]));
        project.createOrUpdateFile(Path.fromPortableString("jcr_root/content/.content.xml"), new ByteArrayInputStream(
                new byte[0]));

        IModule module = ServerUtil.getModule(contentProject);

        SlingContentModuleFactory moduleFactory = new SlingContentModuleFactory();
        ModuleDelegate moduleDelegate = moduleFactory.getModuleDelegate(module);

        IModuleResource[] members = moduleDelegate.members();
View Full Code Here

Examples of org.eclipse.wst.server.core.IModule

                new ByteArrayInputStream(new byte[0]));
        project.createOrUpdateFile(
                Path.fromPortableString("jcr_root/content/testproject/_jcr_content/image/file.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_319.png"),
                new ByteArrayInputStream(new byte[0]));

        IModule module = ServerUtil.getModule(contentProject);

        SlingContentModuleFactory moduleFactory = new SlingContentModuleFactory();
        ModuleDelegate moduleDelegate = moduleFactory.getModuleDelegate(module);

        IModuleResource[] members = moduleDelegate.members();
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.