|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.sree.BasicReplet
public abstract class BasicReplet
This class should be used as the base class of all user implemented replet classes. It provides a higher level API than the Replet interface and hides some of the coordination between methods.
Actions or hyperlinks can be added to an element. If the element is a table, the action can be associated with an entire row or column, or a single cell. The cell is specified by inetsoft.report.event.EventPoint object. Use one of the factory method (row, column and cell) to create a event location for a row, column, or a specific cell.
For elements in section bands, the row number is the band the row corresponds to.
| Field Summary | |
|---|---|
protected UserCatalog |
catalog
|
protected boolean |
destroyed
|
protected Vector |
fieldelems
|
protected RepletRequest |
lastreq
|
protected Principal |
principal
|
| Fields inherited from interface inetsoft.sree.Replet |
|---|
DESIGN_MODE, RUN_MODE |
| Constructor Summary | |
|---|---|
BasicReplet()
|
|
| Method Summary | |
|---|---|
void |
addFormLink(String form,
String replet)
Add a hyperlink from a form to a replet. |
void |
addLink(String eid,
Point item,
String toeid,
int row)
Add a hyperlink from one element to another element inside the same report. |
void |
addLink(String eid,
Point item,
String replet,
RepletRequest req)
Add a hyperlink from an element (item) to a replet. |
void |
addLink(String eid,
Point item,
String replet,
RepletRequest req,
String frame)
Add a hyperlink from an element (item) to a replet. |
void |
addLink(String eid,
String replet)
Add a hyperlink from an element to a replet. |
void |
addLinkURL(String eid,
Point item,
String url,
String target)
Add a link to a URL. |
void |
addMenuAction(String eid,
Point item,
String menuitem,
RepletCommand action)
Add a menu action to an element. |
void |
addMenuAction(String menuitem,
RepletCommand action)
Add a menu action. |
void |
addPopupMenu(String[] items)
Add a popup menu for the report. |
void |
addPopupMenu(String eid,
Point item,
String[] items)
Add a popup menu for an element. |
void |
addRepletMenuListener(inetsoft.sree.event.RepletMenuListener listener)
Add a menu listener. |
void |
addRepletParameters(RepletParameters param)
Add a parameter description. |
void |
addRepletSelectionListener(Object src,
Point item,
inetsoft.sree.event.RepletSelectionListener listener)
Add a selection listener. |
void |
addRequest(String eid,
Point item,
RepletRequest req)
Add a request link for an element (item). |
void |
addRequestListener(inetsoft.sree.event.RequestListener listener)
Add a request listener. |
void |
addStatus(String eid,
Point item,
String msg)
Add a status message associated with an element. |
void |
applyCalcTableSortOnHeader(inetsoft.report.internal.TableElementDef telem)
|
boolean |
containsVariable(String name)
Check if contains a variable. |
inetsoft.sree.script.RepletScriptable |
createRepletScriptable(BasicReplet replet)
Create replet scriptable. |
abstract ReportSheet |
createReport(RepletRequest req)
Generate a report. |
void |
destroy()
Destroy this replet. |
void |
execute(ReportSheet report)
Execute queries in a report. |
void |
execute(ReportSheet report,
VariableTable vtable)
Execute queries in a report. |
protected void |
finalize()
|
protected RepletCommand |
fireRepletMenuEvent(inetsoft.sree.event.RepletMenuEvent event)
Invoke the menu listeners. |
protected RepletCommand |
fireRequestEvent(inetsoft.sree.event.RequestEvent event)
Invoke the request listeners. |
protected RepletCommand |
fireSelectionEvent(SelectionEvent event)
Invoke the selection listeners. |
ReportSheet |
generate(RepletRequest req)
This implements the generate() method. |
long |
getCacheTime()
Get the maximum time this report is cached on the server. |
protected UserCatalog |
getCatalog()
Get the user catalog containing report text string replacements. |
String |
getContextName()
Get the context name for the report. |
Date |
getCreateDate()
Get the date the replet is created. |
EventHandler |
getEventHandler()
Get the client-side event handler of a replet. |
int |
getEventMask()
Return the bitwise OR of the event masks for all events this replet is able to handle. |
Object |
getID()
Get the replet ID. |
Date |
getLastAccessDate()
Get the last access date. |
String |
getName()
Get the replet name. |
Integer |
getOrientation()
Get the orientation of this report. |
Size |
getPageSize()
Get the page size of this report. |
Principal |
getPrincipal()
Get the principal of the user who created this replet. |
ReportSheet |
getPrintReport()
Get the original report with queries executed but scripts not yet executed. |
SelectionEvent[] |
getRegisteredSelections()
Get a list of registered selection events. |
RepletParameters |
getRepletParameters(String reqname)
Get the parameter descriptions of this replet. |
RepletRequest |
getRepletRequest()
Get the last replet request used to generate the report. |
ReportSheet |
getReport()
Get the cached report. |
long |
getReportLastModified()
Get the report last modified time. |
int |
getReportMode()
Get report mode, should be DESIGN_MODE or RUN_MODE. |
boolean |
getSaveParameters()
Determine whether the parameter values are saved and reused. |
ActionListener |
getScheduleActionListener()
Get the schedule action listener. |
VariableTable |
getVariableTable()
Get the variable table. |
RepletCommand |
handleEvent(EventObject e)
Handles replet events. |
RepletCommand |
handleRequestEvent(inetsoft.sree.event.RequestEvent event)
Default handling of request event. |
void |
init(RepletRequest req)
Initialize the replet. |
protected void |
initReport(ReportSheet report,
RepletRequest req)
Initialize the report. |
protected void |
initScript(ReportSheet report)
Initialize the script environment. |
boolean |
isSortOnHeader()
Determine whether tables in this replet will be sorted by the values in a column when that column's header is clicked. |
protected void |
processParameters()
Process parameters. |
void |
processReport(ReportSheet report)
Process report. |
void |
reexecute()
Reexecute the report. |
void |
refreshVariableTable(RepletRequest req)
Refresh variable table using a replet request. |
void |
refreshVariableTable(VariableTable table)
Refresh the variable table. |
void |
regenerate()
Regenerate the report. |
void |
removeAdhocVariables(List variables)
Remove adhoc variables. |
void |
removeAllEventHandlers()
Remove all event handling listeners and client-side handlers. |
void |
removeRepletMenuListener(inetsoft.sree.event.RepletMenuListener listener)
Remove a menu listener. |
void |
removeRepletParameters(String reqname)
Remove a parameter description. |
void |
removeRepletSelectionListener(String eid,
Point item,
inetsoft.sree.event.RepletSelectionListener listener)
Remove a selection listener. |
void |
removeRequestListener(inetsoft.sree.event.RequestListener listener)
Remove a request listener. |
void |
setAdhocVariables(List variables)
Set adhoc variables. |
void |
setCacheTime(long maxtime)
Set whether the report data should be cached. |
void |
setChanged()
Set the changed flag. |
void |
setCreateDate(Date createDate)
Set the date the replet is created. |
void |
setID(Object id)
Set the ID of this replet. |
void |
setLastAccessDate(Date lastAccessDate)
Set the last access date. |
void |
setName(String name)
Set the name of this replet. |
void |
setOrientation(int orient)
Set the orientation of this report, StyleConstants.PORTRAIT or StyleConstants.LANDSCAPE. |
void |
setPageSize(Size pagesize)
Set the page size of this report. |
void |
setPrincipal(Principal principal)
Set the principal of the user who created this replet. |
void |
setRepletRequest(RepletRequest req)
Set the replet request to be used for generating report. |
void |
setReport(ReportSheet report)
Set the report in this replet. |
void |
setReportMode(int mode)
Set report mode, should be DESIGN_MODE or RUN_MODE. |
void |
setSaveParameters(boolean value)
Set whether parameters of this report is to be saved and reused the next time the same user access this report. |
void |
setScheduleActionListener(ActionListener l)
Set the schedule action listener to runtime replet. |
void |
setSortOnHeader(boolean value)
Set whether tables in this replet should be sorted by the values in a column when that column's header is clicked. |
void |
waitForLoaded()
Wait until report is loaded. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected RepletRequest lastreq
protected Principal principal
protected UserCatalog catalog
protected boolean destroyed
protected Vector fieldelems
| Constructor Detail |
|---|
public BasicReplet()
| Method Detail |
|---|
public abstract ReportSheet createReport(RepletRequest req)
throws RepletException
req - replet request, including replet parameter values.
RepletExceptionpublic ReportSheet getReport()
getReport in interface Repletpublic void setReport(ReportSheet report)
public ReportSheet getPrintReport()
getPrintReport in interface Replet
public void init(RepletRequest req)
throws RepletException
init in interface Repletreq - initialization request.
RepletException
protected void initReport(ReportSheet report,
RepletRequest req)
throws RepletException
report - report sheet.req - initialization request.
RepletException
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic void destroy()
destroy in interface Repletpublic void regenerate()
regenerate in interface Repletpublic void reexecute()
reexecute in interface Repletpublic void setChanged()
setChanged in interface Replet
public final ReportSheet generate(RepletRequest req)
throws RepletException
generate in interface Repletreq - replet request, including replet parameter values.
RepletExceptionpublic long getReportLastModified()
getReportLastModified in interface Repletpublic final RepletParameters getRepletParameters(String reqname)
getRepletParameters in interface Repletreqname - request name.
public void addRepletParameters(RepletParameters param)
param - replet parameter description.public void removeRepletParameters(String reqname)
reqname - request name.public void setPageSize(Size pagesize)
pagesize - page size in inches.public Size getPageSize()
public void setOrientation(int orient)
orient - page orientation.public Integer getOrientation()
public void setID(Object id)
setID in interface Repletpublic Object getID()
getID in interface Repletpublic void setName(String name)
setName in interface Repletpublic String getName()
getName in interface Repletpublic String getContextName()
public void setPrincipal(Principal principal)
setPrincipal in interface Repletpublic Principal getPrincipal()
getPrincipal in interface Repletpublic void setReportMode(int mode)
setReportMode in interface Repletmode - the specified report modepublic int getReportMode()
getReportMode in interface Repletpublic final EventHandler getEventHandler()
getEventHandler in interface Repletpublic final int getEventMask()
getEventMask in interface Repletpublic RepletCommand handleEvent(EventObject e)
handleEvent in interface Replete - the EventObject to handle
public void waitForLoaded()
throws RepletException
waitForLoaded in interface RepletRepletException
public void execute(ReportSheet report)
throws Exception
Exception
public void execute(ReportSheet report,
VariableTable vtable)
throws Exception
Exceptionprotected UserCatalog getCatalog()
protected void initScript(ReportSheet report)
public inetsoft.sree.script.RepletScriptable createRepletScriptable(BasicReplet replet)
public RepletRequest getRepletRequest()
getRepletRequest in interface Repletpublic void setRepletRequest(RepletRequest req)
setRepletRequest in interface Replet
public void addLink(String eid,
String replet)
eid - element ID.replet - replet name.
public void addLink(String eid,
Point item,
String replet,
RepletRequest req)
eid - element ID.item - the item inside the element. If it's null, the link
is from the whole element. Otherwise, only clicks inside the
specified item (e.g. cell or band) activates the link.
Use inetsoft.report.event.EventPoint to create a point object.replet - replet name.req - replet request.
public void addLink(String eid,
Point item,
String replet,
RepletRequest req,
String frame)
eid - element ID.item - the item inside the element. If it's null, the link
is from the whole element. Otherwise, only clicks inside the
specified item (e.g. cell or band) activates the link.
Use inetsoft.report.event.EventPoint to create a point object.replet - replet name.req - replet request.frame - the target frame for the link in a browser.
public void addLink(String eid,
Point item,
String toeid,
int row)
eid - source element ID.item - source element item, null to ignore.
Use inetsoft.report.event.EventPoint to create a point object.toeid - target element ID.row - target element row number (if table).
public void addLinkURL(String eid,
Point item,
String url,
String target)
eid - source element ID.item - source element item, null to ignore.
Use inetsoft.report.event.EventPoint to create a point object.url - url string.target - target frame name.
public void addRequest(String eid,
Point item,
RepletRequest req)
eid - element ID.item - the item inside the element. If it's null, the link
is from the whole element. Otherwise, only clicks inside the
specified item (e.g. cell) will activate the link.
Use inetsoft.report.event.EventPoint to create a point object.req - replet request.
public void addStatus(String eid,
Point item,
String msg)
eid - element ID.item - element item.
Use inetsoft.report.event.EventPoint to create a point object.msg - status message.public void addPopupMenu(String[] items)
items - menu items.
public void addPopupMenu(String eid,
Point item,
String[] items)
eid - element ID.item - element item, null to ignore.
Use inetsoft.report.event.EventPoint to create a point object.items - menu items.
public void addMenuAction(String menuitem,
RepletCommand action)
menuitem - menu item name.action - action command.
public void addMenuAction(String eid,
Point item,
String menuitem,
RepletCommand action)
eid - element ID.item - element item, null to ignore.
Use inetsoft.report.event.EventPoint to create a point object.menuitem - menu item.action - menu action command.
public void addFormLink(String form,
String replet)
form - form name.replet - replet name.public void addRepletMenuListener(inetsoft.sree.event.RepletMenuListener listener)
public void removeRepletMenuListener(inetsoft.sree.event.RepletMenuListener listener)
public void addRequestListener(inetsoft.sree.event.RequestListener listener)
public void removeRequestListener(inetsoft.sree.event.RequestListener listener)
public void addRepletSelectionListener(Object src,
Point item,
inetsoft.sree.event.RepletSelectionListener listener)
src - element ID, String or ReportElement.item - element item, null to ignore.
Use inetsoft.report.event.EventPoint to create a point object.listener - the selection listener.
public void removeRepletSelectionListener(String eid,
Point item,
inetsoft.sree.event.RepletSelectionListener listener)
public void removeAllEventHandlers()
public final SelectionEvent[] getRegisteredSelections()
getRegisteredSelections in interface Repletpublic void setSortOnHeader(boolean value)
value - true if tables should be sorted when a header
is clickedpublic boolean isSortOnHeader()
true if tables will be sorted when a header
is clickedpublic void setCacheTime(long maxtime)
maxtime - the maximum time a report is cached, in milliseconds.public long getCacheTime()
public Date getCreateDate()
public void setCreateDate(Date createDate)
createDate - public Date getLastAccessDate()
public void setLastAccessDate(Date lastAccessDate)
lastAccessDate - the last access date.public void setSaveParameters(boolean value)
value - true if parameters should be saved.public boolean getSaveParameters()
true if parameters are saved.protected RepletCommand fireSelectionEvent(SelectionEvent event)
public RepletCommand handleRequestEvent(inetsoft.sree.event.RequestEvent event)
protected RepletCommand fireRequestEvent(inetsoft.sree.event.RequestEvent event)
protected RepletCommand fireRepletMenuEvent(inetsoft.sree.event.RepletMenuEvent event)
protected final void processParameters()
public void processReport(ReportSheet report)
public void refreshVariableTable(VariableTable table)
table - the specified variable table.public void refreshVariableTable(RepletRequest req)
req - the specified replet request contains parameters.public boolean containsVariable(String name)
name - the specified variable name.
public void removeAdhocVariables(List variables)
variables - list stores specified adhoc variables.public void setAdhocVariables(List variables)
variables - list stores specified adhoc variables.public VariableTable getVariableTable()
getVariableTable in interface Repletpublic void applyCalcTableSortOnHeader(inetsoft.report.internal.TableElementDef telem)
public void setScheduleActionListener(ActionListener l)
public ActionListener getScheduleActionListener()
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||