public class P2OperationsHandler
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addRepository(java.net.URI repositoryURI)
Adds a new p2 repository
|
void |
addRepository(java.net.URI repositoryURI,
java.lang.String repositoryName)
Adds a new p2 repository.
|
IStatus |
checkForUpdates()
Checks for updates.
|
boolean |
checkIfInstalled(java.lang.String installableUnitID)
Checks if a specific
IInstallableUnit (IU) is installed |
java.util.List<IInstallableUnit> |
getInstalledFeatures()
Returns the installed features.
|
static P2OperationsHandler |
getInstance()
Returns the single instance of P2OperationsHandler.
|
java.net.URI |
getRepositoryForInstallableUnit(java.lang.String installableUnitID)
Gets the repository for the
IInstallableUnit (IU) with the given ID. |
java.lang.String |
getRepositoryName(java.net.URI repositoryURI)
Gets the repository name.
|
IStatus |
installAvailableUpdates()
Installs available updates from all repositories.
|
boolean |
installIU(java.lang.String installableUnitID,
java.net.URI repositoryURI)
Installs an
IInstallableUnit from a p2 repository. |
boolean |
isKnownRepository(java.net.URI repositoryURI)
Checks if the specified repository is already known.
|
void |
setProgressMonitor(IProgressMonitor progressMonitor)
Sets the progress monitor for the used processes.
|
public static P2OperationsHandler getInstance()
public void setProgressMonitor(IProgressMonitor progressMonitor)
progressMonitor
- the new progress monitorpublic boolean checkIfInstalled(java.lang.String installableUnitID)
IInstallableUnit
(IU) is installedinstallableUnitID
- The ID of the IU of interestpublic void addRepository(java.net.URI repositoryURI)
repositoryURI
- the URI
of the repository to addpublic void addRepository(java.net.URI repositoryURI, java.lang.String repositoryName)
repositoryURI
- the repository URIrepositoryName
- the repository namepublic boolean isKnownRepository(java.net.URI repositoryURI)
repositoryURI
- the repository URIpublic boolean installIU(java.lang.String installableUnitID, java.net.URI repositoryURI)
IInstallableUnit
from a p2 repository.installableUnitID
- the ID of the IU to be installedrepositoryURI
- the repository IDpublic IStatus checkForUpdates()
public IStatus installAvailableUpdates()
public java.net.URI getRepositoryForInstallableUnit(java.lang.String installableUnitID)
IInstallableUnit
(IU) with the given ID.installableUnitID
- the ID of the IU of interestpublic java.lang.String getRepositoryName(java.net.URI repositoryURI)
repositoryURI
- the repository URIpublic java.util.List<IInstallableUnit> getInstalledFeatures() throws java.lang.Exception
java.lang.Exception
- the exception