Class WorkspaceRepository

  • All Implemented Interfaces:
    ArtifactRepository

    public final class WorkspaceRepository
    extends java.lang.Object
    implements ArtifactRepository
    A repository backed by an IDE workspace, the output of a build session or similar ad-hoc collection of artifacts. As far as the repository system is concerned, a workspace repository is read-only, i.e. can only be used for artifact resolution but not installation/deployment. Note that this class merely describes such a repository, actual access to the contained artifacts is handled by a WorkspaceReader.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object key  
      private java.lang.String type  
    • Constructor Summary

      Constructors 
      Constructor Description
      WorkspaceRepository()
      Creates a new workspace repository of type "workspace" and a random key.
      WorkspaceRepository​(java.lang.String type)
      Creates a new workspace repository with the specified type and a random key.
      WorkspaceRepository​(java.lang.String type, java.lang.Object key)
      Creates a new workspace repository with the specified type and key.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getContentType()
      Gets the type of the repository, for example "default".
      java.lang.String getId()
      Gets the identifier of this repository.
      java.lang.Object getKey()
      Gets the key of this workspace repository.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • type

        private final java.lang.String type
      • key

        private final java.lang.Object key
    • Constructor Detail

      • WorkspaceRepository

        public WorkspaceRepository()
        Creates a new workspace repository of type "workspace" and a random key.
      • WorkspaceRepository

        public WorkspaceRepository​(java.lang.String type)
        Creates a new workspace repository with the specified type and a random key.
        Parameters:
        type - The type of the repository, may be null.
      • WorkspaceRepository

        public WorkspaceRepository​(java.lang.String type,
                                   java.lang.Object key)
        Creates a new workspace repository with the specified type and key. The key is used to distinguish one workspace from another and should be sensitive to the artifacts that are (potentially) available in the workspace.
        Parameters:
        type - The type of the repository, may be null.
        key - The (comparison) key for the repository, may be null to generate a unique random key.
    • Method Detail

      • getContentType

        public java.lang.String getContentType()
        Description copied from interface: ArtifactRepository
        Gets the type of the repository, for example "default".
        Specified by:
        getContentType in interface ArtifactRepository
        Returns:
        The (case-sensitive) type of the repository, never null.
      • getId

        public java.lang.String getId()
        Description copied from interface: ArtifactRepository
        Gets the identifier of this repository.
        Specified by:
        getId in interface ArtifactRepository
        Returns:
        The (case-sensitive) identifier, never null.
      • getKey

        public java.lang.Object getKey()
        Gets the key of this workspace repository. The key is used to distinguish one workspace from another and should be sensitive to the artifacts that are (potentially) available in the workspace.
        Returns:
        The (comparison) key for this workspace repository, never null.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object