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.

ParameterDescription
pagethe page the settings form was posted from, passed through to the app
orgthe organisation the settings apply to
websiteBranchthe website branch the settings apply to, or null for an account level app
parametersthe posted form fields, including "settingsAppId"
filesany 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.

ParameterDescription
organisationthe organisation to list apps for
websiteBranchthe 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.

ParameterDescription
orgthe organisation to check
websiteBranchthe 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.

ParameterDescription
orgthe organisation to check
websiteBranchthe website branch to check, or null for account level apps
narrativeoptional 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.

ParameterDescription
orgthe organisation being checked
websiteBranchthe 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.

ParameterDescription
orgthe organisation being checked
websiteBranchthe website branch to check, or null for account level apps
missingOnlyif 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.

ParameterDescription
orgthe organisation being checked
websiteBranchthe 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.

ParameterDescription
updatesthe apps, themes and libs with an update available
missingthe dependencies required by an active app that are not themselves active
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.