Class ImmutableInMemoryMetadataRepository

  • All Implemented Interfaces:
    org.eclipse.core.runtime.IAdaptable, org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IInstallableUnit>, org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>, org.eclipse.equinox.p2.repository.metadata.IMetadataRepository

    public class ImmutableInMemoryMetadataRepository
    extends java.lang.Object
    implements org.eclipse.equinox.p2.repository.metadata.IMetadataRepository
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private QueryableCollection units  
      • Fields inherited from interface org.eclipse.equinox.p2.repository.IRepository

        ENABLED, NONE, PREFERENCE_NODE, PROP_COMPRESSED, PROP_DESCRIPTION, PROP_MIRRORS_BASE_URL, PROP_MIRRORS_URL, PROP_NAME, PROP_NICKNAME, PROP_PASSWORD, PROP_SYSTEM, PROP_TIMESTAMP, PROP_USERNAME, TYPE_ARTIFACT, TYPE_METADATA
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addInstallableUnits​(java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> installableUnits)  
      void addReferences​(java.util.Collection<? extends org.eclipse.equinox.p2.repository.IRepositoryReference> references)  
      void compress​(org.eclipse.equinox.p2.core.IPool<org.eclipse.equinox.p2.metadata.IInstallableUnit> iuPool)  
      org.eclipse.core.runtime.IStatus executeBatch​(org.eclipse.equinox.p2.repository.IRunnableWithProgress runnable, org.eclipse.core.runtime.IProgressMonitor monitor)  
      <T> T getAdapter​(java.lang.Class<T> adapter)  
      java.lang.String getDescription()  
      java.net.URI getLocation()  
      java.lang.String getName()  
      java.util.Map<java.lang.String,​java.lang.String> getProperties()  
      java.lang.String getProperty​(java.lang.String key)  
      java.lang.String getProvider()  
      org.eclipse.equinox.p2.core.IProvisioningAgent getProvisioningAgent()  
      java.util.Collection<org.eclipse.equinox.p2.repository.IRepositoryReference> getReferences()  
      java.lang.String getType()  
      java.lang.String getVersion()  
      boolean isModifiable()  
      org.eclipse.equinox.p2.query.IQueryResult<org.eclipse.equinox.p2.metadata.IInstallableUnit> query​(org.eclipse.equinox.p2.query.IQuery<org.eclipse.equinox.p2.metadata.IInstallableUnit> query, org.eclipse.core.runtime.IProgressMonitor monitor)  
      void removeAll()  
      boolean removeInstallableUnits​(java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> installableUnits)  
      java.lang.String setProperty​(java.lang.String key, java.lang.String value)  
      java.lang.String setProperty​(java.lang.String key, java.lang.String value, org.eclipse.core.runtime.IProgressMonitor monitor)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImmutableInMemoryMetadataRepository

        public ImmutableInMemoryMetadataRepository​(java.util.Set<org.eclipse.equinox.p2.metadata.IInstallableUnit> units)
    • Method Detail

      • query

        public org.eclipse.equinox.p2.query.IQueryResult<org.eclipse.equinox.p2.metadata.IInstallableUnit> query​(org.eclipse.equinox.p2.query.IQuery<org.eclipse.equinox.p2.metadata.IInstallableUnit> query,
                                                                                                                 org.eclipse.core.runtime.IProgressMonitor monitor)
        Specified by:
        query in interface org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IInstallableUnit>
      • executeBatch

        public org.eclipse.core.runtime.IStatus executeBatch​(org.eclipse.equinox.p2.repository.IRunnableWithProgress runnable,
                                                             org.eclipse.core.runtime.IProgressMonitor monitor)
        Specified by:
        executeBatch in interface org.eclipse.equinox.p2.repository.metadata.IMetadataRepository
      • getLocation

        public java.net.URI getLocation()
        Specified by:
        getLocation in interface org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
      • getType

        public java.lang.String getType()
        Specified by:
        getType in interface org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
      • getVersion

        public java.lang.String getVersion()
        Specified by:
        getVersion in interface org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
      • getDescription

        public java.lang.String getDescription()
        Specified by:
        getDescription in interface org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
      • getProvider

        public java.lang.String getProvider()
        Specified by:
        getProvider in interface org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.String> getProperties()
        Specified by:
        getProperties in interface org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
      • getProperty

        public java.lang.String getProperty​(java.lang.String key)
        Specified by:
        getProperty in interface org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
      • getProvisioningAgent

        public org.eclipse.equinox.p2.core.IProvisioningAgent getProvisioningAgent()
        Specified by:
        getProvisioningAgent in interface org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
      • getAdapter

        public <T> T getAdapter​(java.lang.Class<T> adapter)
        Specified by:
        getAdapter in interface org.eclipse.core.runtime.IAdaptable
      • getReferences

        public java.util.Collection<org.eclipse.equinox.p2.repository.IRepositoryReference> getReferences()
        Specified by:
        getReferences in interface org.eclipse.equinox.p2.repository.metadata.IMetadataRepository
      • isModifiable

        public boolean isModifiable()
        Specified by:
        isModifiable in interface org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
      • setProperty

        public java.lang.String setProperty​(java.lang.String key,
                                            java.lang.String value)
        Specified by:
        setProperty in interface org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
      • setProperty

        public java.lang.String setProperty​(java.lang.String key,
                                            java.lang.String value,
                                            org.eclipse.core.runtime.IProgressMonitor monitor)
        Specified by:
        setProperty in interface org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IInstallableUnit>
      • addInstallableUnits

        public void addInstallableUnits​(java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> installableUnits)
        Specified by:
        addInstallableUnits in interface org.eclipse.equinox.p2.repository.metadata.IMetadataRepository
      • addReferences

        public void addReferences​(java.util.Collection<? extends org.eclipse.equinox.p2.repository.IRepositoryReference> references)
        Specified by:
        addReferences in interface org.eclipse.equinox.p2.repository.metadata.IMetadataRepository
      • removeInstallableUnits

        public boolean removeInstallableUnits​(java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> installableUnits)
        Specified by:
        removeInstallableUnits in interface org.eclipse.equinox.p2.repository.metadata.IMetadataRepository
      • removeAll

        public void removeAll()
        Specified by:
        removeAll in interface org.eclipse.equinox.p2.repository.metadata.IMetadataRepository
      • compress

        public void compress​(org.eclipse.equinox.p2.core.IPool<org.eclipse.equinox.p2.metadata.IInstallableUnit> iuPool)
        Specified by:
        compress in interface org.eclipse.equinox.p2.repository.metadata.IMetadataRepository