Style Intelligence v12.0

inetsoft.report
Class Hyperlink

java.lang.Object
  extended by inetsoft.report.Hyperlink
All Implemented Interfaces:
inetsoft.util.XMLSerializable, Serializable, Cloneable

public class Hyperlink
extends Object
implements inetsoft.util.XMLSerializable, Serializable, Cloneable

Hyperlink defines a hyperlink to a report or a URL.

See Also:
Serialized Form

Nested Class Summary
static class Hyperlink.Ref
          Hyperlink.Ref contains the actual hyperlink and the link parameter values.
 
Field Summary
static int ARCHIVE_LINK
          link to archived report
static int DRILL_LINK
          auto drill link
static int REPORT_LINK
          link to other report/replet
static int VIEWSHEET_LINK
          Link to a viewsheet.
static int WEB_LINK
          web link
 
Constructor Summary
Hyperlink()
          Create an empty hyperlink.
Hyperlink(String link)
          Create a hyperlink.
Hyperlink(String link, boolean passParams)
          Create a hyperlink.
Hyperlink(String link, boolean passParams, boolean passSelectionParams)
          Create a hyperlink.
Hyperlink(String link, int type)
          Create a hyperlink.
 
Method Summary
 Object clone()
          Clone the object.
 boolean equals(Object obj)
          Check if equals another object.
 String getBookmarkName()
          Get the viewsheet bookmark name.
 String getBookmarkUser()
          Get the viewsheet bookmark user.
 String getLink()
          Get the hyperlink.
 int getLinkType()
          Get the link type of this hyperlink
 int getParameterCount()
          Get the number of parameters defined for this link.
 String getParameterField(String name)
          Get the field value for the parameter.
 String getParameterLabel(String name)
          Get the label value for the parameter.
 Enumeration getParameterNames()
          Get all parameter names.
 String getParameterType(String name)
          Get the type value for the hard-coded parameter.
 String getTargetFrame()
          Get the hyperlink target frame.
 String getToolTip()
          Get the tooltip.
 boolean isDisablePrompting()
          Check whether to disable the prompting of the parameters on the target report.
 boolean isParameterHardCoded(String name)
          Judge whether the parameter is hard-coded or not.
 boolean isReportLink()
          Deprecated. as of 6.0, use getLinkType() == Hyperlink.REPORT_LINK
 boolean isSendReportParameters()
          Check if to pass all report parameters to the linked report.
 boolean isSendSelectionParameters()
          Check if to pass all report parameters to the linked report.
 boolean isSnapshot()
          If the link entry is snapshot.
 void parseXML(Element tag)
          Method to parse an xml segment.
 void removeAllParameterFields()
          Remove all parameter fields.
 void removeParameterField(String name)
          Remove a parameter field.
 void setBookmarkName(String bookmarkName)
          Set the viewsheet bookmark name.
 void setBookmarkUser(String bookmarkUser)
          Set the viewsheet bookmark user.
 void setDisablePrompting(boolean disable)
          Set whether to disable the prompting of the parameters on the target report.
 void setIsSnapshot(boolean isSnapshot)
          Set the link if is snapshot.
 void setLink(String link)
          Set the hyperlink.
 void setLinkType(int linkType)
          Set the link type Type should be one of the constants in inetsoft.report.Hyperlink
 void setParameterField(String name, String field)
          Set the field name for the parameter.
 void setParameterLabel(String name, String label)
          Set the label name for the parameter.
 void setParameterType(String name, String type)
          Set the type name for the parameter.
 void setReportLink(boolean reportLink)
          Deprecated. as of 6.0, use setLinkType()
 void setSendReportParameters(boolean pass)
          Set whether to pass all report parameters to the link report.
 void setSendSelectionParameters(boolean pass)
          Set whether to pass all report parameters to the link report.
 void setTargetFrame(String targetFrame)
          Set the hyperlink target frame.
 void setToolTip(String tip)
          Set the tooltip.
 String toString()
          Get the string representation.
 void writeXML(PrintWriter writer)
          Write the xml segment to print writer.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REPORT_LINK

public static final int REPORT_LINK
link to other report/replet

See Also:
Constant Field Values

WEB_LINK

public static final int WEB_LINK
web link

See Also:
Constant Field Values

ARCHIVE_LINK

public static final int ARCHIVE_LINK
link to archived report

See Also:
Constant Field Values

DRILL_LINK

public static final int DRILL_LINK
auto drill link

See Also:
Constant Field Values

VIEWSHEET_LINK

public static final int VIEWSHEET_LINK
Link to a viewsheet.

See Also:
Constant Field Values
Constructor Detail

Hyperlink

public Hyperlink()
Create an empty hyperlink. The setLink() must be called to set the hyperlink before it can be used.


Hyperlink

public Hyperlink(String link)
Create a hyperlink.

Parameters:
link - link

Hyperlink

public Hyperlink(String link,
                 boolean passParams)
Create a hyperlink.

Parameters:
link - link.
passParams - true if send report parameters, false otherwise.

Hyperlink

public Hyperlink(String link,
                 boolean passParams,
                 boolean passSelectionParams)
Create a hyperlink.

Parameters:
link - link.
passParams - true if send report parameters,
false - otherwise.

Hyperlink

public Hyperlink(String link,
                 int type)
Create a hyperlink.

Parameters:
link - link
type - link type
Method Detail

setLink

public void setLink(String link)
Set the hyperlink. It could be a report name (path) or a URL.

Parameters:
link - for Web URL, the link must be the full URL including the protocol. If the link is to another report, it should be the report path as registered in report server.

getLink

public String getLink()
Get the hyperlink.


setTargetFrame

public void setTargetFrame(String targetFrame)
Set the hyperlink target frame. It is only used in DHTML viewer

Parameters:
targetFrame - is the window name for hyperlink

getTargetFrame

public String getTargetFrame()
Get the hyperlink target frame.


setToolTip

public void setToolTip(String tip)
Set the tooltip. If tooltip is set, the tip is shown when mouse moves into the hyperlink.


getToolTip

public String getToolTip()
Get the tooltip.


setBookmarkName

public void setBookmarkName(String bookmarkName)
Set the viewsheet bookmark name.

Parameters:
bookmarkName - the name of bookmark in vs.

getBookmarkName

public String getBookmarkName()
Get the viewsheet bookmark name.


setBookmarkUser

public void setBookmarkUser(String bookmarkUser)
Set the viewsheet bookmark user.

Parameters:
bookmarkName - the user of bookmark in vs.

getBookmarkUser

public String getBookmarkUser()
Get the viewsheet bookmark user.


setReportLink

public void setReportLink(boolean reportLink)
Deprecated. as of 6.0, use setLinkType()

Set link as a report link

Parameters:
reportLink - true to set this hyperlink to a report link and false otherwise.

isReportLink

public boolean isReportLink()
Deprecated. as of 6.0, use getLinkType() == Hyperlink.REPORT_LINK

Check if this link is a report link

Returns:
true if this hyperlink object links to a report

setLinkType

public void setLinkType(int linkType)
Set the link type Type should be one of the constants in inetsoft.report.Hyperlink

Parameters:
linkType - link type

getLinkType

public int getLinkType()
Get the link type of this hyperlink

Returns:
link type

setIsSnapshot

public void setIsSnapshot(boolean isSnapshot)
Set the link if is snapshot.

Parameters:
isSnapshot - if is snapshot

isSnapshot

public boolean isSnapshot()
If the link entry is snapshot.

Returns:
isSnapshot

setSendReportParameters

public void setSendReportParameters(boolean pass)
Set whether to pass all report parameters to the link report.

Parameters:
pass - true to pass all report parameters. It defaults to true.

isSendReportParameters

public boolean isSendReportParameters()
Check if to pass all report parameters to the linked report. It defaults to true.


setSendSelectionParameters

public void setSendSelectionParameters(boolean pass)
Set whether to pass all report parameters to the link report.

Parameters:
pass - true to pass all report parameters. It defaults to true.

isSendSelectionParameters

public boolean isSendSelectionParameters()
Check if to pass all report parameters to the linked report. It defaults to true.


setDisablePrompting

public void setDisablePrompting(boolean disable)
Set whether to disable the prompting of the parameters on the target report.


isDisablePrompting

public boolean isDisablePrompting()
Check whether to disable the prompting of the parameters on the target report.


getParameterNames

public Enumeration getParameterNames()
Get all parameter names.


getParameterCount

public int getParameterCount()
Get the number of parameters defined for this link.


getParameterLabel

public String getParameterLabel(String name)
Get the label value for the parameter.


getParameterField

public String getParameterField(String name)
Get the field value for the parameter.


getParameterType

public String getParameterType(String name)
Get the type value for the hard-coded parameter.


setParameterLabel

public void setParameterLabel(String name,
                              String label)
Set the label name for the parameter.

Parameters:
name - parameter name.
label - label name.

setParameterField

public void setParameterField(String name,
                              String field)
Set the field name for the parameter.

Parameters:
name - parameter name.
field - field name.

setParameterType

public void setParameterType(String name,
                             String type)
Set the type name for the parameter.

Parameters:
name - parameter name.
type - type name.

isParameterHardCoded

public boolean isParameterHardCoded(String name)
Judge whether the parameter is hard-coded or not.

Parameters:
name - parameter name.

removeParameterField

public void removeParameterField(String name)
Remove a parameter field.

Parameters:
name - parameter name.

removeAllParameterFields

public void removeAllParameterFields()
Remove all parameter fields.


equals

public boolean equals(Object obj)
Check if equals another object.

Overrides:
equals in class Object

toString

public String toString()
Get the string representation.

Overrides:
toString in class Object

clone

public Object clone()
Clone the object.

Overrides:
clone in class Object

writeXML

public void writeXML(PrintWriter writer)
Write the xml segment to print writer.

Specified by:
writeXML in interface inetsoft.util.XMLSerializable
Parameters:
writer - the destination print writer.

parseXML

public void parseXML(Element tag)
              throws Exception
Method to parse an xml segment.

Specified by:
parseXML in interface inetsoft.util.XMLSerializable
Throws:
Exception

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.