Examples of IMetadataRepositoryManager


Examples of org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager

            throw ProvisioningException.makeExceptionFromErrorCode(CompMgtMessages.INVALID_REPO_NAME,
                    (nickName == null) ? "null value" : nickName);
        }

        try {
            IMetadataRepositoryManager metadataRepositoryManager = ServiceHolder.getMetadataRepositoryManager();
            IArtifactRepositoryManager artifactRepositoryManager = ServiceHolder.getArtifactRepositoryManager();

            if (metadataRepositoryManager.contains(location)) {
                return;
            }

            //Validating the repositories
            status = metadataRepositoryManager.validateRepositoryLocation(location, null);
            if (!status.isOK()) {
                throw ProvisioningException.makeExceptionFromErrorCode(
                        CompMgtMessages.INVALID_REPO_LOCATION, location);
            }

            //Loading the metadata repository
            metadataRepositoryManager.loadRepository(location, null);
            metadataRepositoryManager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, nickName);

            //Loading the artifact repository
            artifactRepositoryManager.loadRepository(location, null);
            artifactRepositoryManager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, nickName);
        } catch (Exception e) {
View Full Code Here

Examples of org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager

                    CompMgtMessages.FAILD_TO_REMOVE_REPSITORY, e, location);
        }
    }

    public static void enableRepository(URI location, boolean enable) throws ProvisioningException {
        IMetadataRepositoryManager metadataRepositoryManager;
        IArtifactRepositoryManager artifactRepositoryManager;

        if (location == null) {
            throw ProvisioningException.makeExceptionFromErrorCode(CompMgtMessages.INVALID_REPO_LOCATION,
                    "null value");
        }

        try {
            metadataRepositoryManager = ServiceHolder.getMetadataRepositoryManager();
            artifactRepositoryManager = ServiceHolder.getArtifactRepositoryManager();
            metadataRepositoryManager.setEnabled(location, enable);
            artifactRepositoryManager.setEnabled(location, enable);
        } catch (Exception e) {
            throw ProvisioningException.makeExceptionFromErrorCode(
                    CompMgtMessages.FAILD_TO_ENABLE_REPSITORY, e, location);
        }
View Full Code Here

Examples of org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager

        }

    }

    public static boolean isRepositoryEnabled(URI location) throws ProvisioningException {
        IMetadataRepositoryManager metadataRepositoryManager = ServiceHolder.getMetadataRepositoryManager();
        IArtifactRepositoryManager artifactRepositoryManager = ServiceHolder.getArtifactRepositoryManager();
        return metadataRepositoryManager.isEnabled(location) && artifactRepositoryManager.isEnabled(location);
    }
View Full Code Here

Examples of org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager

        return metadataRepositoryManager.isEnabled(location) && artifactRepositoryManager.isEnabled(location);
    }

    public static URI[] getRepositoryList(int type) throws ProvisioningException {
        try {
            IMetadataRepositoryManager metadataRepositoryManager = ServiceHolder.getMetadataRepositoryManager();
            return metadataRepositoryManager.getKnownRepositories(type);
        } catch (Exception e) {
            throw ProvisioningException.makeExceptionFromErrorCode(
                    CompMgtMessages.FAILD_TO_GET_REPSITORY_LIST, e);
        }
    }
View Full Code Here

Examples of org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager

                    CompMgtMessages.FAILD_TO_GET_REPSITORY_LIST, e);
        }
    }

    public static String getMetadataRepositoryProperty(URI location, String key) throws ProvisioningException {
        IMetadataRepositoryManager metadataRepositoryManager = ServiceHolder.getMetadataRepositoryManager();
        return metadataRepositoryManager.getRepositoryProperty(location, key);
    }
View Full Code Here

Examples of org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager

        return installableUnits[0];
    }


    private static IMetadataRepository getMetadataRepository(URI location) throws ProvisioningException {
        IMetadataRepositoryManager metadataRepositoryManager = ServiceHolder.getMetadataRepositoryManager();
        try {
            return metadataRepositoryManager.loadRepository(location, null);
        } catch (ProvisionException e) {
            throw new ProvisioningException(e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager

    }

    private static void setMetadataRepositoryProperty(URI location,
                                                      String key,
                                                      String value) throws ProvisioningException {
        IMetadataRepositoryManager metadataRepositoryManager = ServiceHolder.getMetadataRepositoryManager();
        metadataRepositoryManager.setRepositoryProperty(location, key, value);
    }
View Full Code Here

Examples of org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager

        IMetadataRepositoryManager metadataRepositoryManager = ServiceHolder.getMetadataRepositoryManager();
        metadataRepositoryManager.setRepositoryProperty(location, key, value);
    }

    private static void removeMetadataRepository(URI location) throws ProvisioningException {
        IMetadataRepositoryManager metadataRepositoryManager = ServiceHolder.getMetadataRepositoryManager();
        metadataRepositoryManager.removeRepository(location);
    }
View Full Code Here

Examples of org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager

            Display _display = _shell.getDisplay();
            ReadAndDispatchProgressMonitorWrapper _readAndDispatchProgressMonitorWrapper = new ReadAndDispatchProgressMonitorWrapper(monitor, _display);
            final SubMonitor wpm = SubMonitor.convert(_readAndDispatchProgressMonitorWrapper, ("Creating content assist for " + uri), 100);
            try {
              Object _service = TargetPlatformProposalProvider.this.provisioningAgent.getService(IMetadataRepositoryManager.SERVICE_NAME);
              final IMetadataRepositoryManager repositoryManager = ((IMetadataRepositoryManager) _service);
              URI _uRI = new URI(uri);
              SubMonitor _newChild = wpm.newChild(90);
              final IMetadataRepository metadataRepository = repositoryManager.loadRepository(_uRI, _newChild);
              IQuery<IInstallableUnit> _iUAssistQuery = TargetPlatformProposalProvider.this.getIUAssistQuery();
              SubMonitor _newChild_1 = wpm.newChild(5);
              IQueryResult<IInstallableUnit> _query = metadataRepository.query(_iUAssistQuery, _newChild_1);
              final Set<IInstallableUnit> results = _query.toUnmodifiableSet();
              final Function1<IInstallableUnit, Boolean> _function = new Function1<IInstallableUnit, Boolean>() {
View Full Code Here

Examples of org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager

        try {
          ReadAndDispatchProgressMonitorWrapper _readAndDispatchProgressMonitorWrapper = new ReadAndDispatchProgressMonitorWrapper(monitor, display);
          final SubMonitor wpm = SubMonitor.convert(_readAndDispatchProgressMonitorWrapper, ("Creating content assist for " + uri), 100);
          try {
            Object _service = TargetPlatformProposalProvider.this.provisioningAgent.getService(IMetadataRepositoryManager.SERVICE_NAME);
            final IMetadataRepositoryManager repositoryManager = ((IMetadataRepositoryManager) _service);
            URI _uRI = new URI(uri);
            SubMonitor _newChild = wpm.newChild(95);
            final IMetadataRepository metadataRepository = repositoryManager.loadRepository(_uRI, _newChild);
            String _iD = iu.getID();
            IQuery<IInstallableUnit> _createIUQuery = QueryUtil.createIUQuery(_iD);
            SubMonitor _newChild_1 = wpm.newChild(5);
            IQueryResult<IInstallableUnit> _query = metadataRepository.query(_createIUQuery, _newChild_1);
            final Set<IInstallableUnit> results = _query.toUnmodifiableSet();
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.