Class UserPortalContentTenantStateHelper
- java.lang.Object
-
- de.xima.fc.gui.helper.user_portal.content.UserPortalContentTenantStateHelper
-
public final class UserPortalContentTenantStateHelper extends Object
Helper for resolving tenant-dependent content state and tenant caching for user portal content creation.- Since:
- 8.6.0
- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUserPortalContentTenantStateHelper.ResolvedTenantSnapshot of the resolved tenant and the cache keys that should be stored in the bean.static classUserPortalContentTenantStateHelper.TenantStateSnapshotImmutable snapshot of the tenant state used by the bean after loading tenant-dependent data.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UserPortalContentTenantStateHelper.ResolvedTenantresolveSelectedTenant(IEntityContext entityContext, UUID selectedTenantUuid, UUID loadedTenantUuid, Mandant loadedTenant, Mandant currentClient)Resolves the selected tenant entity while reusing the current cached tenant if possible.static UserPortalContentTenantStateHelper.TenantStateSnapshotresolveTenantState(UUID selectedTenantUuid, Map<UUID,UserPortalTenantContentLoader.TenantContentLoadResult> tenantContentLoadResultCache, Mandant currentClient, IUser user)Resolves the tenant-dependent content state for the currently selected tenant.static UserPortalContentTenantStateHelper.TenantStateSnapshotresolveTenantState(UUID selectedTenantUuid, Map<UUID,UserPortalTenantContentLoader.TenantContentLoadResult> tenantContentLoadResultCache, Mandant currentClient, IUser user, EUserPortalContentConfigType contentTypeToRefresh)Resolves the tenant-dependent content state for the currently selected tenant, with the option to refresh specific content types in the cache.
-
-
-
Method Detail
-
resolveTenantState
public static UserPortalContentTenantStateHelper.TenantStateSnapshot resolveTenantState(UUID selectedTenantUuid, Map<UUID,UserPortalTenantContentLoader.TenantContentLoadResult> tenantContentLoadResultCache, Mandant currentClient, IUser user)
Resolves the tenant-dependent content state for the currently selected tenant.- Parameters:
selectedTenantUuid- UUID of the selected tenanttenantContentLoadResultCache- cache for already loaded tenant content resultscurrentClient- current client from the view context, ornullwhen no client is fixeduser- current user used for permission checks- Returns:
- snapshot of the resolved tenant state, or an empty snapshot when the tenant could not be resolved
-
resolveTenantState
public static UserPortalContentTenantStateHelper.TenantStateSnapshot resolveTenantState(UUID selectedTenantUuid, Map<UUID,UserPortalTenantContentLoader.TenantContentLoadResult> tenantContentLoadResultCache, Mandant currentClient, IUser user, EUserPortalContentConfigType contentTypeToRefresh)
Resolves the tenant-dependent content state for the currently selected tenant, with the option to refresh specific content types in the cache.- Parameters:
selectedTenantUuid- UUID of the selected tenanttenantContentLoadResultCache- cache for already loaded tenant content resultscurrentClient- current client from the view context, ornullwhen no client is fixeduser- current user used for permission checkscontentTypeToRefresh- when specified, forces the refresh of the given content type in the cache; whennull, the cache is reused without refreshing- Returns:
- snapshot of the resolved tenant state, or an empty snapshot when the tenant could not be resolved
-
resolveSelectedTenant
public static UserPortalContentTenantStateHelper.ResolvedTenant resolveSelectedTenant(IEntityContext entityContext, UUID selectedTenantUuid, UUID loadedTenantUuid, Mandant loadedTenant, Mandant currentClient)
Resolves the selected tenant entity while reusing the current cached tenant if possible.- Parameters:
entityContext- entity context used for the lookupselectedTenantUuid- UUID of the selected tenantloadedTenantUuid- UUID of the currently cached tenantloadedTenant- currently cached tenantcurrentClient- current client from the view context, ornullwhen no client is fixed- Returns:
- resolved tenant snapshot
-
-