Class ActionHandle
getActionHandle
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
ConstructorsConstructorDescriptionActionHandle
(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
Modifier and TypeMethodDescriptionvoid
addParamBinding
(ParamBinding paramBinding) Add a new parameter binding to the action.void
Add a new search key to the action.Deprecated.Deprecated.usegetReportName()
instead.Gets the format type of the action.Deprecated.usegetURI()
instead.Gets the link type of the action.Get a handle to deal with the parameter binding list member if the link type isACTION_LINK_TYPE_DRILLTHROUGH
.Gets the name of the target report document if the link type isACTION_LINK_TYPE_DRILLTHROUGH
.Get a handle to deal with the search key list member if the link type isACTION_LINK_TYPE_DRILLTHROUGH
.Gets the bookmark link if the link type isACTION_LINK_TYPE_BOOKMARK_LINK
.Gets target bookmark type for a drill-through or bookmark-link action.Gets target report file type for a drill-through action.Gets the name of the target browser window for the link.Gets the value of tool tip.getURI()
Gets the identifier of the hyperlink if the link type isACTION_LINK_TYPE_HYPERLINK
.Gets the parameter binding list of a drill-through action if the link type isACTION_LINK_TYPE_DRILLTHROUGH
.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
(String bookmark) Deprecated.usesetTargetBookmark(String)
instead.void
setDrillThroughBookmarkLink
(String bookmark) Deprecated.usesetTargetBookmark(String)
instead.void
setDrillThroughReportName
(String reportName) Deprecated.usesetReportName(String)
instead.void
setDrillThroughTargetBookmark
(String bookmark) Deprecated.usesetTargetBookmark(String)
instead.void
setFormatType
(String type) Sets the format type of the action.void
setHyperlink
(String hyperlink) Deprecated.void
setLinkType
(String type) Sets the link type of the action.void
setReportName
(String reportName) Sets target report name for a drill-though link.void
setTargetBookmark
(String bookmark) Sets the target bookmark defined within this same report, or another report for a drill-though link.void
setTargetBookmarkType
(String targetBookmarkType) Sets target bookmark type for a drill-through or bookmark-link action.void
setTargetFileType
(String targetFileType) Sets target report file type for a drill-through action.void
setTargetWindow
(String window) Sets the target window of the action.void
setToolTip
(String toolTip) Sets the value of the tool tip.void
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 Details
-
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
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 Details
-
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
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
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
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:
-
setLinkType
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
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
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
Gets the value of tool tip.- Returns:
- the value of tool tip.
-
setToolTip
Sets the value of the tool tip.- Parameters:
toolTip
- the value of tool tip.- Throws:
SemanticException
-
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
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
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
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
Sets the target window of the action.- Parameters:
window
- the target window name- Throws:
SemanticException
- if this property is locked.
-
setHyperlink
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:
-
setURI
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.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:
-
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:
-
setDrillThroughReportName
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:
-
setReportName
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:
-
setDrillThroughBookmarkLink
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
Deprecated.usegetTargetBookmark()
instead.Gets the bookmark link if the link type isACTION_LINK_TYPE_BOOKMARK_LINK
. Otherwise, return null.- Returns:
- the bookmark link
-
getTargetBookmark
Gets the bookmark link if the link type isACTION_LINK_TYPE_BOOKMARK_LINK
. Otherwise, return null.- Returns:
- the bookmark link
-
setTargetBookmark
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:
-
setDrillThroughTargetBookmark
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:
-
setBookmarkLink
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:
-
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
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
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
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
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
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
-
getTargetBookmark()
instead.