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

PropertyReturnsDescription
allEsMappingDetailsList<ESMappingsDetails>The Elasticsearch index mapping definitions declared by this app's currently active branch, used to build or validate the app's search indexes.
appProviderbooleanWhether this app's repository is flagged as providing installable apps, rather than being a library or theme.
appSettingsMap<String,String>This app's configured settings for the current root folder, as a map of setting name to string value.
authenticationHandlersList<JsAuthenticationHandler>The custom authentication handlers this app contributes, declared in its currently active branch, each wrapping a JavaScript authentication handler mapping.
availableVersionsList<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.
captchaEnabledbooleanWhether this app is configured as a captcha provider, meaning its currently active branch declares a captcha verification function.
controllerMappingsControllerMappingListThe 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.
currentBranchBranchThe 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.
currentPublishedItemMarketPlacePublishedItemThe current published marketplace item for this app, looked up from its repository name.
currentPublishedVersionStringThe version name of this app's current published marketplace item.
emailSendingSupportedbooleanWhether this app is configured as an email sending provider, meaning its currently active branch declares email sender details with a send function.
instanceIdStringThis 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.
libbooleanWhether this app is a plain library, meaning it is neither an app provider nor a theme provider.
manualEnablebooleanWhether this app must be manually enabled rather than being auto-enabled. Repository apps always require manual enabling.
memberPaymentFormStringRenders this app's checkout payment form template for a signed-in member purchaser, using its declared payment provider details.
metricTypesList<MetricType>The reporting metric types this app contributes, declared in its currently active branch.
nameStringThis app's name, which is the same value as its instance id.
paymentEnabledbooleanWhether this app is configured as a payment provider, meaning its currently active branch declares payment provider details with a process function.
paymentFormStringRenders this app's checkout payment form template for a non-member purchaser, using its declared payment provider details.
paymentOptionsList<PaymentOptionBean>The payment options this app offers when it is configured as a payment provider, taken from its declared payment provider details.
pointsExpiryRuleTypesList<PointsExpiryRuleType>The rewards points expiry rule types this app contributes, declared in its currently active branch.
pointsRuleTypesList<PointsRuleType>The rewards points rule types this app contributes, declared in its currently active branch.
promotionTypesList<PromotionMechanicType>The promotion mechanic types this app contributes, declared in its currently active branch.
recipeRecipeThe setup recipe declared for this app's currently active branch, used to drive guided or automated configuration of the app.
repositoryAppManagerRepositoryAppManagerThe manager responsible for creating and caching instances of this app.
rolesList<Role>The roles this app grants, declared in its currently active branch.
smsEnabledbooleanWhether this app is configured as an SMS provider, meaning its currently active branch declares SMS provider details with a send function.
tableActionHandlersList<TableActionHandler>The row-action handlers this app registers for query tables, resolved from its currently active branch.
themeThemeThis app's theme, if it is a theme provider.
themeProviderbooleanWhether 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.

ParameterDescription
paththe 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.

ParameterDescription
execFnthe name of the function to call
argsparameters 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.

ParameterDescription
namethe 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.

ParameterDescription
pagea resource within the website whose settings should be checked
namethe 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.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.