org.eclipse.birt.report.model.api
Class ActionHandle

java.lang.Object
  extended by org.eclipse.birt.report.model.api.ElementDetailHandle
      extended by org.eclipse.birt.report.model.api.ValueHandle
          extended by org.eclipse.birt.report.model.api.StructureHandle
              extended by 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 the 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.

See Also:
DataItemHandle.getActionHandle(), ImageHandle.getActionHandle(), LabelHandle.getActionHandle(), Action

Field Summary
 
Fields inherited from class org.eclipse.birt.report.model.api.StructureHandle
structRef
 
Fields inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
elementHandle
 
Constructor Summary
ActionHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.MemberRef ref)
          Construct an handle to deal with the action structure.
 
Method Summary
 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. use getTargetBookmark()instead.
 java.lang.String getDrillThroughReportName()
          Deprecated. use getReportName()instead.
 java.lang.String getFormatType()
          Gets the format type of the action.
 java.lang.String getHyperlink()
          Deprecated. use getURI()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 is ACTION_LINK_TYPE_DRILLTHROUGH.
 java.lang.String getReportName()
          Gets the name of the target report document if the link type is ACTION_LINK_TYPE_DRILLTHROUGH.
 MemberHandle getSearch()
          Get a handle to deal with the search key list member if the link type is ACTION_LINK_TYPE_DRILLTHROUGH.
 java.lang.String getTargetBookmark()
          Gets the bookmark link if the link type is ACTION_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 is ACTION_LINK_TYPE_HYPERLINK.
 java.util.Iterator paramBindingsIterator()
          Gets the parameter binding list of a drill-through action if the link type is ACTION_LINK_TYPE_DRILLTHROUGH.
 java.util.Iterator searchIterator()
          Gets the search key list for a drill-through action if the link type is ACTION_LINK_TYPE_DRILLTHROUGH and the drill through type is DRILL_THROUGH_LINK_TYPE_SEARCH.
 void setBookmarkLink(java.lang.String bookmark)
          Deprecated. use setTargetBookmark(String)instead.
 void setDrillThroughBookmarkLink(java.lang.String bookmark)
          Deprecated. use setTargetBookmark(String)instead.
 void setDrillThroughReportName(java.lang.String reportName)
          Deprecated. use setReportName(String)instead.
 void setDrillThroughTargetBookmark(java.lang.String bookmark)
          Deprecated. use setTargetBookmark(String)instead.
 void setFormatType(java.lang.String type)
          Sets the format type of the action.
 void setHyperlink(java.lang.String hyperlink)
          Deprecated. setURI(String)
 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, getDefn, getExternalizedValue, getMember, getProperty, getPropertyDefn, getReference, getStringProperty, getStructure, isDesignTime, iterator, setDesignTime, setProperty, setPropertySilently
 
Methods inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
getDesign, getElement, getElementHandle, getModule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionHandle

public ActionHandle(DesignElementHandle element,
                    org.eclipse.birt.report.model.core.MemberRef ref)
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

public java.lang.String getHyperlink()
Deprecated. use getURI()instead.

Gets the hyperlink if the link type is ACTION_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 is ACTION_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:

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:

Parameters:
type - type of the action.
Throws:
SemanticException - if the type 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:

Or, it may be one format that defined by users.

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: *

Or, it may be one format that defined by users.

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 is ACTION_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 is ACTION_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

public void setHyperlink(java.lang.String hyperlink)
                  throws SemanticException
Deprecated. setURI(String)

Sets the hyperlink of this action. The link type will be changed to ACTION_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 to ACTION_LINK_TYPE_HYPERLINK.

Parameters:
uri - the hyperlink to set
Throws:
SemanticException - if the property is locked.

getDrillThroughReportName

public java.lang.String getDrillThroughReportName()
Deprecated. use getReportName()instead.

Gets the name of the target report document if the link type is ACTION_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 is ACTION_LINK_TYPE_DRILLTHROUGH. Otherwise, return null.

Returns:
the name of the target report document
See Also:
setReportName(String)

setDrillThroughReportName

public void setDrillThroughReportName(java.lang.String reportName)
                               throws SemanticException
Deprecated. use setReportName(String)instead.

Sets target report name for a drill-though link. The link type willl be changed to ACTION_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 to ACTION_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

public void setDrillThroughBookmarkLink(java.lang.String bookmark)
                                 throws SemanticException
Deprecated. use setTargetBookmark(String)instead.

Sets the drill-through bookmark. The link type will be changed to ACTION_LINK_TYPE_DRILLTHROUGH, and drill-through type will be changed to DRILL_THROUGH_LINK_TYPE_BOOKMARK_LINK.

Parameters:
bookmark - the bookmark to set.
Throws:
SemanticException - if the property is locked.
See Also:
getBookmarkLink()

getBookmarkLink

public java.lang.String getBookmarkLink()
Deprecated. use getTargetBookmark()instead.

Gets the bookmark link if the link type is ACTION_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 is ACTION_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. Call setLinkType(String)to do the link type change, it can either be ACTION_LINK_TYPE_DRILLTHROUGH or ACTION_LINK_TYPE_BOOKMARK_LINK.

Parameters:
bookmark - the bookmark value.
Throws:
SemanticException - if the property is locked.
See Also:
getTargetBookmark()

setDrillThroughTargetBookmark

public void setDrillThroughTargetBookmark(java.lang.String bookmark)
                                   throws SemanticException
Deprecated. use setTargetBookmark(String)instead.

Sets the drill-through bookmark. The link type will be changed to ACTION_LINK_TYPE_DRILLTHROUGH.

Parameters:
bookmark - the bookmark to set.
Throws:
SemanticException - if the property is locked.
See Also:
getTargetBookmark()

setBookmarkLink

public void setBookmarkLink(java.lang.String bookmark)
                     throws SemanticException
Deprecated. use setTargetBookmark(String)instead.

Sets the bookmark link of this action. The link type will be changed to ACTION_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 is ACTION_LINK_TYPE_DRILLTHROUGH. Each one is the instance of ParameBindingHandle

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 is ACTION_LINK_TYPE_DRILLTHROUGH and the drill through type is DRILL_THROUGH_LINK_TYPE_SEARCH. Each one is the instance of SearchKeyHandle

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: *

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: *

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:

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:

Returns:
target bookmark type for a drill-through or bookmark-link action


Copyright © 2008 Actuate Corp. All rights reserved.