public abstract class AbstractReport extends java.lang.Object implements ReportInterface, ItemsProvider
ASCENDING, DESCENDING, FLAG_ADD_CONTEXT_MENU_METHOD, FLAG_NONE, FLAG_NOT_PART_OF_COLUMNS, FLAG_NOT_PART_OF_CSVCOLUMN, FLAG_NOT_PART_OF_LINES, FLAG_RENDER_ITEM_IMAGE, FLAG_RENDER_READ_ONLY, FLAG_RENDER_REFERENCE_ITEM_IMAGE, FLAG_RENDER_VALUE_AS_CHECKBOX, FLAG_RENDER_VALUE_AS_IMAGEPROP, FLAG_RENDER_VALUE_WITH_METHODLINK, FLAG_SORT_BY_DEFAULT_ASC, FLAG_SORT_BY_DEFAULT_DESC, FLAG_SORT_ICON_INVISIBLE, FLAG_VISIBLE_ALWAYS, FLAG_VISIBLE_BY_DEFAULT
Constructor and Description |
---|
AbstractReport(java.util.Locale locale) |
Modifier and Type | Method and Description |
---|---|
void |
addAccessor(boolean visibleByDefault,
PropertyAccessor pa) |
void |
addAccessor(PropertyAccessor pa,
int flags) |
void |
addDynamicColumns(java.lang.String extptId,
java.lang.String reportName,
Connector con)
Dynamically add accessors to this report based on registered extensions
for given extension point
|
boolean |
appendUserHeading(java.lang.String name)
Append a user heading element for this report
NOTE: If a heading is set, then only these headings will be given back on the next execute.
|
void |
clearCommands()
Clear set of commands to be rendered (for example in a toolbar) for this report.
|
AbstractReport |
duplicate(java.lang.String conceptName,
java.util.Locale locale) |
void |
endProcess()
Notify that processing of this report has finished
|
void |
execute()
Compute the report.
|
java.util.HashMap |
getAccessor()
Get hashmap containing accessors for all headings
|
java.util.List |
getAllHeadings()
Get all the heading that can be displayed in a table for this type
|
java.util.List |
getAllHeadingsNotPartOfColumn()
Get all line properties that are not displayed as column (eg description)
|
java.util.List |
getCommands()
Get set of commands to be rendered (for example in a toolbar) for this report.
|
java.util.List |
getContextMenuCommands(Item item)
Obtain the commands list to be displayed on context menu request.
|
java.util.List |
getFixedColumnHeadings()
Get the list of headers/columns for this report which shall always be visible
|
java.util.List |
getHeadings()
Get the list of visible headers/columns for this report
|
java.util.List |
getHeadingsNotPartOfColumn()
Get all line properties that are not displayed as column (eg description)
|
java.lang.String |
getId()
Get id for type of report
|
Item |
getItem()
Get the Item this report is based on
|
Item |
getItem(java.lang.Object object)
Provide an item to be rendered
|
java.util.Collection |
getItems()
Provide items to be rendered
|
java.util.Locale |
getLocale()
Obtain Locale for this command
|
java.lang.String |
getNonEmptyTitle() |
com.softwareag.cis.plugin.command.Command |
getOnSelectCommand(Item item)
Obtain the command to be executed when selecting a row in the report
|
PropertyAccessor |
getPropertyAccessor(java.lang.String internalName)
Get PropertyAccessor for given internal name of heading
|
int |
getPropertyAccessorFlags(java.lang.String internalName)
Get flags for PropertyAccessor
|
RowIterator |
getRows()
Get the rows of the report
|
Item |
getSelectedItem() |
java.util.List |
getToolbarCommands()
Obtain the commands list to be displayed within the report toolbar.
|
boolean |
hasPropertyAccessorWithFlag(java.lang.String internalName,
int flags)
Check whether given flags are set for PropertyAccessor
|
boolean |
hasUserConfiguration()
Method can be used to determine if for current user a
configuration exist.
|
boolean |
implicitlyAddRefreshCommand()
Check whether the standard "Refresh" command shall implicitly be added
to this report's toolbar
|
boolean |
implicitlyAddSaveReportCommand()
Check whether the standard "Save Report" command shall implicitly be added
to this report's toolbar.
|
boolean |
implicitlyAddSelectColumnsCommand()
Check whether the standard "Select Columns" command shall implicitly be added
to this report's toolbar.
|
void |
initializeUserHeadings(Connector con)
Initialize the user selected headings.
|
void |
initializeUserHeadings(GUIConfigurationExt config,
java.lang.String user,
java.lang.String password)
Initialize the user selected headings.
|
java.util.Collection |
prepareItems()
Prepare items to get them in subsequent calls to getItem(Object object)
|
void |
removeCommand(java.lang.Class commandClass)
Remove command corresponding to given class from set of commands
|
void |
resetUserHeadings()
Reset the current user heading - that way you can add new ones using setUserHeading()
|
void |
setItem(Item item)
Set the Item to get the report on
|
void |
setItemsProvider(ItemsProvider itemsProvider)
Set data source providing set of items to be rendered
|
void |
setLocale(java.util.Locale lc)
Set Locale for this command
|
void |
setSelectedItem(Item selectedItem) |
boolean |
supportsDelayedRead() |
void |
suppressColumns(java.lang.String extptId,
AbstractReport report,
java.lang.String conceptName,
Connector con)
Dynamically supress properties for this report based on registered extensions
for given extension point
|
void |
suppressProperty(java.lang.String propertyName) |
java.lang.String |
toXhtml()
Transform the report to XHTML.
|
java.lang.String |
toXhtml(Connector connector)
Transform the report to XHTML.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription, getImageURL, getTitle
public AbstractReport duplicate(java.lang.String conceptName, java.util.Locale locale) throws java.lang.IllegalAccessException, java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.InstantiationException
public java.lang.String getId()
getId
in interface ReportInterface
public java.util.HashMap getAccessor()
ReportInterface
getAccessor
in interface ReportInterface
public PropertyAccessor getPropertyAccessor(java.lang.String internalName)
ReportInterface
getPropertyAccessor
in interface ReportInterface
internalName
- internal name of headingpublic int getPropertyAccessorFlags(java.lang.String internalName)
internalName
- internal name of PropertyAccessorjava.lang.NullPointerException
- if invalid propertyName specifiedpublic boolean hasPropertyAccessorWithFlag(java.lang.String internalName, int flags)
ReportInterface
hasPropertyAccessorWithFlag
in interface ReportInterface
internalName
- internal name of PropertyAccessorflags
- flags to be tested whether set for PropertyAccessorpublic void addAccessor(boolean visibleByDefault, PropertyAccessor pa)
public void addAccessor(PropertyAccessor pa, int flags)
public java.util.List getAllHeadingsNotPartOfColumn()
ReportInterface
getAllHeadingsNotPartOfColumn
in interface ReportInterface
public java.util.List getHeadingsNotPartOfColumn()
ReportInterface
getHeadingsNotPartOfColumn
in interface ReportInterface
public void suppressProperty(java.lang.String propertyName)
public void setItem(Item item)
ReportInterface
setItem
in interface ReportInterface
public Item getItem()
ReportInterface
getItem
in interface ReportInterface
public void setSelectedItem(Item selectedItem)
public Item getSelectedItem()
public java.util.List getCommands()
getCommands
in interface ReportInterface
public void clearCommands()
public void removeCommand(java.lang.Class commandClass)
removeCommand
in interface ReportInterface
commandClass
- class of command to be removedpublic boolean implicitlyAddRefreshCommand()
implicitlyAddRefreshCommand
in interface ReportInterface
public boolean implicitlyAddSelectColumnsCommand()
implicitlyAddSelectColumnsCommand
in interface ReportInterface
public boolean implicitlyAddSaveReportCommand()
implicitlyAddSaveReportCommand
in interface ReportInterface
public java.util.List getHeadings()
ReportInterface
getHeadings
in interface ReportInterface
public java.util.List getFixedColumnHeadings()
ReportInterface
getFixedColumnHeadings
in interface ReportInterface
public java.util.List getAllHeadings()
ReportInterface
getAllHeadings
in interface ReportInterface
public RowIterator getRows()
ReportInterface
getRows
in interface ReportInterface
public final void execute() throws java.lang.Exception
ReportInterface
execute
in interface ReportInterface
java.lang.Exception
public java.lang.String toXhtml()
toXhtml
in interface ReportInterface
public java.lang.String toXhtml(Connector connector)
ReportInterface
toXhtml
in interface ReportInterface
public java.lang.String getNonEmptyTitle()
getNonEmptyTitle
in interface ReportInterface
public boolean supportsDelayedRead()
supportsDelayedRead
in interface ItemsProvider
public java.util.Collection prepareItems() throws java.lang.Exception
prepareItems
in interface ItemsProvider
java.lang.Exception
public Item getItem(java.lang.Object object) throws java.lang.Exception
getItem
in interface ItemsProvider
java.lang.Exception
public java.util.Collection getItems() throws java.lang.Exception
getItems
in interface ItemsProvider
java.lang.Exception
public void initializeUserHeadings(Connector con)
initializeUserHeadings
in interface ReportInterface
con
- the Connector allowing access to the user settingspublic void initializeUserHeadings(GUIConfigurationExt config, java.lang.String user, java.lang.String password)
initializeUserHeadings
in interface ReportInterface
config
- user configurationuser
- user name used to obtained selected headings.password
- user passwordpublic boolean appendUserHeading(java.lang.String name)
ReportInterface
appendUserHeading
in interface ReportInterface
name
- heading namepublic void resetUserHeadings()
ReportInterface
resetUserHeadings
in interface ReportInterface
ReportInterface.appendUserHeading(String)
public com.softwareag.cis.plugin.command.Command getOnSelectCommand(Item item)
getOnSelectCommand
in interface ReportInterface
item
- public void setItemsProvider(ItemsProvider itemsProvider)
setItemsProvider
in interface ReportInterface
itemsProvider
- public void addDynamicColumns(java.lang.String extptId, java.lang.String reportName, Connector con)
extptId
- extension point to be used to check for dynamic extensionsreportName
- the name of the report to be checked for dynamic columns to be addedcon
- the Connectorpublic void suppressColumns(java.lang.String extptId, AbstractReport report, java.lang.String conceptName, Connector con)
extptId
- extension point to be used to check for dynamic extensionsconceptName
- name of concept where we may suppress columns forcon
- the Connectorpublic void setLocale(java.util.Locale lc)
lc
- public java.util.Locale getLocale()
public void endProcess()
endProcess
in interface ReportInterface
public java.util.List getContextMenuCommands(Item item)
ReportInterface
getContextMenuCommands
in interface ReportInterface
Can be overridden by implementors in order to provide
custom list of commands.
public java.util.List getToolbarCommands()
ReportInterface
getToolbarCommands
in interface ReportInterface
Can be overridden by implementors in order to provide
custom list of commands.
public boolean hasUserConfiguration()
hasUserConfiguration
in interface ReportInterface