|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hippoecm.hst.configuration.hosting.MountService
public class MountService
Field Summary |
---|
Fields inherited from interface org.hippoecm.hst.configuration.hosting.Mount |
---|
LIVE_NAME, PREVIEW_NAME, PROPERTY_NAME_MOUNT_PREFIX |
Constructor Summary | |
---|---|
MountService(HstNode mount,
Mount parent,
VirtualHost virtualHost,
HstManagerImpl hstManager,
int port)
|
Method Summary | ||
---|---|---|
void |
addMount(MutableMount mount)
|
|
String |
getAlias()
Returns the alias of this Mount item. |
|
String |
getCanonicalContentPath()
Returns the absolute canonical content path for the content of this Mount . |
|
|
getChannelInfo()
The channel properties for this mount. |
|
String |
getChannelPath()
|
|
Mount |
getChildMount(String name)
|
|
List<Mount> |
getChildMounts()
|
|
String |
getCmsLocation()
|
|
String |
getContentPath()
Returns the content path for this Mount object. |
|
String[] |
getDefaultSiteMapItemHandlerIds()
|
|
String |
getEmbeddedMountPath()
for embedded delegation of sites a mountpath needs to point to the delegated Mount . |
|
String |
getFormLoginPage()
Returns FORM Login Page |
|
String |
getHomePage()
|
|
HstSite |
getHstSite()
|
|
HstSiteMapMatcher |
getHstSiteMapMatcher()
This is a shortcut method fetching the HstSiteMapMatcher from the backing HstManager |
|
String |
getIdentifier()
|
|
String |
getLocale()
the locale for this Mount or null when it does not contain one. |
|
String |
getLockedBy()
Return null when the mount is not locked. |
|
Calendar |
getLockedOn()
Get the date on which the mount was locked. |
|
String |
getMountPath()
Returns the mount path for this Mount object. |
|
String |
getMountPoint()
Returns the mount point for this Mount object. |
|
Map<String,String> |
getMountProperties()
Returns all the properties that start with "hst:mount" and have value of type String . |
|
String |
getName()
|
|
String |
getNamedPipeline()
Note that if an ancestor Mount contains a namedPipeline, this value is inherited unless this Mount explicitly defines its own |
|
String |
getPageNotFound()
|
|
Mount |
getParent()
|
|
int |
getPort()
|
|
String |
getPreviewCanonicalContentPath()
internal only : not api |
|
String |
getPreviewContentPath()
internal only : not api |
|
HstSite |
getPreviewHstSite()
internal only : not api |
|
String |
getPreviewMountPoint()
internal only : not api |
|
String |
getProperty(String name)
the string value of the property or null when the property is not present. |
|
Set<String> |
getRoles()
Returns the roles that are allowed to access this Mount when Mount.isAuthenticated() is true. |
|
String |
getScheme()
|
|
String |
getType()
|
|
List<String> |
getTypes()
|
|
Set<String> |
getUsers()
Returns the users that are allowed to access this Mount when Mount.isAuthenticated() is true. |
|
VirtualHost |
getVirtualHost()
|
|
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 |
isContextPathInUrl()
|
|
boolean |
isMapped()
When this Mount is not using a HstSiteMap for the request processing, this method returns false . |
|
boolean |
isOfType(String type)
When a this Mount is of type type this returns true . |
|
boolean |
isPortInUrl()
|
|
boolean |
isPreview()
This method returns the same as Mount.isOfType(String type) with type="preview" |
|
boolean |
isSessionStateful()
Returns true if subject based jcr session should be statefully managed. |
|
boolean |
isSite()
When this method returns false , then HstLink will have the HstLink.PATH_SUBPATH_DELIMITER included even for empty or null HstLink.getSubPath() , if and only if
the VirtualHosts.isExcluded(String) for the path to create a link for returns true . |
|
boolean |
isSubjectBasedSession()
Returns true if subject based jcr session should be used for this Mount |
|
boolean |
isVersionInPreviewHeader()
When this Mount has Mount.isPreview() return false , this method always returns false. |
|
String |
onlyForContextPath()
In case the HttpServletRequest.getContextPath() does not matter, this method must return null or empty. |
|
void |
setChannelInfo(ChannelInfo channelInfo)
Set the channel info for the mount. |
|
void |
setLockedBy(String userId)
Set the mount's lock owner userId. |
|
void |
setLockedOn(Calendar lockedOn)
Set the date on which the mount was locked. |
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MountService(HstNode mount, Mount parent, VirtualHost virtualHost, HstManagerImpl hstManager, int port) throws ServiceException
ServiceException
Method Detail |
---|
public void addMount(MutableMount mount) throws IllegalArgumentException, ServiceException
addMount
in interface MutableMount
mount
- the MutableMount
to add
IllegalArgumentException
- if the mount
could not be added
ServiceException
- if the mount
could not be addedpublic List<Mount> getChildMounts()
getChildMounts
in interface Mount
List
of all child Mount
s and an empty List
if there are no child Mount
spublic Mount getChildMount(String name)
getChildMount
in interface Mount
name
- of the child Mount
Mount
with Mount.getName()
equal to name
or null
when there is no such itempublic HstSite getHstSite()
getHstSite
in interface Mount
HstSite
this Mount
is pointing to or null
when none foundpublic HstSite getPreviewHstSite()
ContextualizableMount
getPreviewHstSite
in interface ContextualizableMount
Mount.getHstSite()
public String getName()
getName
in interface Mount
Mount
itempublic String getIdentifier()
getIdentifier
in interface Mount
Mount
public String getAlias()
Mount
Mount
item. The alias of a Mount
must be unique in combination with every type Mount.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
getAlias
in interface Mount
Mount
item or null
when it does not have onepublic String getMountPath()
Mount
Returns the mount path for this Mount
object. The root Mount
has an empty String
("") as mount path. A mountPath for a
Mount
is its own Mount.getName()
plus all ancestors up to the root and always starts with a "/" (unless 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 Mount.getMountPoint()
: the Mount.getMountPoint()
returns the jcr location of the (sub)site or of the content
getMountPath
in interface Mount
Mount
ResolvedMount.getResolvedMountPath()
public String getContentPath()
Mount
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 '/hst:hst/hst:sites/mysite-live/hst:content'. The Mount.getContentPath()
can be the same as Mount.getMountPoint()
, but
this is in general only for Mount
's that have Mount.isMapped()
returning false. When the Mount
does have
Mount.isMapped()
equal to true, the Mount.getContentPath()
can return a different path than Mount.getMountPoint()
. In general, it will be
then Mount.getMountPoint()
+ "/hst:content".
getContentPath
in interface Mount
Mount
. It cannot be null
public String getCanonicalContentPath()
Mount
Mount
. Note that it can return the same
value as Mount.getContentPath()
, but this is in general not the case: When the Mount.getContentPath()
points
to a virtual node, this method returns the location of the canonical version. When the Mount.getContentPath()
points to
a node which behaves like a mirror, then this method returns the location where the mirror points to. If
Mount.getContentPath()
does not point to a virtual node, nor to a mirror, this method returns the same value.
getCanonicalContentPath
in interface Mount
Mount
. It can be null
in case Mount.getContentPath()
points to a virtual node
that does not have a canonical version.public String getPreviewContentPath()
ContextualizableMount
getPreviewContentPath
in interface ContextualizableMount
Mount.getContentPath()
public String getPreviewCanonicalContentPath()
ContextualizableMount
getPreviewCanonicalContentPath
in interface ContextualizableMount
Mount.getCanonicalContentPath()
public String getMountPoint()
Mount
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-live', 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.
getMountPoint
in interface Mount
Mount
and null
if there is no mountPoint configured (nor inherited)ResolvedMount.getResolvedMountPath()
public String getPreviewMountPoint()
ContextualizableMount
getPreviewMountPoint
in interface ContextualizableMount
Mount.getMountPoint()
public boolean isMapped()
Mount
Mount
is not using a HstSiteMap
for the request processing, this method returns false
. When it returns false
, then
Mount.getNamedPipeline()
should also be configured, and a pipeline should be invoked that is independent of the ResolvedSiteMapItem
as their won't be one.
Note that the Mount.getMountPoint()
can still point to a HstSite
which in that case contains the hst:content node
which is the filtered mirror for accessing the content
isMapped
in interface Mount
public Mount getParent()
getParent
in interface Mount
Mount
of this Mount
and null
if we are at the root Mount
public String getScheme()
getScheme
in interface Mount
public String getLocale()
Mount
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
getLocale
in interface Mount
Mount
or null
when it does not contain one.public String getHomePage()
getHomePage
in interface Mount
Mount
or null
when not presentpublic String getPageNotFound()
getPageNotFound
in interface Mount
Mount
or null
when not presentpublic VirtualHost getVirtualHost()
getVirtualHost
in interface Mount
Mount
belongs topublic boolean isContextPathInUrl()
isContextPathInUrl
in interface Mount
true
when the created url should have the contextpath in itpublic int getPort()
getPort
in interface Mount
Mount
public boolean isPortInUrl()
isPortInUrl
in interface Mount
true
when the created url should have contain the port numberpublic boolean isSite()
Mount
false
, then HstLink
will have the HstLink.PATH_SUBPATH_DELIMITER
included even for empty or null
HstLink.getSubPath()
, if and only if
the VirtualHosts.isExcluded(String)
for the path to create a link for returns true
. This is to avoid that for example a path that ends with .pdf will be skipped by the
HstRequestProcessor
due to VirtualHosts.isExcluded(String)
: This is undesirable in case of a REST link for a binary for example
isSite
in interface Mount
Mount
is meant to be a site (false in case of for example being used for REST calls)public String onlyForContextPath()
Mount
HttpServletRequest.getContextPath()
does not matter, this method must return null
or empty. If only this Mount
can be used for a certain contextPath, this method should return that contextPath. . If configured, the contextPath is either an empty String,
or it has to start with a "/" and is not allowed to have any other "/".
onlyForContextPath
in interface Mount
null
or empty if the contextPath does not matter, otherwise it returns the value the contextPath must have a possible to match to this Mount
public boolean isPreview()
Mount
Mount.isOfType(String type)
with type="preview"
isPreview
in interface Mount
true
when this Mount
is configured to be a preview Mount.public String getType()
getType
in interface Mount
Mount
public List<String> getTypes()
getTypes
in interface Mount
Mount
belongs to, including the primary type Mount.getType()
. The primary type is the first item in the Listpublic boolean isOfType(String type)
Mount
Mount
is of type type
this returns true
. A Mount
can be of multiple types at once.
isOfType
in interface Mount
type
- the type to test
true
when this Mount
is of type type
public boolean isVersionInPreviewHeader()
Mount
Mount
has Mount.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
isVersionInPreviewHeader
in interface Mount
true
when for this Mount
the current hst version should be added as a response headerpublic String getCmsLocation()
getCmsLocation
in interface MutableMount
null
if not configuredpublic String getLockedBy()
MutableMount
getLockedBy
in interface MutableMount
public void setLockedBy(String userId)
MutableMount
setLockedBy
in interface MutableMount
public Calendar getLockedOn()
MutableMount
getLockedOn
in interface MutableMount
public void setLockedOn(Calendar lockedOn)
MutableMount
setLockedOn
in interface MutableMount
public String getNamedPipeline()
Mount
Mount
contains a namedPipeline, this value is inherited unless this Mount
explicitly defines its own
getNamedPipeline
in interface Mount
Mount
or null
when the default pipeline is to be usedpublic HstSiteMapMatcher getHstSiteMapMatcher()
Mount
HstManager
getHstSiteMapMatcher
in interface Mount
public String getEmbeddedMountPath()
Mount
Mount
. This is only relevant for portal environment
getEmbeddedMountPath
in interface Mount
Mount
path and null
if not presentpublic boolean isAuthenticated()
Mount
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.
isAuthenticated
in interface Mount
true
if the Mount is authenticated.public Set<String> getRoles()
Mount
Mount.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 Mount.isAuthenticated()
return true
means nobody has access to the item
getRoles
in interface Mount
public Set<String> getUsers()
Mount
Mount.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 Mount.isAuthenticated()
return true
means nobody has access to the item
getUsers
in interface Mount
public boolean isSubjectBasedSession()
Mount
isSubjectBasedSession
in interface Mount
public boolean isSessionStateful()
Mount
isSessionStateful
in interface Mount
public String getFormLoginPage()
Mount
getFormLoginPage
in interface Mount
null
if not configuredpublic String getProperty(String name)
Mount
null
when the property is not present. When the property value is not of
type String
, we'll return the Object.toString()
value
getProperty
in interface Mount
name
- the name of the property
null
when the property is not presentpublic String[] getDefaultSiteMapItemHandlerIds()
getDefaultSiteMapItemHandlerIds
in interface Mount
HstSiteMapItem
's get or null
if non configuredpublic Map<String,String> getMountProperties()
Mount
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
getMountProperties
in interface Mount
public String getChannelPath()
getChannelPath
in interface Mount
null
if not configuredpublic <T extends ChannelInfo> T getChannelInfo()
Mount
Blueprint#getChannelInfoClass()
).
getChannelInfo
in interface Mount
T
- Type of the channel info. Only checked at runtime on assignment.
public void setChannelInfo(ChannelInfo channelInfo)
MutableMount
setChannelInfo
in interface MutableMount
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |