Interface IRepository<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ENABLED
      An option flag constant (value 1) indicating an enabled repository.
      static int NONE
      General purpose zero-valued bit mask constant.
      static java.lang.String PREFERENCE_NODE
      The node identifier for repository secure preference store.
      static java.lang.String PROP_COMPRESSED
      The key for a boolean property indicating that repository metadata is stored in compressed form.
      static java.lang.String PROP_DESCRIPTION
      The key for a string property providing a human-readable description for the repository.
      static java.lang.String PROP_MIRRORS_BASE_URL
      The key for a string property providing the common base URL that should be replaced with the mirror URL.
      static java.lang.String PROP_MIRRORS_URL
      The key for a string property providing a URL that can return mirrors of this repository.
      static java.lang.String PROP_NAME
      The key for a string property providing a human-readable name for the repository.
      static java.lang.String PROP_NICKNAME
      The key for a string property providing a user-defined name for the repository.
      static java.lang.String PROP_PASSWORD
      The key for a string property providing the password to an authenticated URL.
      static java.lang.String PROP_SYSTEM
      The key for a boolean property indicating that the repository is a system repository.
      static java.lang.String PROP_TIMESTAMP
      The key for a string property containing the time when the repository was last modified.
      static java.lang.String PROP_USERNAME
      The key for a string property providing the user name to an authenticated URL.
      static int TYPE_ARTIFACT
      A repository type constant (value 1) representing an artifact repository.
      static int TYPE_METADATA
      A repository type constant (value 0) representing a metadata repository.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Returns a brief description of the repository.
      java.net.URI getLocation()
      Returns the location of this repository.
      java.lang.String getName()
      Returns the name of the repository.
      java.util.Map<java.lang.String,​java.lang.String> getProperties()
      Returns a read-only collection of the properties of the repository.
      java.lang.String getProperty​(java.lang.String key)
      Returns the repository property with the given key, or null if no such property is defined
      java.lang.String getProvider()
      Returns the name of the provider of the repository.
      IProvisioningAgent getProvisioningAgent()
      Returns the provisioning agent that manages this repository
      java.lang.String getType()
      Returns a string representing the type of the repository.
      java.lang.String getVersion()
      Returns a string representing the version for the repository type.
      boolean isModifiable()
      Returns true if this repository can be modified, and false otherwise.
      java.lang.String setProperty​(java.lang.String key, java.lang.String value)
      Sets the value of the property with the given key.
      java.lang.String setProperty​(java.lang.String key, java.lang.String value, IProgressMonitor monitor)
      Sets the value of the property with the given key.
      • Methods inherited from interface org.eclipse.equinox.p2.query.IQueryable

        query
    • Field Detail

      • PROP_SYSTEM

        static final java.lang.String PROP_SYSTEM
        The key for a boolean property indicating that the repository is a system repository. System repositories are implementation details that are not subject to general access, hidden from the typical user, etc. This property is never stored in the repository itself, but is instead tracked and managed by an IRepositoryManager.
        See Also:
        IRepositoryManager.getRepositoryProperty(URI, String), Constant Field Values
      • PROP_COMPRESSED

        static final java.lang.String PROP_COMPRESSED
        The key for a boolean property indicating that repository metadata is stored in compressed form. A compressed repository will have lower bandwidth cost to read when remote, but higher processing cost to uncompress when reading.
        See Also:
        getProperties(), Constant Field Values
      • PROP_MIRRORS_BASE_URL

        static final java.lang.String PROP_MIRRORS_BASE_URL
        The key for a string property providing the common base URL that should be replaced with the mirror URL.
        See Also:
        getProperties(), Constant Field Values
      • PROP_MIRRORS_URL

        static final java.lang.String PROP_MIRRORS_URL
        The key for a string property providing a URL that can return mirrors of this repository.
        See Also:
        getProperties(), Constant Field Values
      • PROP_TIMESTAMP

        static final java.lang.String PROP_TIMESTAMP
        The key for a string property containing the time when the repository was last modified.
        See Also:
        getProperties(), Constant Field Values
      • PROP_USERNAME

        static final java.lang.String PROP_USERNAME
        The key for a string property providing the user name to an authenticated URL. This key is used in the secure preference store for repository data.
        See Also:
        PREFERENCE_NODE, Constant Field Values
      • PROP_PASSWORD

        static final java.lang.String PROP_PASSWORD
        The key for a string property providing the password to an authenticated URL. This key is used in the secure preference store for repository data.
        See Also:
        PREFERENCE_NODE, Constant Field Values
      • PREFERENCE_NODE

        static final java.lang.String PREFERENCE_NODE
        The node identifier for repository secure preference store.
        See Also:
        Constant Field Values
      • TYPE_METADATA

        static final int TYPE_METADATA
        A repository type constant (value 0) representing a metadata repository.
        See Also:
        Constant Field Values
      • TYPE_ARTIFACT

        static final int TYPE_ARTIFACT
        A repository type constant (value 1) representing an artifact repository.
        See Also:
        Constant Field Values
      • NONE

        static final int NONE
        General purpose zero-valued bit mask constant. Useful whenever you need to supply a bit mask with no bits set.
        See Also:
        Constant Field Values
      • ENABLED

        static final int ENABLED
        An option flag constant (value 1) indicating an enabled repository.
        See Also:
        Constant Field Values
    • Method Detail

      • getLocation

        java.net.URI getLocation()
        Returns the location of this repository.
        Returns:
        the URI representing the repository location.
      • getName

        java.lang.String getName()
        Returns the name of the repository.
        Returns:
        the name of the repository.
      • getType

        java.lang.String getType()
        Returns a string representing the type of the repository. Note this method does not indicate the type of repository contents (metadata or artifacts), but instead the unique fully qualified id representing the repository implementation.
        Returns:
        the type of the repository.
      • getVersion

        java.lang.String getVersion()
        Returns a string representing the version for the repository type.
        Returns:
        the version of the type of the repository.
      • getDescription

        java.lang.String getDescription()
        Returns a brief description of the repository.
        Returns:
        the description of the repository.
      • getProvider

        java.lang.String getProvider()
        Returns the name of the provider of the repository.
        Returns:
        the provider of this repository.
      • getProperties

        java.util.Map<java.lang.String,​java.lang.String> getProperties()
        Returns a read-only collection of the properties of the repository.
        Returns:
        the properties of this repository.
      • getProperty

        java.lang.String getProperty​(java.lang.String key)
        Returns the repository property with the given key, or null if no such property is defined
        Parameters:
        key - the property key
        Returns:
        the property value, or null
      • getProvisioningAgent

        IProvisioningAgent getProvisioningAgent()
        Returns the provisioning agent that manages this repository
        Returns:
        A provisioning agent.
      • isModifiable

        boolean isModifiable()
        Returns true if this repository can be modified, and false otherwise. Attempts to change the contents of an unmodifiable repository will fail.
        Returns:
        whether or not this repository can be modified
      • setProperty

        java.lang.String setProperty​(java.lang.String key,
                                     java.lang.String value)
        Sets the value of the property with the given key. Returns the old property associated with that key, if any. Setting a value of null will remove the corresponding key from the properties of this repository.
        Parameters:
        key - The property key
        value - The new property value, or null to remove the key
        Returns:
        The old property value, or null if there was no old value
      • setProperty

        java.lang.String setProperty​(java.lang.String key,
                                     java.lang.String value,
                                     IProgressMonitor monitor)
        Sets the value of the property with the given key. Returns the old property associated with that key, if any. Setting a value of null will remove the corresponding key from the properties of this repository.
        Parameters:
        key - The property key
        value - The new property value, or null to remove the key
        monitor - A progress monitor use to track progress and cancel the operation. This may be a long running operation if another process holds the lock on this location
        Returns:
        The old property value, or null if there was no old value
        Since:
        2.1