Class UrlHandlerConfig

  • All Implemented Interfaces:
    io.wcm.sling.commons.caservice.ContextAwareService

    @ConsumerType
    public abstract class UrlHandlerConfig
    extends Object
    implements io.wcm.sling.commons.caservice.ContextAwareService
    UrlHandlerConfig OSGi services provide application-specific configuration for URL handling. Applications can set service properties or bundle headers as defined in ContextAwareService to apply this configuration only for resources that match the relevant resource paths.
    • Constructor Detail

      • UrlHandlerConfig

        public UrlHandlerConfig()
    • Method Detail

      • getSiteRootLevel

        public abstract int getSiteRootLevel​(org.apache.sling.api.resource.Resource contextResource)
        Returns the absolute path level where the root page of the site is located.
        Parameters:
        contextResource - Context resource that is assumed to be inside the site context.
        Returns:
        Root level or -1 if it could not be detected
      • isSecure

        public boolean isSecure​(@NotNull
                                @NotNull com.day.cq.wcm.api.Page page)
        Detects if a page has to be accessed in secure mode
        Parameters:
        page - Page Page
        Returns:
        true if secure mode is required
      • isIntegrator

        public boolean isIntegrator​(@NotNull
                                    @NotNull com.day.cq.wcm.api.Page page)
        Detects if page is a integrator page and contains application redirect link information
        Parameters:
        page - Page
        Returns:
        true if Page is a integrator page
      • getDefaultUrlMode

        @NotNull
        public @NotNull UrlMode getDefaultUrlMode()
        Returns:
        Default URL mode that is used if no URL mode is specified
      • getIntegratorModes

        @NotNull
        public @NotNull Collection<IntegratorMode> getIntegratorModes()
        Returns:
        Supported integrator modes