Class UserPortalContentEntityHelper


  • public final class UserPortalContentEntityHelper
    extends Object
    Helper for operations related to tenant resources and templates for user portal content entities, such as name normalization and uniqueness checks.
    Since:
    8.6.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • normalizeTenantResourceName

        public static String normalizeTenantResourceName​(IEntityContext entityContext,
                                                         Mandant tenant,
                                                         String requestedName,
                                                         boolean createNewContentEntity,
                                                         UUID currentTenantResourceUuid)
        Returns a unique tenant resource name for the requested value.
        Parameters:
        entityContext - entity context used for lookups
        tenant - selected tenant
        requestedName - requested resource name
        createNewContentEntity - whether the selected content entity is currently created from scratch
        currentTenantResourceUuid - UUID of the currently edited tenant resource
        Returns:
        normalized unique resource name, or null when no valid input is available
      • normalizeTenantTemplateName

        public static String normalizeTenantTemplateName​(IEntityContext entityContext,
                                                         Mandant tenant,
                                                         String requestedName,
                                                         boolean createNewContentEntity,
                                                         UUID currentTenantTemplateUuid)
        Returns a unique tenant template name for the requested value.
        Parameters:
        entityContext - entity context used for lookups
        tenant - selected tenant
        requestedName - requested template name
        createNewContentEntity - whether the selected content entity is currently created from scratch
        currentTenantTemplateUuid - UUID of the currently edited tenant template
        Returns:
        normalized unique template name, or null when no valid input is available