org.hippoecm.hst.site.request
Class ResolvedMountImpl

java.lang.Object
  extended by org.hippoecm.hst.site.request.ResolvedMountImpl
All Implemented Interfaces:
MutableResolvedMount, ResolvedMount

public class ResolvedMountImpl
extends Object
implements MutableResolvedMount


Constructor Summary
ResolvedMountImpl(Mount mount, ResolvedVirtualHost resolvedVirtualHost, String resolvedMountPath, String matchingIgnoredPrefix)
           
 
Method Summary
 String getFormLoginPage()
          Returns FORM Login Page
 String getMatchingIgnoredPrefix()
          Expert: In most circumstance, this ResolvedMount.getMatchingIgnoredPrefix() will return null.
 Mount getMount()
           
 String getNamedPipeline()
           
 String getResolvedMountPath()
          Returns the mountPath from the backing Mount where possible wildcard values might have been replaced.
 ResolvedVirtualHost getResolvedVirtualHost()
           
 Set<String> getRoles()
          Returns the roles that are allowed to access this Mount when ResolvedMount.isAuthenticated() is true.
 Set<String> getUsers()
          Returns the users that are allowed to access this Mount when ResolvedMount.isAuthenticated() is true.
 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.
 boolean isSessionStateful()
          Returns true if subject based jcr session should be statefully managed.
 boolean isSubjectBasedSession()
          Returns true if subject based jcr session should be used for this Mount
 ResolvedSiteMapItem matchSiteMapItem(String siteMapPathInfo)
          matches a pathInfo to a ResolvedSiteMapItem item or throws a MatchException or NotFoundException when cannot resolve to a sitemap item
 void setMount(Mount mount)
          Sets the backing Mount behind the ResolvedMount to the new mount.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResolvedMountImpl

public ResolvedMountImpl(Mount mount,
                         ResolvedVirtualHost resolvedVirtualHost,
                         String resolvedMountPath,
                         String matchingIgnoredPrefix)
Method Detail

getMount

public Mount getMount()
Specified by:
getMount in interface ResolvedMount
Returns:
the backing request independent Mount item for this ResolvedMount instance

setMount

public void setMount(Mount mount)
Description copied from interface: MutableResolvedMount
Sets the backing Mount behind the ResolvedMount to the new mount. This is useful to for example decorate a Mount: For example, to decorate a Mount representing a live environment in such a way that it shows the preview.

Specified by:
setMount in interface MutableResolvedMount

getResolvedVirtualHost

public ResolvedVirtualHost getResolvedVirtualHost()
Specified by:
getResolvedVirtualHost in interface ResolvedMount
Returns:
the ResolvedVirtualHost for this ResolvedMount

getResolvedMountPath

public String getResolvedMountPath()
Description copied from interface: ResolvedMount
Returns the mountPath from the backing Mount where possible wildcard values might have been replaced. A root Mount returns an empty String (""). When the mountPath is non-empty, it always starts with a "/".

Specified by:
getResolvedMountPath in interface ResolvedMount
Returns:
the resolved mountPath for this ResolvedMount
See Also:
Mount.getMountPath()

getMatchingIgnoredPrefix

public String getMatchingIgnoredPrefix()
Description copied from interface: ResolvedMount
Expert: In most circumstance, this ResolvedMount.getMatchingIgnoredPrefix() will return null. Only when there was a pathInfo prefix after the HttpServletRequest.getContextPath() that should be ignored during matching the request to a ResolvedMount, this method returns the ignored prefix. The returned String must have leading and trailing slashes all removed.

Specified by:
getMatchingIgnoredPrefix in interface ResolvedMount
Returns:
the prefix that was ignore during matching and null if there wasn't a ignored prefix

getNamedPipeline

public String getNamedPipeline()
Specified by:
getNamedPipeline in interface ResolvedMount
Returns:
the named pipeline to be used for this Mount or null when the default pipeline is to be used

matchSiteMapItem

public ResolvedSiteMapItem matchSiteMapItem(String siteMapPathInfo)
                                     throws MatchException
Description copied from interface: ResolvedMount
matches a pathInfo to a ResolvedSiteMapItem item or throws a MatchException or NotFoundException when cannot resolve to a sitemap item

Specified by:
matchSiteMapItem in interface ResolvedMount
Returns:
the ResolvedSiteMapItem for the current hstContainerURL
Throws:
MatchException

isAuthenticated

public boolean isAuthenticated()
Description copied from interface: ResolvedMount
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.

Specified by:
isAuthenticated in interface ResolvedMount
Returns:
true if the Mount is authenticated.

getRoles

public Set<String> getRoles()
Description copied from interface: ResolvedMount
Returns the roles that are allowed to access this Mount when ResolvedMount.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 ResolvedMount.isAuthenticated() return true means nobody has access to the item

Specified by:
getRoles in interface ResolvedMount
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

public Set<String> getUsers()
Description copied from interface: ResolvedMount
Returns the users that are allowed to access this Mount when ResolvedMount.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 ResolvedMount.isAuthenticated() return true means nobody has access to the item

Specified by:
getUsers in interface ResolvedMount
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

public boolean isSubjectBasedSession()
Description copied from interface: ResolvedMount
Returns true if subject based jcr session should be used for this Mount

Specified by:
isSubjectBasedSession in interface ResolvedMount
Returns:

isSessionStateful

public boolean isSessionStateful()
Description copied from interface: ResolvedMount
Returns true if subject based jcr session should be statefully managed.

Specified by:
isSessionStateful in interface ResolvedMount
Returns:

getFormLoginPage

public String getFormLoginPage()
Description copied from interface: ResolvedMount
Returns FORM Login Page

Specified by:
getFormLoginPage in interface ResolvedMount
Returns:
true if the Mount is authenticated.


Copyright © 2008-2012 Hippo. All Rights Reserved.