Registry of named platform services, exposed to templates and scripts as the "services" variable and reachable from Java code via the root context. Wraps a fixed map of built-in managers registered by ApplicationManager.registerService, and falls through to service objects and implementations contributed by installed apps for names it does not itself hold. Also drives the startup and shutdown of any registered service that implements StartableService.

Group: Managers

Implements: Map


Properties

PropertyReturnsDescription
emptybooleanWhether the fixed map of built-in services is empty. Does not take app-contributed js services or js implementations into account.

Methods

flush()

Returns: void

Clears the current request's cached list of active apps, so the next lookup of app-contributed services (js services and js implementations) is recomputed rather than reused from the request-scoped cache.

get(Object key)

Returns: Object

Looks up a named service by key. Checks the fixed map of built-in services first, then the active apps' js services, then their js implementations, returning the first match. Js implementations are returned as a list rather than a single object, since more than one app can contribute an implementation of the same name. Returns null if no service is registered under the given key.

ParameterDescription
keythe service name to look up

containsKey(Object key)

Returns: boolean

Checks whether a service is registered under the given key, checking the fixed map of built-in services and then the active apps' js services and js implementations.

ParameterDescription
keythe service name to check

isEmpty()

Returns: boolean

Whether the fixed map of built-in services is empty. Does not take app-contributed js services or js implementations into account.

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