Style Intelligence v12.0

inetsoft.sree
Interface Replet

All Known Implementing Classes:
BasicReplet, TemplateReplet

public interface Replet

Replet defines the basic minimum API of a replet. It should not be used directly. All user replets should extend the BasicReplet class.


Field Summary
static int DESIGN_MODE
          Design mode.
static int RUN_MODE
          Run mode.
 
Method Summary
 void destroy()
          Destroy this replet.
 ReportSheet generate(RepletRequest req)
          Generate a report.
 EventHandler getEventHandler()
          Get the client-side event handler.
 int getEventMask()
          Return the bitwise OR of all event masks this replet likes to receive events.
 Object getID()
          Get the replet ID.
 String getName()
          Get the replet name.
 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 last replet request used to generate the report of current replet.
 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.
 VariableTable getVariableTable()
          Get the variable table.
 RepletCommand handleEvent(EventObject e)
          Process an event.
 void init(RepletRequest req)
          Initialize the replet.
 void reexecute()
          Reexecute the report.
 void regenerate()
          Regenerate the report.
 void setChanged()
          Set the changed flag.
 void setID(Object id)
          Set the ID of this replet.
 void setName(String name)
          Set the name of this replet.
 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 setReportMode(int mode)
          Set report mode, should be DESIGN_MODE or RUN_MODE.
 void waitForLoaded()
          Wait until report is loaded.
 

Field Detail

DESIGN_MODE

static final int DESIGN_MODE
Design mode. Indicate the status of report. Design mode indicates report is under pure schema design, only meta data will be presented.

See Also:
Constant Field Values

RUN_MODE

static final int RUN_MODE
Run mode. Indicate the status of report. Reports under run mode will not be editable and will retrieve real data from datasource for presentation.

See Also:
Constant Field Values
Method Detail

init

void init(RepletRequest req)
          throws RepletException
Initialize the replet.

Parameters:
req - initialization request.
Throws:
RepletException

setPrincipal

void setPrincipal(Principal principal)
Set the principal of the user who created this replet.


getPrincipal

Principal getPrincipal()
Get the principal of the user who created this replet.


setID

void setID(Object id)
Set the ID of this replet.


getID

Object getID()
Get the replet ID.


setName

void setName(String name)
Set the name of this replet.


getName

String getName()
Get the replet name.


setReportMode

void setReportMode(int mode)
Set report mode, should be DESIGN_MODE or RUN_MODE.

Parameters:
mode - the specified report mode

getReportMode

int getReportMode()
Get report mode, should be DESIGN_MODE or RUN_MODE.

Returns:
report mode

regenerate

void regenerate()
                throws RepletException
Regenerate the report. This calls the createReport() method with the last replet request. The internal report object is refreshed with the newly created report object.

Throws:
RepletException

reexecute

void reexecute()
Reexecute the report. When generating report next time, the internal report will be executed.


setChanged

void setChanged()
Set the changed flag.


getVariableTable

VariableTable getVariableTable()
Get the variable table.

Returns:
the variable table.

getRegisteredSelections

SelectionEvent[] getRegisteredSelections()
Get a list of registered selection events. These are the events this replet is interested in.


getEventMask

int getEventMask()
Return the bitwise OR of all event masks this replet likes to receive events.

Returns:
event mask.

getRepletParameters

RepletParameters getRepletParameters(String reqname)
Get the parameter descriptions of this replet. The parameter descriptions are used to construct a parameter prompting dialog to interactively collect parameter values from users.

Parameters:
reqname - request name;
Returns:
replet parameter description.

getReport

ReportSheet getReport()
Get the cached report. This may be null if the generate() has not been called.


waitForLoaded

void waitForLoaded()
                   throws RepletException
Wait until report is loaded.

Throws:
RepletException

getPrintReport

ReportSheet getPrintReport()
Get the original report with queries executed but scripts not yet executed. This method is called to get a report for printing or exporting in case the report needs to be re-generated.


generate

ReportSheet generate(RepletRequest req)
                     throws RepletException
Generate a report. If the the request parameter is null, this is a request to refresh the report. How a replet refresh a report is defined by the replet itself. It may or may not involve re-querying the data in the report.

Parameters:
req - replet request, including replet parameter values.
Returns:
generated report.
Throws:
RepletException

getEventHandler

EventHandler getEventHandler()
Get the client-side event handler. It returns a collection of event to command map. Each event, when triggered in a client, causes the corresponding command to be executed in the client. This is done entirely on the client-side with no server intervention.

Returns:
client-side event/command mapping.

handleEvent

RepletCommand handleEvent(EventObject e)
Process an event. This method is only invoked for the events that is in the mask returned from the init() method.

Parameters:
e - event object.
Returns:
viewer command.

getReportLastModified

long getReportLastModified()
Get the report last modified time.


getRepletRequest

RepletRequest getRepletRequest()
Get last replet request used to generate the report of current replet. The request is reused when a regenerate() is called.

Returns:
last replet request of current replet.

setRepletRequest

void setRepletRequest(RepletRequest req)
Set the replet request to be used for generating report.


destroy

void destroy()
Destroy this replet. It is called when this replet is no longer needed.


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