@Component @Lazy public final class EntityQueryWebCmsDomainFunctions extends Object implements com.foreach.across.modules.entity.query.EntityQueryFunctionHandler
selectedDomain(), visibleDomains() and accessibleDomains() in EQL statements.
Uses the WebCmsMultiDomainAdminUiService for execution of the specific methods and will convert the result to valid EQL.WebCmsMultiDomainAdminUiService| Modifier and Type | Field and Description |
|---|---|
static String |
ACCESSIBLE_DOMAINS
Returns all domains that the current principal can see.
|
static String |
SELECTED_DOMAIN
Always returns the current domain, bound to the
WebCmsDomainContextHolder. |
static String |
VISIBLE_DOMAINS
Returns the domains from which entities are currently selectable.
|
| Constructor and Description |
|---|
EntityQueryWebCmsDomainFunctions() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(String functionName,
org.springframework.core.convert.TypeDescriptor desiredType) |
Object |
apply(String functionName,
com.foreach.across.modules.entity.query.EQType[] arguments,
org.springframework.core.convert.TypeDescriptor desiredType,
com.foreach.across.modules.entity.query.EQTypeConverter argumentConverter) |
static com.foreach.across.modules.entity.query.EntityQueryConditionTranslator |
conditionTranslator()
Create a condition translator that supports the domain-related functions and will expand single condition
(eg.
|
public static final String SELECTED_DOMAIN
WebCmsDomainContextHolder.
This method will return a single domain only or none.
domain = currentDomain() will be translated to either domain IS EMPTY
or domain = DOMAIN_IDpublic static final String VISIBLE_DOMAINS
domain = selectableDomains() might be translated to
domain = currentDomain() or domain = currentDomain() or domain IS EMPTY
depending on the multi-domain configuration.public static final String ACCESSIBLE_DOMAINS
AllowableAction that the principal should
have for that domain. Note that in case of multiple parameters, it is an OR construct: as soon as the user has
any of those actions allowed the domain will be included.
If no-domain is allowed, will check if the user has the permissions to manage no-domain.public static com.foreach.across.modules.entity.query.EntityQueryConditionTranslator conditionTranslator()
domain in accessibleDomains()) to multiple conditions (eg. (domain in (1,2,3) or domain IS EMPTY).public boolean accepts(String functionName, org.springframework.core.convert.TypeDescriptor desiredType)
accepts in interface com.foreach.across.modules.entity.query.EntityQueryFunctionHandlerpublic Object apply(String functionName, com.foreach.across.modules.entity.query.EQType[] arguments, org.springframework.core.convert.TypeDescriptor desiredType, com.foreach.across.modules.entity.query.EQTypeConverter argumentConverter)
apply in interface com.foreach.across.modules.entity.query.EntityQueryFunctionHandlerCopyright © 2020. All rights reserved.