Class ActionHandle
- java.lang.Object
-
- org.eclipse.birt.report.model.api.ElementDetailHandle
-
- org.eclipse.birt.report.model.api.ValueHandle
-
- org.eclipse.birt.report.model.api.StructureHandle
-
- org.eclipse.birt.report.model.api.ActionHandle
-
public class ActionHandle extends StructureHandle
Represents an "action" (hyperlink) attached to an element. Obtain an instance of this class by calling thegetActionHandle
method on the handle of an element that defines an action.The link type of an Action can be only one of hyperlink, bookmark Link or drill-through.
- The hyperlink property returns a standard web-style link with "http:" or "mailto:" prefix.
- The bookmark link simply identifies a bookmark identified within this report.
- The drill-though link runs and/or views another report. A drill-through action can include parameters (used when the hyperlink is used to run a report), search keys (an optional list of search criteria) and a bookmark destination within the target report.
-
-
Field Summary
-
Fields inherited from class org.eclipse.birt.report.model.api.StructureHandle
structContext
-
Fields inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
elementHandle
-
-
Constructor Summary
Constructors Constructor Description ActionHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.MemberRef ref)
Deprecated.ActionHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.StructureContext context)
Construct an handle to deal with the action structure.ActionHandle(SimpleValueHandle valueHandle, int index)
Constructs the handle of action.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addParamBinding(ParamBinding paramBinding)
Add a new parameter binding to the action.void
addSearch(SearchKey key)
Add a new search key to the action.java.lang.String
getBookmarkLink()
Deprecated.usegetTargetBookmark()
instead.java.lang.String
getDrillThroughReportName()
Deprecated.usegetReportName()
instead.java.lang.String
getFormatType()
Gets the format type of the action.java.lang.String
getHyperlink()
Deprecated.usegetURI()
instead.java.lang.String
getLinkType()
Gets the link type of the action.MemberHandle
getParamBindings()
Get a handle to deal with the parameter binding list member if the link type isACTION_LINK_TYPE_DRILLTHROUGH
.java.lang.String
getReportName()
Gets the name of the target report document if the link type isACTION_LINK_TYPE_DRILLTHROUGH
.MemberHandle
getSearch()
Get a handle to deal with the search key list member if the link type isACTION_LINK_TYPE_DRILLTHROUGH
.java.lang.String
getTargetBookmark()
Gets the bookmark link if the link type isACTION_LINK_TYPE_BOOKMARK_LINK
.java.lang.String
getTargetBookmarkType()
Gets target bookmark type for a drill-through or bookmark-link action.java.lang.String
getTargetFileType()
Gets target report file type for a drill-through action.java.lang.String
getTargetWindow()
Gets the name of the target browser window for the link.java.lang.String
getToolTip()
Gets the value of tool tip.java.lang.String
getURI()
Gets the identifier of the hyperlink if the link type isACTION_LINK_TYPE_HYPERLINK
.java.util.Iterator
paramBindingsIterator()
Gets the parameter binding list of a drill-through action if the link type isACTION_LINK_TYPE_DRILLTHROUGH
.java.util.Iterator
searchIterator()
Gets the search key list for a drill-through action if the link type isACTION_LINK_TYPE_DRILLTHROUGH
and the drill through type isDRILL_THROUGH_LINK_TYPE_SEARCH
.void
setBookmarkLink(java.lang.String bookmark)
Deprecated.usesetTargetBookmark(String)
instead.void
setDrillThroughBookmarkLink(java.lang.String bookmark)
Deprecated.usesetTargetBookmark(String)
instead.void
setDrillThroughReportName(java.lang.String reportName)
Deprecated.usesetReportName(String)
instead.void
setDrillThroughTargetBookmark(java.lang.String bookmark)
Deprecated.usesetTargetBookmark(String)
instead.void
setFormatType(java.lang.String type)
Sets the format type of the action.void
setHyperlink(java.lang.String hyperlink)
Deprecated.void
setLinkType(java.lang.String type)
Sets the link type of the action.void
setReportName(java.lang.String reportName)
Sets target report name for a drill-though link.void
setTargetBookmark(java.lang.String bookmark)
Sets the target bookmark defined within this same report, or another report for a drill-though link.void
setTargetBookmarkType(java.lang.String targetBookmarkType)
Sets target bookmark type for a drill-through or bookmark-link action.void
setTargetFileType(java.lang.String targetFileType)
Sets target report file type for a drill-through action.void
setTargetWindow(java.lang.String window)
Sets the target window of the action.void
setToolTip(java.lang.String toolTip)
Sets the value of the tool tip.void
setURI(java.lang.String uri)
Sets the hyperlink of this action.-
Methods inherited from class org.eclipse.birt.report.model.api.StructureHandle
drop, getContext, getDefn, getExpressionProperty, getExternalizedValue, getExternalizedValue, getIntProperty, getMember, getProperty, getPropertyDefn, getStringProperty, getStructure, isDesignTime, isLocal, iterator, setDesignTime, setExpressionProperty, setProperty, setPropertySilently
-
Methods inherited from class org.eclipse.birt.report.model.api.ValueHandle
getReference
-
Methods inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
getDesign, getElement, getElementHandle, getModule
-
-
-
-
Constructor Detail
-
ActionHandle
public ActionHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.StructureContext context)
Construct an handle to deal with the action structure.- Parameters:
element
- the element that defined the action.context
- reference to the action property.
-
ActionHandle
public ActionHandle(SimpleValueHandle valueHandle, int index)
Constructs the handle of action.- Parameters:
valueHandle
- the value handle for action list of one propertyindex
- the position of this action in the list
-
ActionHandle
@Deprecated public ActionHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.MemberRef ref)
Deprecated.Construct an handle to deal with the action structure.- Parameters:
element
- the element that defined the action.ref
- reference to the action property.
-
-
Method Detail
-
getHyperlink
@Deprecated public java.lang.String getHyperlink()
Deprecated.usegetURI()
instead.Gets the hyperlink if the link type isACTION_LINK_TYPE_HYPERLINK
. Otherwise, return null.- Returns:
- the link expression in a string
-
getURI
public java.lang.String getURI()
Gets the identifier of the hyperlink if the link type isACTION_LINK_TYPE_HYPERLINK
. Otherwise, return null.- Returns:
- the URI link expression in a string
-
getTargetWindow
public java.lang.String getTargetWindow()
Gets the name of the target browser window for the link. (Optional.) Used only for the Hyperlink and Drill Through options. Otherwise, return null.- Returns:
- the window name
-
getLinkType
public java.lang.String getLinkType()
Gets the link type of the action. The link type are defined in DesignChoiceConstants and can be one of the following:ACTION_LINK_TYPE_NONE
ACTION_LINK_TYPE_HYPERLINK
ACTION_LINK_TYPE_DRILLTHROUGH
ACTION_LINK_TYPE_BOOKMARK_LINK
- Returns:
- the string value of the link type
- See Also:
DesignChoiceConstants
-
setLinkType
public void setLinkType(java.lang.String type) throws SemanticException
Sets the link type of the action. The link type are defined in DesignChoiceConstants and can be one of the following:ACTION_LINK_TYPE_NONE
ACTION_LINK_TYPE_HYPERLINK
ACTION_LINK_TYPE_DRILLTHROUGH
ACTION_LINK_TYPE_BOOKMARK_LINK
- Parameters:
type
- type of the action.- Throws:
SemanticException
- if thetype
is not one of the above.
-
setFormatType
public void setFormatType(java.lang.String type) throws SemanticException
Sets the format type of the action. The format type for action are defined in DesignChoiceConstants and can be one of the following:ACTION_FORMAT_TYPE_HTML
ACTION_FORMAT_TYPE_PDF
- Parameters:
type
- the type of the action- Throws:
SemanticException
-
getFormatType
public java.lang.String getFormatType()
Gets the format type of the action. The format type for action are defined in DesignChoiceConstants and can be one of the following: *ACTION_FORMAT_TYPE_HTML
ACTION_FORMAT_TYPE_PDF
- Returns:
- the format type of the action
-
getToolTip
public java.lang.String getToolTip()
Gets the value of tool tip.- Returns:
- the value of tool tip.
-
setToolTip
public void setToolTip(java.lang.String toolTip) throws SemanticException
Sets the value of the tool tip.- Parameters:
toolTip
- the value of tool tip.- Throws:
SemanticException
-
getParamBindings
public MemberHandle getParamBindings()
Get a handle to deal with the parameter binding list member if the link type isACTION_LINK_TYPE_DRILLTHROUGH
. Otherwise, return null.- Returns:
- a handle to deal with the parameter binding list member
-
addParamBinding
public void addParamBinding(ParamBinding paramBinding) throws SemanticException
Add a new parameter binding to the action.- Parameters:
paramBinding
- a new parameter binding to be added.- Throws:
SemanticException
- if the parameter binding is not valid
-
getSearch
public MemberHandle getSearch()
Get a handle to deal with the search key list member if the link type isACTION_LINK_TYPE_DRILLTHROUGH
. Otherwise, return null.- Returns:
- a handle to deal with the search key list member
-
addSearch
public void addSearch(SearchKey key) throws SemanticException
Add a new search key to the action.- Parameters:
key
- a new search key to be added.- Throws:
SemanticException
- if the value is not valid.
-
setTargetWindow
public void setTargetWindow(java.lang.String window) throws SemanticException
Sets the target window of the action.- Parameters:
window
- the target window name- Throws:
SemanticException
- if this property is locked.
-
setHyperlink
@Deprecated public void setHyperlink(java.lang.String hyperlink) throws SemanticException
Deprecated.Sets the hyperlink of this action. The link type will be changed toACTION_LINK_TYPE_HYPERLINK
.- Parameters:
hyperlink
- the hyperlink to set- Throws:
SemanticException
- if the property is locked.- See Also:
getHyperlink()
-
setURI
public void setURI(java.lang.String uri) throws SemanticException
Sets the hyperlink of this action. The link type will be changed toACTION_LINK_TYPE_HYPERLINK
.- Parameters:
uri
- the hyperlink to set- Throws:
SemanticException
- if the property is locked.
-
getDrillThroughReportName
@Deprecated public java.lang.String getDrillThroughReportName()
Deprecated.usegetReportName()
instead.Gets the name of the target report document if the link type isACTION_LINK_TYPE_DRILLTHROUGH
. Otherwise, return null.- Returns:
- the name of the target report document
- See Also:
setDrillThroughReportName(String)
-
getReportName
public java.lang.String getReportName()
Gets the name of the target report document if the link type isACTION_LINK_TYPE_DRILLTHROUGH
. Otherwise, return null.- Returns:
- the name of the target report document
- See Also:
setReportName(String)
-
setDrillThroughReportName
@Deprecated public void setDrillThroughReportName(java.lang.String reportName) throws SemanticException
Deprecated.usesetReportName(String)
instead.Sets target report name for a drill-though link. The link type willl be changed toACTION_LINK_TYPE_DRILLTHROUGH
. The report name can include relative or absolute names. If the suffix is omitted, it is computed on the server by looking for a matching report. BIRT reports are searched in the following order: 1) a BIRT report document or 2) a BIRT report design.- Parameters:
reportName
- the name of the target report- Throws:
SemanticException
- if the property is locked.- See Also:
getDrillThroughReportName()
-
setReportName
public void setReportName(java.lang.String reportName) throws SemanticException
Sets target report name for a drill-though link. The link type will be changed toACTION_LINK_TYPE_DRILLTHROUGH
. The report name can include relative or absolute names. If the suffix is omitted, it is computed on the server by looking for a matching report. BIRT reports are searched in the following order: 1) a BIRT report document or 2) a BIRT report design.- Parameters:
reportName
- the name of the target report- Throws:
SemanticException
- if the property is locked.- See Also:
getReportName()
-
setDrillThroughBookmarkLink
@Deprecated public void setDrillThroughBookmarkLink(java.lang.String bookmark) throws SemanticException
Deprecated.usesetTargetBookmark(String)
instead.Sets the drill-through bookmark. The link type will be changed toACTION_LINK_TYPE_DRILLTHROUGH
, and drill-through type will be changed toDRILL_THROUGH_LINK_TYPE_BOOKMARK_LINK
.- Parameters:
bookmark
- the bookmark to set.- Throws:
SemanticException
- if the property is locked.- See Also:
getBookmarkLink()
-
getBookmarkLink
@Deprecated public java.lang.String getBookmarkLink()
Deprecated.usegetTargetBookmark()
instead.Gets the bookmark link if the link type isACTION_LINK_TYPE_BOOKMARK_LINK
. Otherwise, return null.- Returns:
- the bookmark link
-
getTargetBookmark
public java.lang.String getTargetBookmark()
Gets the bookmark link if the link type isACTION_LINK_TYPE_BOOKMARK_LINK
. Otherwise, return null.- Returns:
- the bookmark link
-
setTargetBookmark
public void setTargetBookmark(java.lang.String bookmark) throws SemanticException
Sets the target bookmark defined within this same report, or another report for a drill-though link. CallsetLinkType(String)
to do the link type change, it can either beACTION_LINK_TYPE_DRILLTHROUGH
orACTION_LINK_TYPE_BOOKMARK_LINK
.- Parameters:
bookmark
- the bookmark value.- Throws:
SemanticException
- if the property is locked.- See Also:
getTargetBookmark()
-
setDrillThroughTargetBookmark
@Deprecated public void setDrillThroughTargetBookmark(java.lang.String bookmark) throws SemanticException
Deprecated.usesetTargetBookmark(String)
instead.Sets the drill-through bookmark. The link type will be changed toACTION_LINK_TYPE_DRILLTHROUGH
.- Parameters:
bookmark
- the bookmark to set.- Throws:
SemanticException
- if the property is locked.- See Also:
getTargetBookmark()
-
setBookmarkLink
@Deprecated public void setBookmarkLink(java.lang.String bookmark) throws SemanticException
Deprecated.usesetTargetBookmark(String)
instead.Sets the bookmark link of this action. The link type will be changed toACTION_LINK_TYPE_BOOKMARK_LINK
.- Parameters:
bookmark
- the expression value.- Throws:
SemanticException
- if the property is locked.- See Also:
getBookmarkLink()
-
paramBindingsIterator
public java.util.Iterator paramBindingsIterator()
Gets the parameter binding list of a drill-through action if the link type isACTION_LINK_TYPE_DRILLTHROUGH
. Each one is the instance ofParameBindingHandle
Action binds a data value in the report to a report parameter defined in the target report.
Note that this is a parameter binding, not a parameter definition. The report makes no attempt to check that the parameters listed here are accurate in name or type for the target report. Also, it is legal to bind the same parameter multiple times; the meaning depends on the semantics of the target report.
- Returns:
- the iterator over parameters of a drill-through action.
-
searchIterator
public java.util.Iterator searchIterator()
Gets the search key list for a drill-through action if the link type isACTION_LINK_TYPE_DRILLTHROUGH
and the drill through type isDRILL_THROUGH_LINK_TYPE_SEARCH
. Each one is the instance ofSearchKeyHandle
The search key list identifies search criteria in the target report and is used for drill-though links. The search is assumed to be quality. That is, identify a column defined in the target report and a data value defined in this report. The link will then search for this value.
- Returns:
- the iterator over search keys of a drill-through action.
-
setTargetFileType
public void setTargetFileType(java.lang.String targetFileType) throws SemanticException
Sets target report file type for a drill-through action. The format type for action are defined in DesignChoiceConstants and can be one of the following: *ACTION_TARGET_FILE_TYPE_REPORT_DESIGN
ACTION_TARGET_FILE_TYPE_REPORT_DOCUMENT
- Parameters:
targetFileType
- the type of the target report file- Throws:
SemanticException
- if type of the target report file is not in the choice list.- See Also:
getTargetFileType()
-
getTargetFileType
public java.lang.String getTargetFileType()
Gets target report file type for a drill-through action. The format type for action are defined in DesignChoiceConstants and can be one of the following: *ACTION_TARGET_FILE_TYPE_REPORT_DESIGN
ACTION_TARGET_FILE_TYPE_REPORT_DOCUMENT
- Returns:
- target report file type for a drill-through action
-
setTargetBookmarkType
public void setTargetBookmarkType(java.lang.String targetBookmarkType) throws SemanticException
Sets target bookmark type for a drill-through or bookmark-link action. The bookmark type for action are defined in DesignChoiceConstants and can be one of the following:ACTION_BOOKMARK_TYPE_BOOKMARK
ACTION_BOOKMARK_TYPE_TOC
- Parameters:
targetBookmarkType
- the type of the target bookmark- Throws:
SemanticException
- if type of the target bookmark is not in the choice list.- See Also:
getTargetBookmarkType()
-
getTargetBookmarkType
public java.lang.String getTargetBookmarkType()
Gets target bookmark type for a drill-through or bookmark-link action. The bookmark type for action are defined in DesignChoiceConstants and can be one of the following:ACTION_BOOKMARK_TYPE_BOOKMARK
ACTION_BOOKMARK_TYPE_TOC
- Returns:
- target bookmark type for a drill-through or bookmark-link action
-
-