RM
- as ReporterMeta
typepublic class Exporters<RM extends ReporterMeta>
extends org.apache.wicket.markup.html.WebMarkupContainer
ReporterMeta
Modifier and Type | Field and Description |
---|---|
protected AuthorizationModule<Void> |
authorizationModule |
Constructor and Description |
---|
Exporters(String id,
org.apache.wicket.model.IModel<RM> model,
Object[] params) |
Modifier and Type | Method and Description |
---|---|
String |
constructExportResourceName(RM reporterMeta,
ExportType exportType)
Create file name as report_report name or Id_datetime.extension
|
protected Reporter<Object[]> |
createProxyReporter(User user,
ReporterMeta reporterMeta,
ExportType exportType)
The
Reporter for export may require some modification to Data and headers/Columns due to an override using ExportMeta or Authorizable definitions
in the ReporterMeta.getColumnToEntityValueMapping() |
protected void |
export(User user,
ExportType exportType,
Map<Integer,Authorizable> authorizableColumns)
Export a file as
IResourceStreamWriter so it can be downloaded |
protected boolean |
filter(User user,
Authorizable authorizable) |
protected boolean |
filter(User user,
ExportType exportType)
By default Filter Authorizable Columns(FacetMeta) that are not meant for current user
Filter the EXPORT type option based on Authorization |
protected Map<Integer,Authorizable> |
getAuthorizableColumns(ReporterMeta reporterMeta)
Looks for
Authorizable column definitions in values of ReporterMeta.getColumnToEntityValueMapping() |
Object[] |
getParams()
Supply the
Reporter additional params, if supported/necessary |
void |
onInitialize() |
void |
setParams(Object[] params)
Supply the
Reporter additional params, if supported/necessary |
getMarkupType, getWebPage, getWebRequest
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getBehaviors, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, internalOnModelChanged, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, onAfterRender, onAttach, onBeforeRender, onBeginRequest, onComponentTag, onConfigure, onDetach, onEndRequest, onModelChanged, onModelChanging, onRemove, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap
protected AuthorizationModule<Void> authorizationModule
protected boolean filter(User user, ExportType exportType)
protected boolean filter(User user, Authorizable authorizable)
protected void export(User user, ExportType exportType, Map<Integer,Authorizable> authorizableColumns)
IResourceStreamWriter
so it can be downloadeduser
- exportType
- authorizableColumns
- public void onInitialize()
onInitialize
in class org.apache.wicket.Component
public String constructExportResourceName(RM reporterMeta, ExportType exportType)
reporterMeta
- as RMexportType
- as ExportTypeprotected Map<Integer,Authorizable> getAuthorizableColumns(ReporterMeta reporterMeta)
Authorizable
column definitions in values of ReporterMeta.getColumnToEntityValueMapping()
reporterMeta
- Map
of Column Name to Authorizable
@nullable trueprotected Reporter<Object[]> createProxyReporter(User user, ReporterMeta reporterMeta, ExportType exportType) throws Exception
Reporter
for export may require some modification to Data and headers/Columns due to an override using ExportMeta
or Authorizable
definitions
in the ReporterMeta.getColumnToEntityValueMapping()
user
- as User
reporterMeta
- as ReporterMeta
exportType
- as ExportType
Exception
public Object[] getParams()
Reporter
additional params, if supported/necessaryCopyright © 2018. All rights reserved.