Interface InstallationUpdateSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to manage installations.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can get installation updates.Gets the packages to install to bring the site up to date.getCurrentPackagesForInstallation(Id installationId) Gets the packages to install to bring the specified installation up to date.Gets a list of installations requiring update.Gets the installations whose packages are obsolete.getSite()Gets theSiteassociated with this session.Gets theSiteIdassociated with this session.booleanTests if the given installation is current.booleanTests if the given installation is obsolete.voidPerforms an auto-update by adding all new updated installations and removing of all obsolete installations on the site.voidupdateInstallation(Id installationId) Updates a single installation.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getSiteId
Id getSiteId()Gets theSiteIdassociated with this session.- Returns:
- the
Site Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getSite
Gets theSiteassociated with this session.- Returns:
- the
Siteassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canGetInstallationUpdates
boolean canGetInstallationUpdates()Tests if this user can get installation updates. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may wish not to offer update operations to unauthorized users.- Returns:
falseif package updates are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
isInstallationCurrent
Tests if the given installation is current.- Returns:
trueif the installation is up to date,falseotherwise- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInstallationsToUpdate
InstallationList getInstallationsToUpdate() throws OperationFailedException, PermissionDeniedExceptionGets a list of installations requiring update. This just returns installations that are out of date.getPackagesToUpdate()orgetPackagesToUpdateForInstallation()should be used to acquire the packages to install.- Returns:
- the resulting
InstallationList - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCurrentPackages
Gets the packages to install to bring the site up to date.- Returns:
- the next packages to install
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCurrentPackagesForInstallation
PackageList getCurrentPackagesForInstallation(Id installationId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the packages to install to bring the specified installation up to date.- Parameters:
installationId- anIdof anInstallation- Returns:
- the next packages to install
- Throws:
NotFoundException-installationIdis not foundNullArgumentException-installationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isInstallationObsolete
Tests if the given installation is obsolete.- Returns:
trueif the installation is obsolete,falseotherwise- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getObsoleteInstallations
InstallationList getObsoleteInstallations() throws OperationFailedException, PermissionDeniedExceptionGets the installations whose packages are obsolete.- Returns:
- the obsolete installations
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateInstallation
void updateInstallation(Id installationId) throws NotFoundException, OperationFailedException, PermissionDeniedException Updates a single installation.- Parameters:
installationId- anIdof anInstallation- Throws:
NotFoundException-installationIdis not foundNullArgumentException-installationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
synchronizeInstallations
Performs an auto-update by adding all new updated installations and removing of all obsolete installations on the site.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-