|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.portal.hyperlink.GenericHyperLinkResolver
@StableMinor(version="4.1", sinceVersion="4.0") public class GenericHyperLinkResolver
A generic implementation for resolving hyperlinks. This implementation contains some protected methods that may be overriden for easier customization.
Constructor Summary | |
---|---|
GenericHyperLinkResolver()
|
Method Summary | |
---|---|
protected IServiceInterfaceUrl |
createUrl(SessionConfig sessionConfig,
HyperLinkConfig hyperLinkConfig,
String pageId,
ITransaction transaction)
Creates an URL for the given hyperlink. |
protected String |
resolveDestinationInterfaceId(SessionConfig sessionConfig,
HyperLinkConfig hyperLinkConfig,
ITransaction transaction)
Resolves the interface that should be the destination for the given hyperlinkConfig |
protected String |
resolveDestinationPageId(SessionConfig sessionConfig,
HyperLinkConfig hyperLinkConfig,
ITransaction transaction)
Tries to resolve the destination page for the specified hyperlink. |
IServiceInterfaceUrl |
resolveHyperLink(SessionConfig sessionConfig,
HyperLinkConfig hyperLinkConfig,
ITransaction transaction)
Resolves an hyperlink to the corresponding URL. If no destination service interface instance was specified in the hyperLinkConfig , then this method calls
resolveDestinationPageId(SessionConfig, HyperLinkConfig, ITransaction)
to resolve the destination page. |
protected void |
setUrlParameters(SessionConfig sessionConfig,
IServiceInterfaceUrl url,
Map<String,String[]> parameters,
ITransaction transaction)
Replaces the parameters in the url with the parameters in the given map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenericHyperLinkResolver()
Method Detail |
---|
public IServiceInterfaceUrl resolveHyperLink(SessionConfig sessionConfig, HyperLinkConfig hyperLinkConfig, ITransaction transaction) throws PortalException
If no destination service interface instance was specified in the
hyperLinkConfig
, then this method calls
resolveDestinationPageId(SessionConfig, HyperLinkConfig, ITransaction)
to resolve the destination page. If there is a destination
service interface instance or a destination page could be resolved, then
createUrl(SessionConfig, HyperLinkConfig, String, ITransaction)
is called to create the resulting URL, else null is returned.
resolveHyperLink
in interface IHyperLinkResolver
sessionConfig
- the user session information.hyperLinkConfig
- hyperlink informationtransaction
- the transaction for persistence access.
PortalException
protected IServiceInterfaceUrl createUrl(SessionConfig sessionConfig, HyperLinkConfig hyperLinkConfig, String pageId, ITransaction transaction) throws PortalException
This implementation call
setUrlParameters(SessionConfig, IServiceInterfaceUrl, Map, ITransaction)
to fill the created URL's parameters.
sessionConfig
- the user session information.hyperLinkConfig
- the hyperlink value.pageId
- the destination page. If null the created URL will not
have an explicit pageId specified.transaction
- the transaction for persistence access.
PortalException
protected void setUrlParameters(SessionConfig sessionConfig, IServiceInterfaceUrl url, Map<String,String[]> parameters, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.url
- the url to set parameters.parameters
- the parameters to set in the url.transaction
- the transaction for persistence access.
PortalException
PortalRequestParameters.isReservedParameter(String)
protected String resolveDestinationPageId(SessionConfig sessionConfig, HyperLinkConfig hyperLinkConfig, ITransaction transaction) throws PortalException
resolveDestinationInterfaceId(SessionConfig, HyperLinkConfig, ITransaction)
method for resolving the destination interface id if it is not
specified in the hyperLinkConfig
.
sessionConfig
- the user session information.hyperLinkConfig
- the hyperlink.transaction
- the transaction for persistence access.
PortalException
protected String resolveDestinationInterfaceId(SessionConfig sessionConfig, HyperLinkConfig hyperLinkConfig, ITransaction transaction) throws PortalException
hyperlinkConfig
sessionConfig
- the user session information.hyperLinkConfig
- the hyperLink information.transaction
- theh transaction for persistence access.
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |