Package org.apache.karaf.eik.core

Examples of org.apache.karaf.eik.core.KarafPlatformModel


        final IStatus status = super.validate();
        if (!status.isOK()) {
            return status;
        }

        KarafPlatformModel karafTargetPlatform;
        try {
            karafTargetPlatform = KarafPlatformModelRegistry.findPlatformModel(location);
            if (karafTargetPlatform != null) {
                return Status.OK_STATUS;
            } else {
View Full Code Here


        if (installPath == null) {
            return new IClasspathEntry[0];
        }

        try {
            final KarafPlatformModel karafPlatform = KarafPlatformModelRegistry.findPlatformModel(installPath);

            final File pluginRootDirectory = karafPlatform.getPluginRootDirectory().toFile();
            final List<File> jarFiles = new ArrayList<File>();

            KarafCorePluginUtils.getJarFileList(pluginRootDirectory, jarFiles, MAX_SEARCH_DEPTH);

            final List<IClasspathEntry> list = resolveLibraryEntries(jarFiles);
View Full Code Here

            }
        } else if (    IKarafProject.class.equals(adapterType)
                    && adaptableObject instanceof KarafPlatformModel)
        {
            IKarafProject karafProject = null;
            final KarafPlatformModel karafPlatformModel = (KarafPlatformModel) adaptableObject;
            for (final IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) {
                if (KarafProject.isKarafProject(project)) {
                    karafProject = new KarafProject(project);
                    if (karafPlatformModel.getRootDirectory().equals(karafProject.getPlatformRootDirectory())) {
                        break;
                    }
                }
            }
View Full Code Here

        return parentKarafModel.containsPlugin(plugin);
    }

    @Override
    public Object getAdapter(@SuppressWarnings("rawtypes") final Class adapter) {
        final KarafPlatformModel parentModel = getParentKarafModel();
        final Object adaptedObject = parentModel.getAdapter(adapter);
        return adaptedObject;
    }
View Full Code Here

    }

    @Override
    public void build(final int kind, @SuppressWarnings("rawtypes") final Map args, final IProgressMonitor monitor) throws CoreException {
        final IKarafProject karafProject = getKarafProject();
        final KarafPlatformModel karafPlatformModel = getKarafPlatformModel();

        monitor.subTask("Resolving Features Repository for Apache Karaf Project: " + karafProject.getName());

        final FeaturesSection featuresSection = (FeaturesSection) karafPlatformModel.getAdapter(FeaturesSection.class);
        final FeaturesResolverJob job = new FeaturesResolverJob(karafProject.getName(), karafPlatformModel, featuresSection);
        job.schedule();
        try {
            job.join();
View Full Code Here

                    continue;
                }

                final String encoding = launch.getAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING);

                final KarafPlatformModel karafPlatform =
                    (KarafPlatformModel) launch.getLaunchConfiguration().getAdapter(KarafPlatformModel.class);

                final KarafSshConnectionUrl sshConnectionUrl =
                    (KarafSshConnectionUrl) karafPlatform.getAdapter(KarafSshConnectionUrl.class);

                final KarafSshShellConnection.Credentials credentials;

                try {
                    final String username =
View Full Code Here

     * @param monitor
     * @throws CoreException
     */
    private void buildFeaturesRepositories(final IProgressMonitor monitor) throws CoreException {
        final IKarafProject karafProject = getKarafProject();
        final KarafPlatformModel karafPlatformModel = getKarafPlatformModel();

        monitor.subTask("Resolving Features Repository for Apache Karaf Project: " + karafProject.getName());

        final FeaturesSection featuresSection = (FeaturesSection) karafPlatformModel.getAdapter(FeaturesSection.class);
        final FeaturesResolverJob job = new FeaturesResolverJob(karafProject.getName(), karafPlatformModel, featuresSection);
        job.schedule();
        try {
            job.join();

View Full Code Here

        });
    }

    private IPath getKarafPlatformRootPath(final MBeanProvider service) {
        final JMXServiceDescriptor jmxServiceDescriptor = service.getJMXServiceDescriptor();
        final KarafPlatformModel karafPlatformModel =
            (KarafPlatformModel) jmxServiceDescriptor.getAdapter(KarafPlatformModel.class);

        if (karafPlatformModel == null) {
            return new Path("");
        }

        // TODO: It should be easy to compare to KarafPlatformModel's for equality
        final IPath rootDirectory;
        if (karafPlatformModel instanceof KarafWorkingPlatformModel) {
            rootDirectory = ((KarafWorkingPlatformModel) karafPlatformModel).getParentKarafModel().getRootDirectory();
        } else {
            rootDirectory = karafPlatformModel.getRootDirectory();
        }

        return rootDirectory;
    }
View Full Code Here

        }
    }

    private IPath getKarafPlatformRootPath(final MBeanProvider service) {
        final JMXServiceDescriptor jmxServiceDescriptor = service.getJMXServiceDescriptor();
        final KarafPlatformModel karafPlatformModel =
            (KarafPlatformModel) jmxServiceDescriptor.getAdapter(KarafPlatformModel.class);

        if (karafPlatformModel == null) {
            return new Path("");
        }

        // TODO: It should be easy to compare to KarafPlatformModel's for equality
        final IPath rootDirectory;
        if (karafPlatformModel instanceof KarafWorkingPlatformModel) {
            rootDirectory = ((KarafWorkingPlatformModel) karafPlatformModel).getParentKarafModel().getRootDirectory();
        } else {
            rootDirectory = karafPlatformModel.getRootDirectory();
        }

        return rootDirectory;
    }
View Full Code Here

TOP

Related Classes of org.apache.karaf.eik.core.KarafPlatformModel

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.