Class LinkCallable
- java.lang.Object
-
- de.uplanet.lucy.server.auxiliaries.hop.LinkCallable
-
- All Implemented Interfaces:
de.uplanet.lucy.server.scripting.velocity.ICallableWithVelocityContext
@VelocityVariable("Link") @VelocityCallable("instance") public final class LinkCallable extends Object implements de.uplanet.lucy.server.scripting.velocity.ICallableWithVelocityContext
Creates links.
-
-
Constructor Summary
Constructors Constructor Description LinkCallable(org.apache.velocity.VelocityContext p_ctx, de.uplanet.lucy.server.rtcache.IRtCacheProvider p_rtCacheProvider, IBinding p_binding)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinkCallable
cloneWithNewContext(org.apache.velocity.context.Context p_vc)
de.uplanet.lucy.server.hop.IVCLinkInfo
getCalendarPluginLink(String p_strCalendarCtrlGuid, String p_strPluginGuid, String p_strLinkGuid, String p_strLinkType, de.uplanet.lucy.server.businesslogic.control.calendar.IVCControlAppointment p_appointment, de.uplanet.lucy.server.businesslogic.rtappservices.IWebDataCollection p_dataCollection)
Get calendar plugin link blocks (for clicks, doubleclicks, mouseover, click on grouped, mark an appointment) with an additional calendar link block.de.uplanet.lucy.server.hop.IVCLinkInfo
getCalendarPluginResourceLink(String p_strCalendarCtrlGuid, String p_strPluginGuid, String p_strLinkGuid, de.uplanet.lucy.server.businesslogic.control.calendar.IVCControlGroupTreeItem p_groupTreeItem, de.uplanet.lucy.server.businesslogic.rtappservices.IWebDataCollection p_dc)
Get calendar plugin resource link with an additional calendar link block.de.uplanet.lucy.server.hop.IVCLinkInfo
getLink(String p_strLinkGuid)
de.uplanet.lucy.server.hop.IVCLinkInfo
getLink(String p_strLinkGuid, de.uplanet.lucy.server.businesslogic.rtappservices.IWebDataCollection p_dataCollection)
de.uplanet.lucy.server.hop.IVCLinkInfo
getLink(String p_strLinkGuid, de.uplanet.lucy.server.businesslogic.treecontainer.ITreeNode p_treeNode)
de.uplanet.lucy.server.hop.IVCLinkInfo
getLink(String p_strLinkGuid, de.uplanet.lucy.server.businesslogic.util.IRecord p_record)
de.uplanet.lucy.server.hop.IVCLinkInfo
getLink(String p_strLinkGuid, String p_strRecId)
de.uplanet.lucy.server.hop.IVCLinkInfo
getLink(String p_strLinkGuid, Map<String,String> p_additionalArguments)
de.uplanet.lucy.server.hop.IVCLinkInfo
getLinkForRecordId(IServerBridgeRequest p_request, String p_targetPageGuid, String p_recId)
Get a link for a given record-ID.de.uplanet.lucy.server.hop.IVCLinkInfo
getLinkForRecordIdDynamicTarget(IServerBridgeRequest p_request, IValueHolder<?> p_vhTargetPageGuid, String p_recId)
Get a link for a given record-ID.de.uplanet.lucy.server.hop.IVCLinkInfo
getLinkStrict(String p_strLinkGuid)
Same asgetLink(String)
But throws a runtime exception, if no link found for the given GUID.de.uplanet.lucy.server.auxiliaries.hop.VCLinkTargetInfo
getLinkTargetInfo(String p_strLinkGuid)
String
getMenuLink(IMenuItem p_menuItem, String p_strLang, boolean p_setRQLang)
de.uplanet.lucy.server.auxiliaries.hop.VCLinkPageInfo
getParentContainerReloadLink(de.uplanet.lucy.server.businesslogic.rtappservices.IWebRecordDataCollection p_dataCollection, String p_pageGuid)
Get a link for reloading a page.de.uplanet.lucy.server.auxiliaries.hop.VCLinkPageInfo
getReloadLink(de.uplanet.lucy.server.businesslogic.rtappservices.IWebRecordDataCollection p_dataCollection, String p_pageGuid)
Get a link for reloading a page.String
toMenuJSONString(IMenuItem p_menuItem, String p_strLang, boolean p_bSetRQLang, String p_strKey)
Convert the given menu tree to JSON.void
writeMenuJSON(Writer p_writer, IMenuItem p_menuItem, String p_strLang, boolean p_bSetRQLang)
Convert the given menu tree to JSON and write the output to the given character stream.
-
-
-
Constructor Detail
-
LinkCallable
public LinkCallable(org.apache.velocity.VelocityContext p_ctx, de.uplanet.lucy.server.rtcache.IRtCacheProvider p_rtCacheProvider, IBinding p_binding)
Constructor.- Parameters:
p_ctx
- The velocity context.p_rtCacheProvider
- The runtime cache provider.p_binding
- The binding.
-
-
Method Detail
-
getLinkForRecordId
public de.uplanet.lucy.server.hop.IVCLinkInfo getLinkForRecordId(IServerBridgeRequest p_request, String p_targetPageGuid, String p_recId)
Get a link for a given record-ID.- Parameters:
p_request
- The request.p_targetPageGuid
- The target page GUID.p_recId
- The record-ID.- Returns:
- The link information to retrieve a link URL or
null
if p_targetPageGuid isnull
.
-
getLinkForRecordIdDynamicTarget
public de.uplanet.lucy.server.hop.IVCLinkInfo getLinkForRecordIdDynamicTarget(IServerBridgeRequest p_request, IValueHolder<?> p_vhTargetPageGuid, String p_recId)
Get a link for a given record-ID.- Parameters:
p_request
- The request.p_vhTargetPageGuid
- The value holder with target page GUID.p_recId
- The record-ID.- Returns:
- The link information to retrieve a link URL or
null
if p_vhTargetPageGuid isnull
or not a valid GUID.
-
getLink
public de.uplanet.lucy.server.hop.IVCLinkInfo getLink(String p_strLinkGuid)
- Parameters:
p_strLinkGuid
- The link GUID (a valid GUID).- Returns:
- The link information object or
null
if no link with the given GUID found.
-
getLink
public de.uplanet.lucy.server.hop.IVCLinkInfo getLink(String p_strLinkGuid, de.uplanet.lucy.server.businesslogic.util.IRecord p_record)
- Parameters:
p_strLinkGuid
- The link GUID (a valid GUID)- Returns:
- The link information object or
null
if no link with the given GUID found.
-
getLink
public de.uplanet.lucy.server.hop.IVCLinkInfo getLink(String p_strLinkGuid, Map<String,String> p_additionalArguments)
- Parameters:
p_strLinkGuid
- The link GUID (a valid GUID).p_additionalArguments
- Additional arguments.- Returns:
- The link information object or
null
if no link with the given GUID found.
-
getLink
public de.uplanet.lucy.server.hop.IVCLinkInfo getLink(String p_strLinkGuid, de.uplanet.lucy.server.businesslogic.rtappservices.IWebDataCollection p_dataCollection)
- Parameters:
p_strLinkGuid
- The link GUID (a valid GUID)- Returns:
- The link information object or
null
if no link with the given GUID found.
-
getLink
public de.uplanet.lucy.server.hop.IVCLinkInfo getLink(String p_strLinkGuid, de.uplanet.lucy.server.businesslogic.treecontainer.ITreeNode p_treeNode)
- Parameters:
p_strLinkGuid
- The link GUID (a valid GUID)- Returns:
- The link information object or
null
if no link with the given GUID found.
-
getLink
public de.uplanet.lucy.server.hop.IVCLinkInfo getLink(String p_strLinkGuid, String p_strRecId)
- Parameters:
p_strLinkGuid
- The link GUID (a valid GUID)p_strRecId
- The record-ID.- Returns:
- The link information object or
null
if no link with the given GUID found.
-
getLinkStrict
public de.uplanet.lucy.server.hop.IVCLinkInfo getLinkStrict(String p_strLinkGuid)
Same asgetLink(String)
But throws a runtime exception, if no link found for the given GUID.- Parameters:
p_strLinkGuid
- The link GUID (a valid GUID)- Returns:
- The link information object. If not found an runtime exception will be thrown.
-
getParentContainerReloadLink
public de.uplanet.lucy.server.auxiliaries.hop.VCLinkPageInfo getParentContainerReloadLink(de.uplanet.lucy.server.businesslogic.rtappservices.IWebRecordDataCollection p_dataCollection, String p_pageGuid)
Get a link for reloading a page.- Parameters:
p_dataCollection
- The data collection to reload.p_pageGuid
- The GUID of the page to reload.- Returns:
- The link page information.
-
getReloadLink
public de.uplanet.lucy.server.auxiliaries.hop.VCLinkPageInfo getReloadLink(de.uplanet.lucy.server.businesslogic.rtappservices.IWebRecordDataCollection p_dataCollection, String p_pageGuid)
Get a link for reloading a page.- Parameters:
p_dataCollection
- The data collection to reload.p_pageGuid
- The GUID of the page to reload.- Returns:
- The link page information.
-
getCalendarPluginLink
public de.uplanet.lucy.server.hop.IVCLinkInfo getCalendarPluginLink(String p_strCalendarCtrlGuid, String p_strPluginGuid, String p_strLinkGuid, String p_strLinkType, de.uplanet.lucy.server.businesslogic.control.calendar.IVCControlAppointment p_appointment, de.uplanet.lucy.server.businesslogic.rtappservices.IWebDataCollection p_dataCollection)
Get calendar plugin link blocks (for clicks, doubleclicks, mouseover, click on grouped, mark an appointment) with an additional calendar link block.- Parameters:
p_strCalendarCtrlGuid
- The calendar control-GUID.p_strPluginGuid
- The plugin-GUID.p_strLinkGuid
- The link-GUID (optional, may be null).- Returns:
- The plugin link informations.
-
getCalendarPluginResourceLink
public de.uplanet.lucy.server.hop.IVCLinkInfo getCalendarPluginResourceLink(String p_strCalendarCtrlGuid, String p_strPluginGuid, String p_strLinkGuid, de.uplanet.lucy.server.businesslogic.control.calendar.IVCControlGroupTreeItem p_groupTreeItem, de.uplanet.lucy.server.businesslogic.rtappservices.IWebDataCollection p_dc)
Get calendar plugin resource link with an additional calendar link block.- Parameters:
p_strCalendarCtrlGuid
- The calendar control-GUID.p_strPluginGuid
- The plugin-GUID.p_strLinkGuid
- The link-GUID (optional, may be null).p_groupTreeItem
- The group tree item.p_dc
- The data collection.- Returns:
- The plugin link informations.
-
cloneWithNewContext
public LinkCallable cloneWithNewContext(org.apache.velocity.context.Context p_vc)
- Specified by:
cloneWithNewContext
in interfacede.uplanet.lucy.server.scripting.velocity.ICallableWithVelocityContext
-
getLinkTargetInfo
public de.uplanet.lucy.server.auxiliaries.hop.VCLinkTargetInfo getLinkTargetInfo(String p_strLinkGuid)
-
writeMenuJSON
public void writeMenuJSON(Writer p_writer, IMenuItem p_menuItem, String p_strLang, boolean p_bSetRQLang) throws IOException
Convert the given menu tree to JSON and write the output to the given character stream.Note: This method is not intended to be part of the public Intrexx API. The JSON format may change at any time.
- Parameters:
p_writer
- The writer object.p_menuItem
- The menu tree.p_strLang
- The languagep_bSetRQLang
-true
if the rq_lang query parameter should be added to an link otherwise should befalse
.- Throws:
IOException
- If an I/O error occurred.
-
toMenuJSONString
public String toMenuJSONString(IMenuItem p_menuItem, String p_strLang, boolean p_bSetRQLang, String p_strKey)
Convert the given menu tree to JSON.Note: This method is not intended to be part of the public Intrexx API. The JSON format may change at any time.
- Parameters:
p_menuItem
- The menu tree.p_strLang
- The language.p_bSetRQLang
- Should betrue
if rq_lang should be set on a link otherwisefalse
.p_strKey
- The key into the menu structure (currently "mobile" or "desktop").- Returns:
- The intrexx menu JSON structure representation (for use in an java script block).
-
-