Class RepositoryReference
- java.lang.Object
-
- org.eclipse.equinox.p2.repository.spi.RepositoryReference
-
- All Implemented Interfaces:
IRepositoryReference
public class RepositoryReference extends Object implements IRepositoryReference
Concrete implementation of a repository reference. This class can be used by clients to define new repository references.- Since:
- 2.0
- See Also:
IMetadataRepository.addReferences(java.util.Collection)
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Constructor Summary
Constructors Constructor Description RepositoryReference(URI location, String nickname, int type, int options)
Creates a reference to another repository.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
URI
getLocation()
Returns the location of the referenced repositoryString
getNickname()
Returns the optional nickname of the referenced repositoryint
getOptions()
Returns bit-wise or of option constants (currently eitherIRepository.ENABLED
orIRepository.NONE
).int
getType()
Returns the type of the referenced repository (currently eitherIRepository.TYPE_METADATA
orIRepository.TYPE_ARTIFACT
)int
hashCode()
-
-
-
Constructor Detail
-
RepositoryReference
public RepositoryReference(URI location, String nickname, int type, int options)
Creates a reference to another repository. TheIRepository.ENABLED
option flag controls whether the referenced repository should be marked as enabled when added to the repository manager. If this flag is set, the repository will be marked as enabled when added to the repository manager. If this flag is missing, the repository will be marked as disabled.- Parameters:
location
- the location of the repository to addnickname
- The nickname of the repository, ornull
type
- the repository type (currently eitherIRepository.TYPE_METADATA
orIRepository.TYPE_ARTIFACT
).options
- bit-wise or of option constants (currently eitherIRepository.ENABLED
orIRepository.NONE
).- See Also:
IRepositoryManager.setEnabled(URI, boolean)
-
-
Method Detail
-
getLocation
public URI getLocation()
Description copied from interface:IRepositoryReference
Returns the location of the referenced repository- Specified by:
getLocation
in interfaceIRepositoryReference
- Returns:
- the location
-
getType
public int getType()
Description copied from interface:IRepositoryReference
Returns the type of the referenced repository (currently eitherIRepository.TYPE_METADATA
orIRepository.TYPE_ARTIFACT
)- Specified by:
getType
in interfaceIRepositoryReference
- Returns:
- the repository type
-
getOptions
public int getOptions()
Description copied from interface:IRepositoryReference
Returns bit-wise or of option constants (currently eitherIRepository.ENABLED
orIRepository.NONE
).- Specified by:
getOptions
in interfaceIRepositoryReference
- Returns:
- bit-wise or of option constants
-
getNickname
public String getNickname()
Description copied from interface:IRepositoryReference
Returns the optional nickname of the referenced repository- Specified by:
getNickname
in interfaceIRepositoryReference
- Returns:
- The nickname or
null
-
-