Class BookmarkTool
java.lang.Object
java.util.Observable
com.nomagic.magicreport.engine.Tool
com.nomagic.magicreport.engine.tools.BookmarkTool
- All Implemented Interfaces:
ITool,IVariable,Serializable,Cloneable
Contains utilities functions for bookmark. Context name of this class is "bookmark". Public functions of this
class are able to access via template by using
$bookmark- Since:
- Jun 19, 2007
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.nomagic.magicreport.engine.ITool
ITool.HTMLString, ITool.RetainedString, ITool.Void -
Field Summary
FieldsFields inherited from class com.nomagic.magicreport.engine.Tool
context, properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFunction to create bookmark.Function to create bookmark.Function to create bookmark with the specified element type.Return a bookmark for REF from given string.Return a bookmark for REF from given string.getBookmarkId(String id) Return a bookmark id from given string.Function to create hyperlink for bookmark.Function to create hyperlink for bookmark.Return a reference to REF.eturn a reference to REF.Function to create hyperlink for open an URL.Function to create hyperlink for open an URL.Function to create hyperlink for open an URL.Methods inherited from class com.nomagic.magicreport.engine.Tool
clone, getContext, getProperties, getProperty, getProperty, notifyObservers, setContext, setPropertiesMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChanged
-
Field Details
-
CONTEXT_NAME
Contains a context name.- See Also:
-
-
Constructor Details
-
BookmarkTool
public BookmarkTool()
-
-
Method Details
-
openURL
Function to create hyperlink for open an URL.<code> $bookmark.openURL("http://www.nomagicasia.com", "NoMagic Asia") </code>- Parameters:
url- the url text. If null, empty string will be used.content- the text content. If null, empty string will be used.- Returns:
- content with hyperlink in document format.
- See Also:
-
openURL
Function to create hyperlink for open an URL.<code> $bookmark.openURL($url, "NoMagic Asia") </code>
- Parameters:
url- the URL instance. If null, empty string will be used.content- text content. If null, empty string will be used.- Returns:
- content with hyperlink in RTF format.
- See Also:
-
openURL
Function to create hyperlink for open an URL.<code> $bookmark.openURL($uri, "NoMagic Asia") </code>
- Parameters:
uri- the URI instance. If null, empty string will be used.content- text content. If null, empty string will be used.- Returns:
- content with hyperlink in RTF format.
- See Also:
-
open
Function to create hyperlink for bookmark. The bookmark ID will be automatically generated from content.<code> #foreach ($uc in $UseCase) $bookmark.open($uc.name) #end #foreach ($uc in $UseCase) $bookmark.create($uc.name) #end </code>- Parameters:
content- text content. If null, ID will be a digest of "0" and name will be a hash code of object.- Returns:
- content with hyperlink in RTF format.
- See Also:
-
open
Function to create hyperlink for bookmark.bookmarkIDvalue must match with parameterbookmarkIDthat pass intocreate(String, Object)function.<code> #foreach ($uc in $UseCase) $bookmark.open($uc.name) #end #foreach ($uc in $UseCase) $bookmark.create($uc.name) #end </code>- Parameters:
bookmarkId- the bookmark id. If null, digest of empty string will be used.content- text content. If null, empty string will be used.- Returns:
- content with hyperlink in RTF format.
- See Also:
-
create
Function to create bookmark. The bookmark ID will be automatically generated from bookmark object.<code> #foreach ($uc in $UseCase) $bookmark.open($uc.name) #end #foreach ($uc in $UseCase) $bookmark.create($uc.name) #end </code>- Parameters:
bookmarkObject- the bookmark object or content. If null, ID will be a digest of "0" and name will be a hash code of object.- Returns:
- content with bookmark in RTF format.
-
create
Function to create bookmark. The default element type for this function is "label".<code> #foreach ($uc in $UseCase) $bookmark.open($uc.ID, $uc.name) #end #foreach ($uc in $UseCase) $bookmark.create($uc.ID, $uc.name) #end </code>- Parameters:
bookmarkId- the bookmark. If null, digest of empty string will be used.bookmarkObject- the bookmark object or content. If null, empty string will be used.- Returns:
- content with bookmark in RTF format.
-
create
Function to create bookmark with the specified element type.<code> #foreach ($uc in $UseCase) $bookmark.open($uc.ID, $uc.name) #end #foreach ($uc in $UseCase) $bookmark.create($uc.ID, $uc.name, "label") #end </code>- Parameters:
bookmarkId- the bookmark id. If null, digest of empty string will be used.bookmarkObject- the bookmark object or content. If null, empty string will be used.elementType- name of element type e.g. html tag.- Returns:
- content with bookmark in format.
-
getBookmarkId
Return a bookmark id from given string.- Parameters:
id- original string value- Returns:
- a bookmark id
- See Also:
-
createRef
Return a bookmark for REF from given string.- Parameters:
refId- the bookmark id. If null, digest of empty string will be used.- Returns:
- a bookmark for REF
- See Also:
-
createRef
Return a bookmark for REF from given string.- Parameters:
refId- the bookmark id. If null, digest of empty string will be used.content- text content- Returns:
- a bookmark for REF
- See Also:
-
openRef
Return a reference to REF.- Parameters:
refId- the bookmark id. If null, digest of empty string will be used.- Returns:
- a reference to REF
-
openRef
eturn a reference to REF.- Parameters:
refId- the bookmark id. If null, digest of empty string will be used.content- text content- Returns:
- a reference to REF
-