Copyright© 2008-2018 SiteVision AB, all rights reserved.
@Requireable(value="ResourceLocatorUtil") public interface ResourceLocatorUtil
An instance of the SiteVision class implementing this interface can be obtained via
Utils.getResourceLocatorUtil()
.
See Utils
for how to obtain an instance of the Utils
interface.
Modifier and Type | Method and Description |
---|---|
Node |
getAddonRepository()
Gets the addon repository for the site of current node.
|
Node |
getColorRepository()
Gets the color repository for the site of current node.
|
Node |
getDecorationRepository()
Gets the decoration repository for the site of current node.
|
Node |
getDefaultImageRepository()
Gets the default image repository for the site of current node.
|
Node |
getDirectoryRepository()
Gets the LDAP directories repository for the site of current node
|
Node |
getFileRepository()
Gets the file repository for the site of current node.
|
Node |
getFontRepository()
Gets the font repository for the site of current node.
|
Node |
getIconRepository()
Gets the icon repository for the site of current node.
|
Node |
getImageRepository()
Gets the image repository for the site of current node.
|
Node |
getIndexRepository()
Gets the index repository for the site of current node.
|
Node |
getListStyleRepository()
Gets the list style repository for the site of current node.
|
Node |
getLocalFileRepository()
Gets the local file repository for current page node.
|
Node |
getLocalFileRepository(Node aNode)
Gets the local file repository for a specified page node.
|
Node |
getLocalImageRepository()
Gets the local image repository for current page node.
|
Node |
getLocalImageRepository(Node aNode)
Gets the local image repository for a specified page node.
|
Node |
getModuleElementDraftRepository()
Gets the module element draft repository for the site of current node.
|
Node |
getModuleElementFileRepository()
Gets the module element file repository for current module element node.
|
Node |
getModuleElementFileRepository(Node aNode)
Gets the module element file repository for a specified module element node.
|
Node |
getModuleElementImageRepository()
Gets the module element image repository for current module element node.
|
Node |
getModuleElementImageRepository(Node aNode)
Gets the module element image repository for a specified module element node.
|
Node |
getModuleElementRepository()
Gets the module element repository for the site of current node.
|
Node |
getNamedReferenceRepository()
Gets the named reference repository for the site of current node.
|
Node |
getNodeByIdentifier(String anIdentifier)
Gets a
Node given its identifier. |
Node |
getNodeByPath(String anAbsolutePath)
Gets a
Node given its absolute path. |
Node |
getNodeByUrl(String anUrl)
Gets a
Node given its URL |
String |
getNodeId(Object anObject)
Resolves the JCR identifier corresponding to the object (i.e. an internal object).
|
Node |
getPageCommentRepository()
Gets the page comment repository for current page node.
|
Node |
getPageCommentRepository(Node aNode)
Gets the page comment repository for a specified page node.
|
Node |
getPersonalFileRepository(Node aNode)
Gets the personal file repository for a specified node.
|
Node |
getPersonalImageRepository(Node aNode)
Gets the personal image repository for a specified node.
|
Node |
getRssFeedRepository()
Gets the RSS feed repository for the site of current node.
|
Node |
getSite()
Gets current site (i.e. the site node of the page for the currently executing portlet).
|
Node |
getSitePage()
Gets current site page (i.e. the site's start page node of the page for the currently executing portlet).
|
Node |
getTemplateRepository()
Gets the template repository for the site of current node.
|
Node getSite()
Note! If you are interested in the actual start page, you should use the getSitePage()
method.
Node
, or null
if indeterminable
(e.g. current portlet and/or current page is not bound to any site)getSitePage()
Node getSitePage()
Note! If you are interested in the actual site, you should use the getSite()
method.
Node
, or null
if indeterminable
(e.g. current portlet and/or current page is not bound to any site)getSite()
Node getColorRepository()
null
if indeterminableNode getFontRepository()
null
if indeterminableNode getDecorationRepository()
null
if indeterminableNode getFileRepository()
null
if indeterminableNode getLocalFileRepository()
This is a convenience for getLocalFileRepository(Node)
that uses
PortletContextUtil.getCurrentPage()
to get current page node.
null
if indeterminableNode getLocalFileRepository(Node aNode)
aNode
- a node that has a local file repository (typically a sv:page or sv:article)aNode
, or null
if indeterminableNode getImageRepository()
null
if indeterminableNode getLocalImageRepository()
This is a convenience for getLocalImageRepository(Node)
that uses
PortletContextUtil.getCurrentPage()
to get current page node.
null
if indeterminableNode getLocalImageRepository(Node aNode)
aNode
- a node that has a local image repository (typically a sv:page or sv:article)aNode
, or null
if indeterminableNode getPageCommentRepository()
This is a convenience for getPageCommentRepository(Node)
that uses
PortletContextUtil.getCurrentPage()
to get current page node.
null
if indeterminableNode getPageCommentRepository(Node aNode)
aNode
- a node that has a page comment repository (typically a sv:page or sv:article)aNode
, or null
if indeterminableNode getPersonalFileRepository(Node aNode)
A personal file repository contains files that belongs to a sv:collaborationGroup
(i.e. "group files")
or a sv:userIdentity
(e.g. files attached when posting timeline entries).
Convenience note! This method will extract and use the corresponding sv:collaborationGroup
if
the aNode argument is a sv:collaborationGroupPage
. It will also try to extract and use the
corresponding sv:userIdentity
if the aNode argument is a sv:user
.
aNode
- a node that has a personal file repository (typically a sv:collaborationGroup or sv:userIdentity)aNode
, or null
if indeterminable.Node getPersonalImageRepository(Node aNode)
A personal image repository contains images that belongs to a sv:collaborationGroup
or a sv:userIdentity
(e.g. profile image).
Convenience note! This method will extract and use the corresponding sv:collaborationGroup
if
the aNode argument is a sv:collaborationGroupPage
. It will also try to extract and use the
corresponding sv:userIdentity
if the aNode argument is a sv:user
.
aNode
- a node that has a personal image repository (typically a sv:collaborationGroup or sv:userIdentity)aNode
, or null
if indeterminable.Node getIconRepository()
The icon repository contains all site-specific file icon nodes.
null
if indeterminableNode getIndexRepository()
Tip! The IndexUtil
utility can be used for easy index lookup.
null
if indeterminableNode getDefaultImageRepository()
The default image repository contains system/server-specific images/icons.
null
if indeterminableNode getDirectoryRepository()
null
if indeterminableNode getNodeByIdentifier(String anIdentifier)
Node
given its identifier.
Note! This is mere a convenience alias for Session.getNodeByIdentifier(String)
but
unlike the original, this method returns null instead of throwing an exception if given identifier
can't be matched to an existing node.
anIdentifier
- a Node identifierNode
or null
Node getNodeByPath(String anAbsolutePath)
Node
given its absolute path.
Note! This is mere a convenience alias for Session.getNode(String)
but
unlike the original, this method returns null instead of throwing an exception if given
absolute path can't be matched to an existing node.
anAbsolutePath
- an absolute pathNode
or null
Node getNodeByUrl(String anUrl)
Node
given its URLanUrl
- an url pointing to the resource (e.g. page, portlet)Node
or null
String getNodeId(Object anObject)
Resolves the JCR identifier corresponding to the object (i.e. an internal object). If no corresponding identifier is found null is returned.
Note: if the object corresponds to the site the identifier for the
sv:sitePage
is returned. If the sv:site
is needed use the method getSite()
.
This id can be used to retrieve the Node
. To do so use the Session
to
and the method getNodeByIdentifier
.
anObject
- an object (potentially an internal SiteVision node)Node getTemplateRepository()
null
if indeterminableNode getRssFeedRepository()
null
if indeterminableNode getListStyleRepository()
null
if indeterminableNode getModuleElementDraftRepository()
null
if indeterminable.Node getModuleElementRepository()
null
if indeterminable.Node getModuleElementFileRepository()
This is a convenience for getModuleElementFileRepository(Node)
that uses
PortletContextUtil.getCurrentModuleElement()
to get current module element node.
null
if indeterminable.Node getModuleElementFileRepository(Node aNode)
aNode
- a node that has a module element file repository (typically a sv:moduleElementDraft or sv:moduleElement)aNode
, or null
if indeterminable.Node getModuleElementImageRepository()
This is a convenience for getModuleElementImageRepository(Node)
that uses
PortletContextUtil.getCurrentModuleElement()
to get current module element node.
null
if indeterminable.Node getModuleElementImageRepository(Node aNode)
aNode
- a node that has a module element image repository (typically a sv:moduleElementDraft or sv:moduleElement)aNode
, or null
if indeterminable.Node getAddonRepository()
null
if indeterminable.Node getNamedReferenceRepository()
null
if indeterminable.SiteVision - Portal and Content Management Made Easy
SiteVision is an advanced Java enterprise portal product and a portlet container (JSR 286) that implements Java Content Repository (JSR 283).
Copyright© 2008-2018 SiteVision AB, all rights reserved.