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 booleanequals(Object obj)URIgetLocation()Returns the location of the referenced repositoryStringgetNickname()Returns the optional nickname of the referenced repositoryintgetOptions()Returns bit-wise or of option constants (currently eitherIRepository.ENABLEDorIRepository.NONE).intgetType()Returns the type of the referenced repository (currently eitherIRepository.TYPE_METADATAorIRepository.TYPE_ARTIFACT)inthashCode()
-
-
-
Constructor Detail
-
RepositoryReference
public RepositoryReference(URI location, String nickname, int type, int options)
Creates a reference to another repository. TheIRepository.ENABLEDoption 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, ornulltype- the repository type (currently eitherIRepository.TYPE_METADATAorIRepository.TYPE_ARTIFACT).options- bit-wise or of option constants (currently eitherIRepository.ENABLEDorIRepository.NONE).- See Also:
IRepositoryManager.setEnabled(URI, boolean)
-
-
Method Detail
-
getLocation
public URI getLocation()
Description copied from interface:IRepositoryReferenceReturns the location of the referenced repository- Specified by:
getLocationin interfaceIRepositoryReference- Returns:
- the location
-
getType
public int getType()
Description copied from interface:IRepositoryReferenceReturns the type of the referenced repository (currently eitherIRepository.TYPE_METADATAorIRepository.TYPE_ARTIFACT)- Specified by:
getTypein interfaceIRepositoryReference- Returns:
- the repository type
-
getOptions
public int getOptions()
Description copied from interface:IRepositoryReferenceReturns bit-wise or of option constants (currently eitherIRepository.ENABLEDorIRepository.NONE).- Specified by:
getOptionsin interfaceIRepositoryReference- Returns:
- bit-wise or of option constants
-
getNickname
public String getNickname()
Description copied from interface:IRepositoryReferenceReturns the optional nickname of the referenced repository- Specified by:
getNicknamein interfaceIRepositoryReference- Returns:
- The nickname or
null
-
-