org.gcube.application.reporting
Class ReportsModeler

java.lang.Object
  extended by org.gcube.application.reporting.ReportsModeler
All Implemented Interfaces:
Modeler, Sequentiable

public final class ReportsModeler
extends Object
implements Modeler, Sequentiable

Author:
massi

Field Summary
static String DEFAULT_NAME
          Styling attr, not used anymore but needed for backward compatibility
 
Fields inherited from interface org.gcube.application.reporting.Modeler
TEMPLATE_HEIGHT, TEMPLATE_WIDTH
 
Constructor Summary
ReportsModeler(String id, String name, String author, Date dateCreated, Date lastEdit, String lastEditorId)
           
 
Method Summary
 boolean addAttributeComponent(String attrName, ArrayList<Box> values, boolean allowMultiselection)
          Add a attribute component to the model instance, allow to specify if is editable or not
 boolean addAttributeComponent(String attrName, ArrayList<Box> values, boolean allowMultiselection, Property... properties)
          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)
          
 boolean addMedia()
          add the possibility to enter text, table or images in the report
 boolean addReference(ReferenceReport ref)
          add the references of a given type
 boolean addSequence(ReportSequence seq)
          add a sequence
 boolean addTextInput(Property... properties)
          add an empty fillable text input
 boolean addTextInput(String content, boolean isReadOnly, Property... properties)
          add text input
 boolean addTextInput(String content, Property... properties)
          add a text input with some pre entered text
 boolean addTitle()
          add an empty fillable title
 boolean addTitle(String content, boolean isReadonly)
          
 org.gcube.portlets.d4sreporting.common.shared.Model getReportInstance()
           
 int nextSection()
          add a section, every add will point to this new section
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NAME

public static final String DEFAULT_NAME
Styling attr, not used anymore but needed for backward compatibility

See Also:
Constant Field Values
Constructor Detail

ReportsModeler

public ReportsModeler(String id,
                      String name,
                      String author,
                      Date dateCreated,
                      Date lastEdit,
                      String lastEditorId)
Parameters:
a - the report unique idenntifier
name - the report name
author - the author
dateCreated -
lastEdit -
lastEditorId - last editor username
Method Detail

addTitle

public boolean addTitle()
add an empty fillable title

Specified by:
addTitle in interface Modeler
Returns:
true if the operation is performed with success, false otherwise

addTitle

public boolean addTitle(String content,
                        boolean isReadonly)

Specified by:
addTitle in interface Modeler
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

public boolean addHeading(int level)
add an empty fillable heading

Specified by:
addHeading in interface Sequentiable
Parameters:
level - of the heading
Returns:
true if the operation is performed with success, false otherwise

addHeading

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

Specified by:
addHeading in interface Sequentiable
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

addHeading

public boolean addHeading(int level,
                          String content,
                          boolean isReadonly)

Specified by:
addHeading in interface Sequentiable
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

addTextInput

public boolean addTextInput(Property... properties)
add an empty fillable text input

Specified by:
addTextInput in interface Sequentiable
Parameters:
properties - additional properties that one may need, optional
Returns:
true if the operation is performed with success, false otherwise

addTextInput

public boolean addTextInput(String content,
                            Property... properties)
add a text input with some pre entered text

Specified by:
addTextInput in interface Sequentiable
Parameters:
content - the content you want to show in the textbox
properties - additional properties that one may need, optional
Returns:
true if the operation is performed with success, false otherwise

addTextInput

public boolean addTextInput(String content,
                            boolean isReadOnly,
                            Property... properties)
add text input

Specified by:
addTextInput in interface Sequentiable
Parameters:
content - the content you want to show in the textbox
properties - additional properties that one may need, optional
Returns:
true if the operation is performed with success, false otherwise

addInstruction

public boolean addInstruction(String content)

Specified by:
addInstruction in interface Sequentiable
Returns:

addReference

public boolean addReference(ReferenceReport ref)
add the references of a given type

Specified by:
addReference in interface Sequentiable
Parameters:
ref - @see ReferenceReport
Returns:
true if the operation is performed with success, false otherwise

addAttributeComponent

public boolean addAttributeComponent(String attrName,
                                     ArrayList<Box> values,
                                     boolean allowMultiselection)
Description copied from interface: Sequentiable
Add a attribute component to the model instance, allow to specify if is editable or not

Specified by:
addAttributeComponent in interface Sequentiable

addAttributeComponent

public boolean addAttributeComponent(String attrName,
                                     ArrayList<Box> values,
                                     boolean allowMultiselection,
                                     Property... properties)
Description copied from interface: Sequentiable
Add a attribute component to the model instance, allow to specify if is editable or not

Specified by:
addAttributeComponent in interface Sequentiable
properties - additional properties that one may need, optional

addSequence

public boolean addSequence(ReportSequence seq)
add a sequence

Specified by:
addSequence in interface Modeler
Returns:
true if the operation is performed with success, false otherwise

addMedia

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

Specified by:
addMedia in interface Modeler
Returns:

nextSection

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

Specified by:
nextSection in interface Modeler
Returns:
the index of the new section

getReportInstance

public org.gcube.portlets.d4sreporting.common.shared.Model getReportInstance()
                                                                      throws Exception
Throws:
Exception


Copyright © 2013. All Rights Reserved.