@ProviderType public interface ContextHub
Modifier and Type | Interface and Description |
---|---|
static class |
ContextHub.ModeStatus
Defines possible states based on which modes can be filtered.
|
static class |
ContextHub.ModuleStatus
Defines possible states based on which modules can be filtered.
|
static class |
ContextHub.StoreStatus
Defines possible states based on which stores can be filtered.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Module> |
filterModules(Resource contextHub,
java.util.EnumSet<ContextHub.ModuleStatus> flags)
Returns all modules matching to requested filter.
|
java.util.List<Store> |
filterStores(Resource contextHub,
java.util.EnumSet<ContextHub.StoreStatus> flags)
Returns all stores matching to requested filter.
|
java.util.List<Mode> |
findModes(Resource contextHub)
Given a ContextHub configuration resource, return the corresponding
Mode s as list |
java.util.List<Module> |
findModules(Resource contextHub)
Given a ContextHub configuration resource, return the corresponding
Module s as list |
java.util.List<Store> |
findStores(Resource contextHub)
Given a ContextHub configuration resource, return the corresponding
Store s as list |
java.lang.String |
getAnonymousPath()
Returns home path of anonymous user.
|
java.util.List<Mode> |
getDisabledModes(Resource contextHub)
Returns all hidden ContextHub modes.
|
java.util.List<Module> |
getDisabledModules(Resource contextHub)
Returns all hidden ContextHub modules.
|
java.util.List<Store> |
getDisabledStores(Resource contextHub)
Returns all disabled ContextHub's stores.
|
java.util.List<Mode> |
getEnabledModes(Resource contextHub)
Returns all visible ContextHub modes.
|
java.util.List<Module> |
getEnabledModules(Resource contextHub)
Returns all visible ContextHub modules.
|
java.util.List<Store> |
getEnabledStores(Resource contextHub)
Returns all enabled ContextHub's stores.
|
java.util.List<java.lang.String> |
getKernelCategories(SlingHttpServletRequest request)
Returns a list of kernel client library categories (including javascript part of ui libraries if includeUI is
set to
true ). |
java.lang.String |
getKernelCode(SlingHttpServletRequest request,
SlingHttpServletResponse response)
Returns generated output of kernel.js.
|
java.lang.String |
getKernelCodeURL(SlingHttpServletRequest request)
Returns URL to ContextHub's kernel.js
|
java.lang.String |
getPath(SlingHttpServletRequest request)
Returns Path to ContextHub
|
java.lang.String |
getPath(SlingHttpServletRequest request,
boolean checkRequestResource)
Returns Path to ContextHub
|
java.util.Set<java.lang.String> |
getRunModes()
Returns instance's run modes.
|
java.lang.String |
getStyles(SlingHttpServletRequest request)
Returns generated output of styles.css.
|
java.util.List<java.lang.String> |
getStylesCategories(SlingHttpServletRequest request)
Returns a list of ui (type: css) client library categories.
|
java.lang.String |
getStylesURL(SlingHttpServletRequest request)
Returns URL to ContextHub's styles.css (containing ui source code)
|
java.lang.String |
getTheme(Resource contextHub)
Returns ContextHub's UI theme name.
|
java.util.List<java.lang.String> |
getUICategories(SlingHttpServletRequest request)
Returns a list of ui (type: js) client library categories.
|
java.lang.String |
getUICode(SlingHttpServletRequest request,
SlingHttpServletResponse response)
Returns generated output of ui.js.
|
java.lang.String |
getUICodeURL(SlingHttpServletRequest request)
Returns the URL to ContextHub's ui.js
|
java.lang.String |
getUIPageURL(SlingHttpServletRequest request)
Returns URL to ContextHub's UI page (which is "static", only the code is "dynamic")
|
boolean |
isConfigured(Resource contextHub)
Determines if ContextHub's instance is ready to use (it's
false when ContextHub's resource wasn't found). |
boolean |
isConfigured(SlingHttpServletRequest request)
Determines if ContextHub is configured for this request.
|
boolean |
isDebug(SlingHttpServletRequest request)
Returns whether debug is enabled for a given ContextHub instance.
|
boolean |
isDisabled(SlingHttpServletRequest request)
Returns whether a given ContextHub instance is disabled.
|
boolean |
isSilentMode()
Returns whether ContextHub should run in silent mode (takes priority over debug mode).
|
boolean |
showUi()
Returns whether to include the ContextHub UI or not.
|
java.lang.String getPath(SlingHttpServletRequest request)
request
- requestjava.lang.String getPath(SlingHttpServletRequest request, boolean checkRequestResource)
request
- requestcheckRequestResource
- indicates whether request resource should be used to resolve ContextHub pathjava.util.Set<java.lang.String> getRunModes()
java.util.List<Store> findStores(Resource contextHub)
Store
s as listcontextHub
- the ContextHub configuration resourcejava.util.List<Module> findModules(Resource contextHub)
Module
s as listcontextHub
- the ContextHub configuration resourcejava.util.List<Mode> findModes(Resource contextHub)
Mode
s as listcontextHub
- the ContextHub configuration resourcejava.util.List<Store> filterStores(Resource contextHub, java.util.EnumSet<ContextHub.StoreStatus> flags)
contextHub
- the ContextHub configuration resourceflags
- filter (EnumSet
containing desired status of the store)java.util.List<Module> filterModules(Resource contextHub, java.util.EnumSet<ContextHub.ModuleStatus> flags)
contextHub
- the ContextHub configuration resourceflags
- filter (EnumSet
containing desired status of the store)java.util.List<Store> getEnabledStores(Resource contextHub)
contextHub
- the ContextHub configuration resourcejava.util.List<Module> getEnabledModules(Resource contextHub)
contextHub
- the ContextHub configuration resourcejava.util.List<Mode> getEnabledModes(Resource contextHub)
contextHub
- the ContextHub configuration resourcejava.util.List<Store> getDisabledStores(Resource contextHub)
contextHub
- the ContextHub configuration resourcejava.util.List<Module> getDisabledModules(Resource contextHub)
contextHub
- the ContextHub configuration resourcejava.util.List<Mode> getDisabledModes(Resource contextHub)
contextHub
- the ContextHub configuration resourcejava.lang.String getTheme(Resource contextHub)
contextHub
- the ContextHub configuration resourceboolean isConfigured(Resource contextHub)
false
when ContextHub's resource wasn't found).contextHub
- the ContextHub configuration resourcetrue
if ContextHub was properly initializedboolean isConfigured(SlingHttpServletRequest request)
request
- requesttrue
if ContextHub was properly initializedjava.lang.String getKernelCodeURL(SlingHttpServletRequest request)
request
- requestjava.lang.String getUICodeURL(SlingHttpServletRequest request)
request
- requestjava.lang.String getStylesURL(SlingHttpServletRequest request)
request
- requestjava.lang.String getUIPageURL(SlingHttpServletRequest request)
request
- requestjava.util.List<java.lang.String> getKernelCategories(SlingHttpServletRequest request)
true
).request
- requestjava.util.List<java.lang.String> getUICategories(SlingHttpServletRequest request)
request
- requestjava.util.List<java.lang.String> getStylesCategories(SlingHttpServletRequest request)
request
- requestjava.lang.String getKernelCode(SlingHttpServletRequest request, SlingHttpServletResponse response)
getKernelCategories(org.apache.sling.api.SlingHttpServletRequest)
and
minimized if not set to debug.request
- requestresponse
- responsejava.lang.String getUICode(SlingHttpServletRequest request, SlingHttpServletResponse response)
getUICategories(org.apache.sling.api.SlingHttpServletRequest)
and minimized if not set to debug.request
- requestresponse
- responsejava.lang.String getStyles(SlingHttpServletRequest request)
getUICategories(org.apache.sling.api.SlingHttpServletRequest)
and minimized if not set to debug.request
- requestboolean showUi()
true
if ContextHub UI is to be includedboolean isSilentMode()
true
if debug is enabledboolean isDebug(SlingHttpServletRequest request)
true
if debug is enabledboolean isDisabled(SlingHttpServletRequest request)
request
- - requesttrue
if a given ContextHub instance is disabled.java.lang.String getAnonymousPath()
Copyright © 2010 - 2020 Adobe. All Rights Reserved