Skip navigation links
org.hippoecm.hst.configuration.hosting

Interface Mount

    • Method Detail

      • getName

        String getName()
        Returns:
        The name of this Mount item
      • getAlias

        String getAlias()
        Returns the alias of this Mount item. The alias of a Mount must be unique in combination with every type getTypes() within a single host group, also see (VirtualHost.getHostGroupName()). When there is no alias defined on the Mount, null is returned. The Mount can then not be used to lookup by alias
        Returns:
        The alias of this Mount item or null when it does not have one
      • isMapped

        boolean isMapped()
        When this Mount is not using a HstSiteMap for the request processing, this method returns false. When it returns false, then getNamedPipeline() should also be configured, and a pipeline should be invoked that is independent of the ResolvedSiteMapItem as their won't be one.
      • getParent

        Mount getParent()
        Returns:
        the parent Mount of this Mount and null if we are at the root Mount
      • getMountPoint

        String getMountPoint()

        Returns the mount point for this Mount object. The mount point can be the absolute jcr path to the root site node, for example something like '/hst:hst/hst:sites/mysite', but it can also be some jcr path to some virtual or canonical node in the repository. For example it can be '/content/gallery' , which might be the case for a Mount suited for REST gallery calls.

        Returns:
        the mountPoint for this Mount and null if there is no mountPoint configured (nor inherited)
        See Also:
        ResolvedMount.getResolvedMountPath()
      • getContentPath

        String getContentPath()

        Returns the content path for this Mount object. The content path is the absolute jcr path to the root site node content, for example something like '/content/documents/myproject'. The content path can be the same as getMountPoint(), but this is in general only for Mount's that have isMapped() returning false. When the Mount does have isMapped() equal to true, this method can return a different path than getMountPoint().

        Returns:
        the content path for this Mount. It will be null in case getMountPoint() returns null
      • getMountPath

        String getMountPath()

        Returns the mount path for this Mount object. The root Mount (mount with no parent mount) has an empty String ("") as mount path. A mountPath for a Mount that is not a root Mount is its own getName() plus all ancestors until the root and always starts with a "/" (except for the root, this one is empty). It can contain wildcards, for example /preview/*. Typically, these wildcards are replaced by their request specific values in the ResolvedMount.

        Note the difference with getMountPoint(): the getMountPoint() returns the jcr location of the (sub)site or of the content

        Returns:
        the mountPath for this Mount
        See Also:
        ResolvedMount.getResolvedMountPath()
      • getChildMounts

        List<Mount> getChildMounts()
        Returns:
        the unmodifiable List of all child Mounts and an empty List if there are no child Mounts
      • getChildMount

        Mount getChildMount(String name)
        Parameters:
        name - of the child Mount
        Returns:
        a Mount with getName() equal to name or null when there is no such item
      • getVirtualHost

        VirtualHost getVirtualHost()
        Returns:
        the virtualHost where this Mount belongs to
      • getHstSite

        HstSite getHstSite()
        Returns:
        the HstSite this Mount is pointing to or null when none found
      • isContextPathInUrl

        boolean isContextPathInUrl()
        Returns:
        true when the created url should have the contextpath in it
      • isPortInUrl

        boolean isPortInUrl()
        Returns:
        true when the created url should have contain the port number
      • isSite

        @Deprecated
        boolean isSite()
        Deprecated. Since 4.0.0 (CMS 11.0.0)
      • getPort

        int getPort()
        Returns:
        the portnumber for this Mount
      • getContextPath

        String getContextPath()

        Returns the contextpath (webapp) for this Mount. A request can only be matched to this Mount if the request its HttpServletRequest.getContextPath() is equal to this contextpath, or when the Mount returns null for this contextpath: Namely null means the Mount is contextpath (webapp) agnostic and can be matched regardless the HttpServletRequest.getContextPath()

        Returns:
        the contextpath (webapp) for this Mount. The contextpath for the ROOT application must be an empty String. If non-empty, a path starting with a "/" character but that does not end with a "/" character must be returned. If null is returned, the Mount is contextpath (webapp) agnostic and can be matched regardless the HttpServletRequest.getContextPath()
      • getHomePage

        String getHomePage()
        Returns:
        the homepage for this Mount or null when not present
      • getPageNotFound

        String getPageNotFound()
        Returns:
        the pagenotfound for this Mount or null when not present
      • getScheme

        String getScheme()
        Returns:
        the scheme to use for creating external urls, for example http / https
      • isSchemeAgnostic

        boolean isSchemeAgnostic()
        If a Mount is scheme agnostic, the request gets served regardless whether it is http or https (assuming HstSiteMapItem does not override the value)
        Returns:
        true when this Mount is scheme agnostic
      • containsMultipleSchemes

        boolean containsMultipleSchemes()
        When this Mount has a HstSite attached to it that contains a HstSiteMap with HstSiteMapItem's that have multiple schemes (http/https) or that have a different scheme than the getScheme().
        Returns:
        true when this Mount can contain links with different schemes
      • getSchemeNotMatchingResponseCode

        int getSchemeNotMatchingResponseCode()

        the response code the HST sets when HttpServletRequest scheme does not match getScheme(). Default response code is HttpServletResponse.SC_MOVED_PERMANENTLY. The following response codes are supported and result in:

        1. 200 : no behavior, ignored
        2. 301 : when request has different scheme than getScheme(), permanent redirect to the correct scheme is done
        3. 302 | 303 | 307 : when request has different scheme than getScheme(), temporal redirect to the correct scheme is done
        4. 403 : when request has different scheme than getScheme(), a page forbidden is returned
        5. 404 : when request has different scheme than getScheme(), a page not found is returned

        Any other response code than above will result in inheriting the response code from parent Mount or VirtualHost

      • isPreview

        boolean isPreview()
        This method returns the same as isOfType(String type) with type="preview"
        Returns:
        true when this Mount is configured to be a preview Mount.
      • isOfType

        boolean isOfType(String type)
        When a this Mount is of type type this returns true. A Mount can be of multiple types at once.
        Parameters:
        type - the type to test
        Returns:
        true when this Mount is of type type
      • getType

        String getType()
        Returns:
        the primary type of this Mount
      • getTypes

        List<String> getTypes()
        Returns:
        the list of all types this Mount belongs to, including the primary type getType(). The primary type is the first item in the List
      • isVersionInPreviewHeader

        boolean isVersionInPreviewHeader()
        When this Mount has isPreview() return false, this method always returns false. When the Mount is preview, and the Mount is configured to have the hst version number in preview, then this method returns true
        Returns:
        true when for this Mount the current hst version should be added as a response header
      • getNamedPipeline

        String getNamedPipeline()
        Note that if an ancestor Mount contains a namedPipeline, this value is inherited unless this Mount explicitly defines its own
        Returns:
        the named pipeline to be used for this Mount or null when the default pipeline is to be used
      • getLocale

        String getLocale()
        the locale for this Mount or null when it does not contain one. Note that if an ancestor Mount contains a locale, this value is inherited unless this Mount explicitly defines its own. The root Mount inherits the value from the VirtualHost if the virtual host contains a locale
        Returns:
        the locale for this Mount or null when it does not contain one.
      • getHstSiteMapMatcher

        HstSiteMapMatcher getHstSiteMapMatcher()
        This is a shortcut method fetching the HstSiteMapMatcher from the backing HstManager
        Returns:
        the HstSiteMapMatcher implementation
      • isAuthenticated

        boolean isAuthenticated()
        If this method returns true, then only if the user is explicitly allowed or servletRequest.isUserInRole(role) returns true this Mount is accessible for the request. If a Mount does not have a configuration for authenticated, the value from the parent item is taken.
        Returns:
        true if the Mount is authenticated.
      • getRoles

        Set<String> getRoles()
        Returns the roles that are allowed to access this Mount when isAuthenticated() is true. If the Mount does not have any roles defined by itself, it inherits them from the parent. If it defines roles, the roles from any ancestor are ignored. An empty set of roles in combination with isAuthenticated() return true means nobody has access to the item
        Returns:
        The set of roles that are allowed to access this Mount. When no roles defined, the roles from the parent item are inherited. If none of the parent items have a role defined, an empty set is returned
      • getUsers

        Set<String> getUsers()
        Returns the users that are allowed to access this Mount when isAuthenticated() is true. If the Mount does not have any users defined by itself, it inherits them from the parent. If it defines users, the users from any ancestor are ignored. An empty set of users in combination with isAuthenticated() return true means nobody has access to the item
        Returns:
        The set of users that are allowed to access this Mount. When no users defined, the users from the parent item are inherited. If none of the parent items have a user defined, an empty set is returned
      • isSubjectBasedSession

        boolean isSubjectBasedSession()
        Returns:
        Returns true if subject based jcr session should be used for this Mount
      • isSessionStateful

        boolean isSessionStateful()
        Returns:
        Returns true if subject based jcr session should be statefully managed.
      • getFormLoginPage

        String getFormLoginPage()
        Returns FORM Login Page
        Returns:
        the FORM Login Page and null if not configured
      • getProperty

        String getProperty(String name)
        the string value of the property or null when the property is not present. When the property value is not of type String, we'll return the Object.toString() value
        Parameters:
        name - the name of the property
        Returns:
        the value of the property or null when the property is not present
      • getPropertyNames

        List<String> getPropertyNames()
        Returns the unmodifiable List of all properties names and EMPTY list if no properties available. Through getProperty(String) the value of a property can be retrieved.
        Returns:
        the unmodifiable List of all properties names and EMPTY list if no properties available
      • getMountProperties

        Map<String,String> getMountProperties()

        Returns all the properties that start with "hst:mount" and have value of type String. This map has as key the propertyname after "hst:mount".

        Note The property called hst:mountpoint is excluded from this map, as it has a complete different purpose

        Returns:
        all the mount properties and an empty map if there where no mount properties
      • getParameter

        String getParameter(String name)
        The String value of the mount parameter.
        Parameters:
        name - the parameter name
        Returns:
        the parameter value, null if not present
      • getParameters

        Map<String,String> getParameters()
        Returns an unmodifiable map of all mount parameters, empty map if none.
        Returns:
        map of all mount parameters
      • getIdentifier

        String getIdentifier()
        Returns:
        the identifier of this Mount
      • getChannelPath

        String getChannelPath()
        Returns:
        the repository path to the channel configuration node and null if not configured
      • getChannelInfo

        <T extends ChannelInfo> T getChannelInfo()
        Type Parameters:
        T - Type of the channel info. Only checked at runtime on assignment.
        Returns:
        A channel properties instance or null in case getChannel() returns null or when the ChannelInfo interface cannot be loaded by the current classLoader
      • getChannel

        Channel getChannel()
        Returns:
        The Channel object instance to which this Mount belongs, or null if this Mount does not contain a Channel or if this Mount belongs to a different webapp (contextPath) than the current webapp (contextPath)
      • getDefaultSiteMapItemHandlerIds

        String[] getDefaultSiteMapItemHandlerIds()
        Returns:
        the String[] of defaultSiteMapItemHandlerIds which all HstSiteMapItem's get or null if non configured
      • isCacheable

        boolean isCacheable()
        Returns:
        true if rendering / resource requests can have their entire page http responses cached.
      • getDefaultResourceBundleId

        @Deprecated
        String getDefaultResourceBundleId()
        Deprecated. since 2.28.00. Use getDefaultResourceBundleIds() instead
        Returns:
        the first item of default resource bundle IDs or null if not configured or empty.
      • getDefaultResourceBundleIds

        String[] getDefaultResourceBundleIds()
        Returns:
        default resource bundle IDs for all sites below this mount to use, for example, { "org.example.resources.MyResources" }. Returns an empty array when not configured on this Mount and empty from ancestor Mount or when root host from VirtualHost.getDefaultResourceBundleIds()
      • getCmsLocation

        @Deprecated
        String getCmsLocation()
        Deprecated. since 7.9.1 : Use getCmsLocations() instead
        Returns:
        the cms location (fully qualified URL) or null if not configured
      • getCmsLocations

        List<String> getCmsLocations()
        Returns:
        the cms location(s) (fully qualified URL) or empty list if not configured

Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.