org.gcube.application.reporting
Interface Modeler

All Known Implementing Classes:
ReportsModeler

public interface Modeler

Author:
Massimiliano Assante - ISTI, CNR

Method Summary
 boolean addAttributeComponent(String attrName, ArrayList<org.gcube.portlets.d4sreporting.common.shared.Attribute> values, boolean allowMultiselection)
          Add a attribute component to the model instance, allow to specify if is editable or not
 boolean addHeading(int level)
          add an empty fillable heading
 boolean addHeading(int level, String content)
          add an heading with a non editable content
 boolean addHeading(int level, String content, boolean isReadonly)
           
 boolean addInstruction(String content)
          add an instruction
 boolean addMedia()
          add the possibility to enter text, table or images in the report
 boolean addReference(ReferenceReportType refType, List<DBTableRow> dBTableRows)
          add the references
 boolean addTextInput()
          add an empty fillable text input
 boolean addTextInput(String content)
          add a text input with some pre entered text
 boolean addTextInput(String content, boolean isReadonly)
          add text input
 boolean addTitle()
          add an empty fillable title
 boolean addTitle(String content, boolean isReadonly)
           
 int nextSection()
          add a section, every add will point to this new section
 

Method Detail

addTitle

boolean addTitle()
add an empty fillable title

Returns:
true if the operation is performed with success, false otherwise

addTitle

boolean addTitle(String content,
                 boolean isReadonly)
Parameters:
content - the content you want to show in the title
isReadonly - tells wether the user can edit the content ot not
Returns:
true if the operation is performed with success, false otherwise

addHeading

boolean addHeading(int level)
                   throws IllegalArgumentException
add an empty fillable heading

Parameters:
level - of the heading
Returns:
true if the operation is performed with success, false otherwise
Throws:
IllegalArgumentException - if the heading is not [1, 5]

addHeading

boolean addHeading(int level,
                   String content)
                   throws IllegalArgumentException
add an heading with a non editable content

Parameters:
level - of the heading
content - the content you want to show in the heading
Returns:
true if the operation is performed with success, false otherwise
Throws:
IllegalArgumentException - if the heading is not [1, 5]

addHeading

boolean addHeading(int level,
                   String content,
                   boolean isReadonly)
                   throws IllegalArgumentException
Parameters:
level - of the heading
content - the content you want to show in the heading
isReadonly - tells wether the user can edit the content ot not
Returns:
true if the operation is performed with success, false otherwise
Throws:
IllegalArgumentException - if the heading is not [1, 5]

addTextInput

boolean addTextInput()
add an empty fillable text input

Returns:
true if the operation is performed with success, false otherwise

addTextInput

boolean addTextInput(String content)
add a text input with some pre entered text

Parameters:
content - the content you want to show in the textbox
Returns:
true if the operation is performed with success, false otherwise

addTextInput

boolean addTextInput(String content,
                     boolean isReadonly)
add text input

Parameters:
content - the content you want to show in the textbox
isReadonly - tells wether the user can edit the content ot not
Returns:
true if the operation is performed with success, false otherwise

addInstruction

boolean addInstruction(String content)
add an instruction

Parameters:
content - the content you want to show in the instruction
Returns:
true if the operation is performed with success, false otherwise

addAttributeComponent

boolean addAttributeComponent(String attrName,
                              ArrayList<org.gcube.portlets.d4sreporting.common.shared.Attribute> values,
                              boolean allowMultiselection)
Add a attribute component to the model instance, allow to specify if is editable or not

Parameters:
type - the type of the component
payload - the payload, a text if is a heading or body, an encoded base64 string if an image and so on
isEditable - allow the component to be edited or not

addReference

boolean addReference(ReferenceReportType refType,
                     List<DBTableRow> dBTableRows)
add the references

Parameters:
list - of @see Tuple
refType - the reference type
Returns:
true if the operation is performed with success, false otherwise

addMedia

boolean addMedia()
add the possibility to enter text, table or images in the report

Returns:

nextSection

int nextSection()
add a section, every add will point to this new section

Returns:
the index of the new section


Copyright © 2013. All Rights Reserved.