Backs the manage-apps and available-updates admin pages: enabling and disabling apps, applying per-app settings, and reporting which installed apps, themes and libs have a newer marketplace version available. Reached from AppsPage implementations such as ManageWebsiteBranchFolder and ManageAppsPage, and from background init and backup code that needs to enumerate or enable apps outside of an admin request.
Methods
updateApplicationSettings(AppsPage page, Organisation org, Branch websiteBranch, Map<String,String> parameters, Map<String,FileItem> files)
Returns: JsonResult
Apply a settings form post to the app named by the "settingsAppId" parameter, delegating to the app's own SettingsApplication implementation to process the form.
| Parameter | Description |
|---|---|
page | the page the settings form was posted from, passed through to the app |
org | the organisation the settings apply to |
websiteBranch | the website branch the settings apply to, or null for an account level app |
parameters | the posted form fields, including "settingsAppId" |
files | any files uploaded with the form |
getApps(Organisation organisation, Branch websiteBranch)
Returns: List<AppControlBean>
List every app available to the organisation, or to the website branch if one is given, each wrapped with its current enabled state. When websiteBranch is given, availability and enabled state are both resolved against the branch; otherwise they are resolved against the organisation, for account level apps.
| Parameter | Description |
|---|---|
organisation | the organisation to list apps for |
websiteBranch | the website branch to list apps for, or null for account level apps |
getMissing(Organisation org, Branch websiteBranch)
Returns: List<Dependency>
As getMissing(Organisation, Branch, Narrative), without reporting progress.
| Parameter | Description |
|---|---|
org | the organisation to check |
websiteBranch | the website branch to check, or null for account level apps |
getMissing(Organisation org, Branch websiteBranch, Narrative narrative)
Returns: List<Dependency>
Find every dependency required by an active app or theme that is not itself active, checking every app repository the organisation has access to.
| Parameter | Description |
|---|---|
org | the organisation to check |
websiteBranch | the website branch to check, or null for account level apps |
narrative | optional narrative to append human readable progress messages to, may be null |
getUpdates(Organisation org, Branch websiteBranch)
Returns: List<Update>
As getUpdates(Organisation, Branch, boolean) with missingOnly false, ie every enabled app, theme and lib that has a newer marketplace version available.
| Parameter | Description |
|---|---|
org | the organisation being checked |
websiteBranch | the website branch to check, or null for account level apps |
getUpdates(Organisation org, Branch websiteBranch, boolean missingOnly)
Returns: List<Update>
Find apps with an available update, or, when missingOnly is true, apps that have never had a version recorded for this branch and so need one installed before they can be used.
| Parameter | Description |
|---|---|
org | the organisation being checked |
websiteBranch | the website branch to check, or null for account level apps |
missingOnly | if true, only return apps missing an installed version, rather than apps with a newer version available |
getAllAppVersions(Organisation org, Branch websiteBranch)
Returns: List<Update>
Every enabled app, theme and lib, with the version in use and the version the marketplace currently publishes, whether or not those differ. getUpdates is this list filtered to the rows that actually have an update, so both share one pass over the repositories and one bulk marketplace lookup. The full list is what the updates panel shows when everything is already up to date, so the user can still see what they are running and how old it is.
| Parameter | Description |
|---|---|
org | the organisation being checked |
websiteBranch | the website branch to check, or null for account level apps |
getUpdatesSummary(List<Update> updates, List<Dependency> missing)
Returns: UpdatesSummary
Build the headline figures for the available updates panel from the update and missing dependency lists.
| Parameter | Description |
|---|---|
updates | the apps, themes and libs with an update available |
missing | the dependencies required by an active app that are not themselves active |