net.sf.jasperreports.jsf.component
Class UIReport

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by net.sf.jasperreports.jsf.component.UIReport
All Implemented Interfaces:
javax.faces.component.StateHolder
Direct Known Subclasses:
UIOutputReport, UISubreport

public abstract class UIReport
extends javax.faces.component.UIComponentBase

Base class for report components.

Author:
A. Alonso Dominguez

Field Summary
static String COMPONENT_FAMILY
          Name used to identify the reports component family.
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
UIReport()
          Instantiates a new UIReport.
 
Method Summary
protected  void decodeReport(javax.faces.context.FacesContext context)
          Decodes the report value.
protected  void decodeSource(javax.faces.context.FacesContext context)
          Decodes the source value into a Source instace.
protected  void executeDecodes(javax.faces.context.FacesContext context)
          Executes the decoding process.
protected  void executeValidate(javax.faces.context.FacesContext context)
          Executes the validation process.
 String getFamily()
          Obtains the family name.
protected  JRFacesContext getJRFacesContext()
          Utility method for obtaining the current JRFacesContext instance.
 String getName()
          Obtains the name of the report.
 ReportConverter getReportConverter()
           
 Object getSource()
          Obtains the established report source.
 SourceConverter getSourceConverter()
          Obtains the current sourceConverter instance.
 net.sf.jasperreports.engine.JasperPrint getSubmittedPrint()
           
 net.sf.jasperreports.engine.JasperReport getSubmittedReport()
          Obtains the interpretted report value.
 Source getSubmittedSource()
          Obtains the interpretted report source.
 javax.faces.validator.Validator getValidator()
          Obtain the report validator instance.
 Object getValue()
          Obtains the current report value.
 boolean isLocalValueSet()
          Used to identify if current value has been programatically set.
 boolean isValid()
          Obtains the valid flag.
 void processDecodes(javax.faces.context.FacesContext context)
          Performs the decoding process in which the source value is interpretted.
 void processValidators(javax.faces.context.FacesContext context)
          Method invoked during the PROCESS_VALIDATORS phase.
 void resetValue()
          Resets the report component state.
 void restoreState(javax.faces.context.FacesContext context, Object state)
           
 Object saveState(javax.faces.context.FacesContext context)
           
 void setName(String name)
          Establishes a new name for the report.
 void setReportConverter(ReportConverter reportConverter)
           
 void setSource(Object source)
          Establishes a new report source.
 void setSourceConverter(SourceConverter converter)
          Establishes a new source sourceConverter instance.
 void setSubmittedPrint(net.sf.jasperreports.engine.JasperPrint submittedPrint)
           
 void setSubmittedReport(net.sf.jasperreports.engine.JasperReport submittedReport)
          Establishes the interpretted report value.
 void setSubmittedSource(Source submittedSource)
          Establishes the value for the report source.
protected  void setValid(boolean valid)
          Establishes the value for the valid flag.
 void setValidator(javax.faces.validator.Validator validator)
          Establishes a new validator instance.
 void setValue(Object value)
          Establishes a new value for this project.
 void validate(javax.faces.context.FacesContext context)
          Validates the current report instance.
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, processUpdates, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId, getValueExpression, setValueExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_FAMILY

public static final String COMPONENT_FAMILY
Name used to identify the reports component family.

Constructor Detail

UIReport

public UIReport()
Instantiates a new UIReport.

Method Detail

getFamily

public final String getFamily()
Obtains the family name.

Specified by:
getFamily in class javax.faces.component.UIComponent
Returns:
the family name.

getSource

public final Object getSource()
Obtains the established report source.

Returns:
the report source.

setSource

public final void setSource(Object source)
Establishes a new report source.

Parameters:
source - the new report source.

getName

public final String getName()
Obtains the name of the report.

Returns:
the name of the report

setName

public final void setName(String name)
Establishes a new name for the report.

Parameters:
name - the new report name.

getValue

public final Object getValue()
Obtains the current report value.

Returns:
the report value

setValue

public final void setValue(Object value)
Establishes a new value for this project.

Parameters:
value - the new value.

isLocalValueSet

public final boolean isLocalValueSet()
Used to identify if current value has been programatically set.

Returns:
true if report's value has been set by means of the setValue method, false otherwise.

getSourceConverter

public final SourceConverter getSourceConverter()
Obtains the current sourceConverter instance.

Returns:
a source sourceConverter instance.

setSourceConverter

public final void setSourceConverter(SourceConverter converter)
Establishes a new source sourceConverter instance.

Parameters:
sourceConverter - a new sourceConverter instance.

getReportConverter

public final ReportConverter getReportConverter()

setReportConverter

public void setReportConverter(ReportConverter reportConverter)

getValidator

public final javax.faces.validator.Validator getValidator()
Obtain the report validator instance.

Returns:
the validator instance.

setValidator

public final void setValidator(javax.faces.validator.Validator validator)
Establishes a new validator instance.

Parameters:
validator - the validator instance.

getSubmittedSource

public final Source getSubmittedSource()
Obtains the interpretted report source.

Returns:
the interpretted report source.

setSubmittedSource

public final void setSubmittedSource(Source submittedSource)
Establishes the value for the report source.

Parameters:
submittedSource - the report source.

getSubmittedReport

public final net.sf.jasperreports.engine.JasperReport getSubmittedReport()
Obtains the interpretted report value.

Returns:
the interpretted report value.

setSubmittedReport

public final void setSubmittedReport(net.sf.jasperreports.engine.JasperReport submittedReport)
Establishes the interpretted report value.

Parameters:
submittedReport - the report value.

getSubmittedPrint

public net.sf.jasperreports.engine.JasperPrint getSubmittedPrint()

setSubmittedPrint

public void setSubmittedPrint(net.sf.jasperreports.engine.JasperPrint submittedPrint)

isValid

public final boolean isValid()
Obtains the valid flag.

Returns:
true is this report is well configured.

setValid

protected final void setValid(boolean valid)
Establishes the value for the valid flag.

Parameters:
valid - if this report is valid.

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIComponentBase

saveState

public Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIComponentBase

resetValue

public void resetValue()
Resets the report component state.


processDecodes

public void processDecodes(javax.faces.context.FacesContext context)
Performs the decoding process in which the source value is interpretted.

Overrides:
processDecodes in class javax.faces.component.UIComponentBase
Parameters:
context - current faces' context.

processValidators

public void processValidators(javax.faces.context.FacesContext context)
Method invoked during the PROCESS_VALIDATORS phase.

Overrides:
processValidators in class javax.faces.component.UIComponentBase
Parameters:
context - current faces' instance.

decodeSource

protected final void decodeSource(javax.faces.context.FacesContext context)
Decodes the source value into a Source instace.

Parameters:
context - current faces' context.

decodeReport

protected final void decodeReport(javax.faces.context.FacesContext context)
Decodes the report value.

Parameters:
context - current faces' context.

validate

public void validate(javax.faces.context.FacesContext context)
              throws javax.faces.validator.ValidatorException
Validates the current report instance.

Parameters:
context - current faces' context
Throws:
javax.faces.validator.ValidatorException - when report configuration is not valid.

getJRFacesContext

protected final JRFacesContext getJRFacesContext()
Utility method for obtaining the current JRFacesContext instance.

Returns:
current JRFacesContext instance.

executeDecodes

protected final void executeDecodes(javax.faces.context.FacesContext context)
Executes the decoding process.

Parameters:
context - current faces' context.

executeValidate

protected final void executeValidate(javax.faces.context.FacesContext context)
Executes the validation process.

Parameters:
context - current faces' context.


Copyright © 2011 SourceForge.net. All Rights Reserved.