Represents one installed instance of a repository-backed marketplace app, dispatching platform callbacks to its JavaScript logic in controllers.xml. It implements the platform's Application interfaces for paths, menus, portlets, reports, settings, templating, ecommerce, roles, search, signin and more, loading the compiled controller mappings from whichever branch is currently active for the organisation or website in context. Instances are created and cached by RepositoryAppManager, keyed by the app's instance id, which is also the name of its underlying app repository.
Implements: Application, PathApplication, MenuApplication, PortletApplication, ReportingApplication, SettingsApplication, TemplatingApplication, ManageProfileApplication, EmailApplication, DependentApplication, JourneyBuilderApplication, EComApplication, ComponentApplication, FieldProviderApplication, QueryApplication, ChildPageApplication, SharingApplication, BrowseResourcesApplication, CaptchaApplication, PaymentProviderApplication, ISmsProvider, EmailSenderApplication, PromotionMechanicApplication, TableUploadApplication, SearchableApplication, SigninProviderApplication, AuthenticationHandlerApplication
Properties
| Property | Returns | Description |
|---|---|---|
| allEsMappingDetails | List<ESMappingsDetails> | The Elasticsearch index mapping definitions declared by this app's currently active branch, used to build or validate the app's search indexes. |
| appProvider | boolean | Whether this app's repository is flagged as providing installable apps, rather than being a library or theme. |
| appSettings | Map<String,String> | This app's configured settings for the current root folder, as a map of setting name to string value. |
| authenticationHandlers | List<JsAuthenticationHandler> | The custom authentication handlers this app contributes, declared in its currently active branch, each wrapping a JavaScript authentication handler mapping. |
| availableVersions | List<String> | The version names available for this app, taken from its non-hidden repository branches plus the currently published version if it is not already among them, sorted alphabetically. |
| captchaEnabled | boolean | Whether this app is configured as a captcha provider, meaning its currently active branch declares a captcha verification function. |
| controllerMappings | ControllerMappingList | The parsed controllers.xml mappings for this app's currently active branch, cached where possible. This is the compiled definition of every route, menu, portlet, role and other declared behaviour for the app. |
| currentBranch | Branch | The branch of this app's repository that is currently active for the current root folder, taking into account any version pinned in the site's or organisation's app settings. |
| currentPublishedItem | MarketPlacePublishedItem | The current published marketplace item for this app, looked up from its repository name. |
| currentPublishedVersion | String | The version name of this app's current published marketplace item. |
| emailSendingSupported | boolean | Whether this app is configured as an email sending provider, meaning its currently active branch declares email sender details with a send function. |
| instanceId | String | This app's unique instance id within its account, which it is registered and looked up under, and which is also the name of its underlying app repository. |
| lib | boolean | Whether this app is a plain library, meaning it is neither an app provider nor a theme provider. |
| manualEnable | boolean | Whether this app must be manually enabled rather than being auto-enabled. Repository apps always require manual enabling. |
| memberPaymentForm | String | Renders this app's checkout payment form template for a signed-in member purchaser, using its declared payment provider details. |
| metricTypes | List<MetricType> | The reporting metric types this app contributes, declared in its currently active branch. |
| name | String | This app's name, which is the same value as its instance id. |
| paymentEnabled | boolean | Whether this app is configured as a payment provider, meaning its currently active branch declares payment provider details with a process function. |
| paymentForm | String | Renders this app's checkout payment form template for a non-member purchaser, using its declared payment provider details. |
| paymentOptions | List<PaymentOptionBean> | The payment options this app offers when it is configured as a payment provider, taken from its declared payment provider details. |
| pointsExpiryRuleTypes | List<PointsExpiryRuleType> | The rewards points expiry rule types this app contributes, declared in its currently active branch. |
| pointsRuleTypes | List<PointsRuleType> | The rewards points rule types this app contributes, declared in its currently active branch. |
| promotionTypes | List<PromotionMechanicType> | The promotion mechanic types this app contributes, declared in its currently active branch. |
| recipe | Recipe | The setup recipe declared for this app's currently active branch, used to drive guided or automated configuration of the app. |
| repositoryAppManager | RepositoryAppManager | The manager responsible for creating and caching instances of this app. |
| roles | List<Role> | The roles this app grants, declared in its currently active branch. |
| smsEnabled | boolean | Whether this app is configured as an SMS provider, meaning its currently active branch declares SMS provider details with a send function. |
| tableActionHandlers | List<TableActionHandler> | The row-action handlers this app registers for query tables, resolved from its currently active branch. |
| theme | Theme | This app's theme, if it is a theme provider. |
| themeProvider | boolean | Whether this app's repository is flagged as providing a website theme. |
Methods
readAppFileAsString(String path) · getRecipe() · getAllEsMappingDetails() · getInstanceId() · getTableActionHandlers() · getCurrentBranch() · call(String execFn, Object args) · getRoles() · getAvailableVersions() · getAppSettings() · getSetting(String name) · getSetting(CommonResource page, String name) · getTheme() · getCurrentPublishedItem() · getCurrentPublishedVersion() · isAppProvider() · isThemeProvider() · isLib() · getMetricTypes() · getControllerMappings() · getRepositoryAppManager() · isCaptchaEnabled() · isManualEnable() · getPaymentForm() · getMemberPaymentForm() · getPaymentOptions() · isPaymentEnabled() · isSmsEnabled() · getName() · isEmailSendingSupported() · getAuthenticationHandlers() · getPromotionTypes() · getPointsRuleTypes() · getPointsExpiryRuleTypes()
readAppFileAsString(String path)
Returns: String
Reads a file from this app's repository, from the branch that is currently active for the current root folder, and returns its contents as text.
| Parameter | Description |
|---|---|
path | the repository path of the file to read, relative to the branch root |
getRecipe()
Returns: Recipe
The setup recipe declared for this app's currently active branch, used to drive guided or automated configuration of the app.
getAllEsMappingDetails()
Returns: List<ESMappingsDetails>
The Elasticsearch index mapping definitions declared by this app's currently active branch, used to build or validate the app's search indexes.
getInstanceId()
Returns: String
This app's unique instance id within its account, which it is registered and looked up under, and which is also the name of its underlying app repository.
getTableActionHandlers()
Returns: List<TableActionHandler>
The row-action handlers this app registers for query tables, resolved from its currently active branch.
getCurrentBranch()
Returns: Branch
The branch of this app's repository that is currently active for the current root folder, taking into account any version pinned in the site's or organisation's app settings.
call(String execFn, Object args)
Returns: Object
Calls a JavaScript function defined in this app's currently active controller mappings, yielding to the platform's cooperative scheduler before and after the call.
| Parameter | Description |
|---|---|
execFn | the name of the function to call |
args | parameters to pass to the function, if any |
getRoles()
Returns: List<Role>
The roles this app grants, declared in its currently active branch.
getAvailableVersions()
Returns: List<String>
The version names available for this app, taken from its non-hidden repository branches plus the currently published version if it is not already among them, sorted alphabetically.
getAppSettings()
Returns: Map<String,String>
This app's configured settings for the current root folder, as a map of setting name to string value.
getSetting(String name)
Returns: String
The value of one of this app's settings, looked up from its currently configured settings for the current root folder.
| Parameter | Description |
|---|---|
name | the name of the setting to look up |
getSetting(CommonResource page, String name)
Returns: String
The value of one of this app's settings, looked up from its currently configured settings for the website that the given resource belongs to.
| Parameter | Description |
|---|---|
page | a resource within the website whose settings should be checked |
name | the name of the setting to look up |
getTheme()
Returns: Theme
This app's theme, if it is a theme provider.
getCurrentPublishedItem()
Returns: MarketPlacePublishedItem
The current published marketplace item for this app, looked up from its repository name.
getCurrentPublishedVersion()
Returns: String
The version name of this app's current published marketplace item.
isAppProvider()
Returns: boolean
Whether this app's repository is flagged as providing installable apps, rather than being a library or theme.
isThemeProvider()
Returns: boolean
Whether this app's repository is flagged as providing a website theme.
isLib()
Returns: boolean
Whether this app is a plain library, meaning it is neither an app provider nor a theme provider.
getMetricTypes()
Returns: List<MetricType>
The reporting metric types this app contributes, declared in its currently active branch.
getControllerMappings()
Returns: ControllerMappingList
The parsed controllers.xml mappings for this app's currently active branch, cached where possible. This is the compiled definition of every route, menu, portlet, role and other declared behaviour for the app.
getRepositoryAppManager()
Returns: RepositoryAppManager
The manager responsible for creating and caching instances of this app.
isCaptchaEnabled()
Returns: boolean
Whether this app is configured as a captcha provider, meaning its currently active branch declares a captcha verification function.
isManualEnable()
Returns: boolean
Whether this app must be manually enabled rather than being auto-enabled. Repository apps always require manual enabling.
getPaymentForm()
Returns: String
Renders this app's checkout payment form template for a non-member purchaser, using its declared payment provider details.
getMemberPaymentForm()
Returns: String
Renders this app's checkout payment form template for a signed-in member purchaser, using its declared payment provider details.
getPaymentOptions()
Returns: List<PaymentOptionBean>
The payment options this app offers when it is configured as a payment provider, taken from its declared payment provider details.
isPaymentEnabled()
Returns: boolean
Whether this app is configured as a payment provider, meaning its currently active branch declares payment provider details with a process function.
isSmsEnabled()
Returns: boolean
Whether this app is configured as an SMS provider, meaning its currently active branch declares SMS provider details with a send function.
getName()
Returns: String
This app's name, which is the same value as its instance id.
isEmailSendingSupported()
Returns: boolean
Whether this app is configured as an email sending provider, meaning its currently active branch declares email sender details with a send function.
getAuthenticationHandlers()
Returns: List<JsAuthenticationHandler>
The custom authentication handlers this app contributes, declared in its currently active branch, each wrapping a JavaScript authentication handler mapping.
getPromotionTypes()
Returns: List<PromotionMechanicType>
The promotion mechanic types this app contributes, declared in its currently active branch.
getPointsRuleTypes()
Returns: List<PointsRuleType>
The rewards points rule types this app contributes, declared in its currently active branch.
getPointsExpiryRuleTypes()
Returns: List<PointsExpiryRuleType>
The rewards points expiry rule types this app contributes, declared in its currently active branch.