Interface VirtualHosts

    • Method Detail

      • isHstFilterExcludedPath

        boolean isHstFilterExcludedPath​(String pathInfo)
        Some paths should not be handled by the hst framework request processing, eg /ping/ When a path must be excluded, this method return true.
        Parameters:
        pathInfo -
        Returns:
        true when the path must be excluded for matching to a host.
      • isContextPathInUrl

        boolean isContextPathInUrl()
        This is the global setting for every VirtualHost / Mount whether contextPath should be in the URL or not
        Returns:
        true when the created url should have the contextPath in it
      • getContextPath

        String getContextPath()
        Returns:
        the context path of the webapp for this hst configuration and never null
      • isPortInUrl

        boolean isPortInUrl()
        This is the global setting for every VirtualHost / Mount whether the port number should be in the URL or not
        Returns:
        true when the created url should have the port number in it
      • getLocale

        String getLocale()
        Returns:
        the locale of this VirtualHosts object or null if no locale is configured
      • getMountByGroupAliasAndType

        Mount getMountByGroupAliasAndType​(String hostGroupName,
                                          String alias,
                                          String type)
        Returns the Mount for this hostGroupName, alias and type having Mount.getType() equal to type. Returns null when no match
        Parameters:
        hostGroupName -
        alias - the alias the mount must have
        type - the type (for example preview, live, composer) the siteMount must have.
        Returns:
        the Mount for this hostGroupName, alias and type having Mount.getType() equal to type. Returns null when no match
      • getMountsByHostGroup

        List<Mount> getMountsByHostGroup​(String hostGroupName)
        Parameters:
        hostGroupName -
        Returns:
        the List<{@link Mount}> belonging to hostGroupName or null when there are no Mount for hostGroupName
      • getHostGroupNames

        List<String> getHostGroupNames()
        Returns:
        return the list of all hostGroupNames
      • getMountByIdentifier

        Mount getMountByIdentifier​(String uuid)
        Parameters:
        uuid -
      • getCmsPreviewPrefix

        String getCmsPreviewPrefix()

        The cmsPreviewPrefix will never start or end with a slash and will never be null

        Returns:
        the configured cmsPreviewPrefix with leading and trailing slashes removed. It will never be null. If configured to be empty, it will be ""

        Note that the cms preview prefix MUST be the same for every hst site webapp AND hst platform webapp

      • getChannelManagerSitesName

        String getChannelManagerSitesName()
        Returns:
        the node name of the hst:sites that will be managed by the ChannelManager. If not configured it returns hst:sites
      • isDiagnosticsEnabled

        boolean isDiagnosticsEnabled​(String ip)
        Returns:
        true when diagnostics about request processing is enabled for the client IP address. If ip is null, then the ip address of the request won't be taken into account to determine whether or not the diagnostics is enabled.
      • getDiagnosticsDepth

        int getDiagnosticsDepth()
        If isDiagnosticsEnabled(String) returns true, only until getDiagnosticsDepth() the call hierarchy timings will be logged. Default value returned is -1 meaning no limit
        Returns:
        the depth until where to log and -1 if not limit
      • getDiagnosticsThresholdMillis

        long getDiagnosticsThresholdMillis()
        If isDiagnosticsEnabled(String) returns true, only log if the Task took longer than or equal to getDiagnosticsThresholdMillis(). Default threshold of -1 meaning no threshold
        Returns:
        the threshold value configured and -1 if not configured meaning no threshold.
      • getDiagnosticsUnitThresholdMillis

        long getDiagnosticsUnitThresholdMillis()
        Returns:
        the threshold value for a task to get logged separately. If not configured -1 is returned meaning no threshold for subtask diagnostics
      • getDefaultResourceBundleIds

        String[] getDefaultResourceBundleIds()
        Returns:
        default resource bundle IDs for all sites to use, for example { "org.example.resources.MyResources" }, or empty array when not configured
      • isChannelMngrSiteAuthenticationSkipped

        boolean isChannelMngrSiteAuthenticationSkipped()
        Returns:
        true when the channel manager can skip authentication required for mounts or sitemapitems.
      • getChannels

        Map<String,​Channel> getChannels​(String hostGroup)
        Parameters:
        hostGroup - the name of the host group to get the channels for
        Returns:
        all managed channels for the hostGroup. Empty List in case the hostGroup does not exist or has no channel. The keys in the map are the Channel.getId()'s. Note that in case there are branches of the hst configuration, also the channels for these branches are returned
      • getChannels

        Map<String,​Map<String,​Channel>> getChannels()
        Returns:
        The map of all hostGroup names to the map of all the channels for that hostgroup. Note that in case there are branches of the hst configuration, also the channels for these branches are returned
      • getChannelByJcrPath

        Channel getChannelByJcrPath​(String hostGroup,
                                    String channelPath)
        Parameters:
        hostGroup - the name of the host group to get channel for
        Returns:
        the channel configured at the given channelPath and null if no such channel exists
        Throws:
        IllegalArgumentException - in case of invalid channelPath
      • getChannelById

        Channel getChannelById​(String hostGroup,
                               String id)
        For hostGroup get a Channel given its id
        Parameters:
        hostGroup - the name of the host group to get channel for
        id - - Channel id
        Returns:
        Channel which has this id or null
      • getBlueprints

        List<Blueprint> getBlueprints()
        The list of available blueprints
      • getBlueprint

        Blueprint getBlueprint​(String id)
        Retrieve a blue print from it's ID.
        Parameters:
        id -
      • getResourceBundle

        ResourceBundle getResourceBundle​(Channel channel,
                                         Locale locale)
        The resource bundle for the channel info. It contains the display names for fields and values.
        Returns:
        The ResourceBundle or null if the resource bundle could not be found