org.gcube.portlets.user.reportgenerator.client.Presenter
Class Presenter

java.lang.Object
  extended by org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter

public class Presenter
extends Object

Author:
Massimiliano Assante, ISTI-CNR - massimiliano.assante@isti.cnr.it

Constructor Summary
Presenter()
          constructor
 
Method Summary
 void addCitation(String citekey, String text)
          called when a citation is added
 void addTextToolBar(boolean enableCommands)
           
 void changeTemplateName(String templateName)
           
 void cleanAll()
          remove the user-added components from the workspace, and from the model
 void cleanAllNotSession()
          just clean the page
 void cleanWorkspace()
          remove the user-added components from the workspace (in the current page) but not from the model
 void clearExportPanel()
           
 void discardCurrentSection()
          to remove the current displayed section
 void enableBiblioEntry(com.google.gwt.user.client.ui.RichTextArea d4sArea)
          enable the format text toolbar for the given Rich Textarea passed as argument
 void enableTextToolBar(com.google.gwt.user.client.ui.RichTextArea d4sArea)
          enable the format text toolbar for the given Rich Textarea passed as argument
 void generateFiMES(TemplateModel model)
          generate the docx to be passed to the fimesExporter
 void generateManifestation(TemplateModel model, ExportManifestationType type)
           
 AddCommentEvent getComponentComments(com.google.gwt.user.client.ui.Widget toCheck)
          look if a comment with a specific metadata (that indicate sit is a comment) exists in the current report model:
 String getCurrentScope()
           
 RichTextToolbar getCurrentSelected()
           
 UserBean getCurrentUser()
           
 com.google.gwt.event.shared.HandlerManager getEventBus()
           
 com.google.gwt.user.client.ui.HorizontalPanel getExportsPanel()
           
 Headerbar getHeader()
           
 String getHost()
           
 Coords getInsertionPoint()
           
 boolean getMenuForWorkflowDocument()
           
 TemplateModel getModel()
           
 int getSelectedIndex()
           
 TitleBar getTitleBar()
           
 ToolboxPanel getToolBoxPanel()
           
 VMETypeIdentifier getTypeIdFromString(String theType)
          this method translate the VME ReportRef String in an ENUM
 void getUrl()
          Get URL from browser
 WorkspacePanel getWp()
           
 boolean hasBibliography()
          look if a section with a specific metadata (that indicate sit is a biblio section) exists in the current report model: check whether the last section has Metadata "isBiblio" = "true" or false
 boolean hasComments(com.google.gwt.user.client.ui.Widget toCheck)
          look if a comment with a specific metadata (that indicate sit is a comment) exists in the current report model:
 void importSection(org.gcube.portlets.d4sreporting.common.shared.Model toLoad, int sectionNoToimport, int beforeSection, boolean asLastSection)
          Import a Section in the View and in the Model
 void importVMETemplate(VMETypeIdentifier type)
           
 void nextPageButtonClicked()
          called when nextPage Button is Clicked
 void openAddCitationDialog()
           
 void openManageCitationsDialog()
           
 void openTemplate(String templateToOpen, String templateObjectID, boolean isTemplate)
          load the template to edit in the MODEL and in the VIEW
 void placeTemplatePageElements(int section)
          It places back the user added widgets (TemplateComponents) in the page
 void prevPageButtonClicked()
          called when prevPage Button is Clicked
 void refreshWorkspace()
          refresh the root in the workspace
 boolean removeCitation(String citekey)
           
 void resizeTemplateComponentInModel(com.google.gwt.user.client.ui.Widget toResize, int newWidth, int newHeight)
          Resize the template componet just the model
 void resizeWorkingArea(int width, int height)
           
 void saveReport()
          Save the current report in a given folder
 void saveReport(String folderid, String name)
          Save the current report
 void seekLastPage()
          in case someone imported a new section
 void seekSection(int sect2Seek)
          in case someone imported a new section
 void setAreaForBiblio(com.google.gwt.user.client.ui.RichTextArea d4sArea)
           
 void setClientSequenceSelected(ClientSequence toSet)
           
 void setCurrCursorPos(int y)
           
 void setExportsPanel(com.google.gwt.user.client.ui.HorizontalPanel exportsPanel)
           
 void setHeader(Headerbar header)
           
 void setMenuForWorkflowDocument(boolean enable)
           
 void setTitleBar(TitleBar titleBar)
           
 void setToolBoxPanel(ToolboxPanel toolBoxPanel)
           
 void setWp(WorkspacePanel wp)
           
 void showExportPanel(String filePath, String itemName, org.gcube.portlets.widgets.exporter.shared.TypeExporter type, String tempFileId)
           
 void showExportSaveOptions(String filePath, String itemName, org.gcube.portlets.widgets.exporter.shared.TypeExporter type)
          when export is done this method is called
 void showLoading()
           
 void showOpenOptions()
           
 void showUploadFilePopup()
          show the upload file popup
 void showVMEImportDialog()
           
 void showVMERefAssociateDialog(VMETypeIdentifier refType)
           
 void showVMEReportRefImportDialog(VMETypeIdentifier refType)
           
 void toggleReportStructure()
           
 void updateWorkflowDocument(boolean update)
          Save the current report in a given folder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Presenter

public Presenter()
constructor

Method Detail

getEventBus

public com.google.gwt.event.shared.HandlerManager getEventBus()

setClientSequenceSelected

public void setClientSequenceSelected(ClientSequence toSet)

showOpenOptions

public void showOpenOptions()

showLoading

public void showLoading()

openTemplate

public void openTemplate(String templateToOpen,
                         String templateObjectID,
                         boolean isTemplate)
load the template to edit in the MODEL and in the VIEW

Parameters:
templateToOpen - the name of the template to open without extension nor path
templateObjectID - the id in the folder of the template to open
isTemplate - true if you are opening a template false if you are opening a report

addCitation

public void addCitation(String citekey,
                        String text)
called when a citation is added

Parameters:
citekey - .
text - .

removeCitation

public boolean removeCitation(String citekey)

hasBibliography

public boolean hasBibliography()
look if a section with a specific metadata (that indicate sit is a biblio section) exists in the current report model: check whether the last section has Metadata "isBiblio" = "true" or false

Returns:
true if bibliography is present yet false otherwise

hasComments

public boolean hasComments(com.google.gwt.user.client.ui.Widget toCheck)
look if a comment with a specific metadata (that indicate sit is a comment) exists in the current report model:

Returns:
true if comment is present yet false otherwise

getComponentComments

public AddCommentEvent getComponentComments(com.google.gwt.user.client.ui.Widget toCheck)
look if a comment with a specific metadata (that indicate sit is a comment) exists in the current report model:

Returns:
true if comment is present yet false otherwise

discardCurrentSection

public void discardCurrentSection()
to remove the current displayed section


setTitleBar

public void setTitleBar(TitleBar titleBar)
Parameters:
titleBar - ,

getHost

public String getHost()
Returns:
.

cleanAll

public void cleanAll()
remove the user-added components from the workspace, and from the model


cleanWorkspace

public void cleanWorkspace()
remove the user-added components from the workspace (in the current page) but not from the model


saveReport

public void saveReport(String folderid,
                       String name)
Save the current report

Parameters:
folderid - the id where to save the report

saveReport

public void saveReport()
Save the current report in a given folder


updateWorkflowDocument

public void updateWorkflowDocument(boolean update)
Save the current report in a given folder


changeTemplateName

public void changeTemplateName(String templateName)
Parameters:
templateName - .

getUrl

public void getUrl()
Get URL from browser


importSection

public void importSection(org.gcube.portlets.d4sreporting.common.shared.Model toLoad,
                          int sectionNoToimport,
                          int beforeSection,
                          boolean asLastSection)
Import a Section in the View and in the Model

Parameters:
toLoad - the SerializableModel instance where toget the section
sectionNoToimport - section to import 0 -> n-1
beforeSection - say where to import this section (before)
asLastSection - say to import this section as last section in the curren template / report

seekLastPage

public void seekLastPage()
in case someone imported a new section


seekSection

public void seekSection(int sect2Seek)
in case someone imported a new section

Parameters:
sect2Seek - .

addTextToolBar

public void addTextToolBar(boolean enableCommands)

enableTextToolBar

public void enableTextToolBar(com.google.gwt.user.client.ui.RichTextArea d4sArea)
enable the format text toolbar for the given Rich Textarea passed as argument

Parameters:
d4sArea - the enabled text area

enableBiblioEntry

public void enableBiblioEntry(com.google.gwt.user.client.ui.RichTextArea d4sArea)
enable the format text toolbar for the given Rich Textarea passed as argument

Parameters:
d4sArea - the enabled text area

generateFiMES

public void generateFiMES(TemplateModel model)
generate the docx to be passed to the fimesExporter

Parameters:
model -

generateManifestation

public void generateManifestation(TemplateModel model,
                                  ExportManifestationType type)
Parameters:
model - .
type - .

openAddCitationDialog

public void openAddCitationDialog()

openManageCitationsDialog

public void openManageCitationsDialog()

getHeader

public Headerbar getHeader()
Returns:
.

getModel

public TemplateModel getModel()
Returns:
.

getToolBoxPanel

public ToolboxPanel getToolBoxPanel()
Returns:
.

getWp

public WorkspacePanel getWp()
Returns:
.

nextPageButtonClicked

public void nextPageButtonClicked()
called when nextPage Button is Clicked


cleanAllNotSession

public void cleanAllNotSession()
just clean the page


placeTemplatePageElements

public void placeTemplatePageElements(int section)
It places back the user added widgets (TemplateComponents) in the page

Parameters:
section - . the section number of the wanted TemplateComponent(s)

setCurrCursorPos

public void setCurrCursorPos(int y)
Parameters:
y - .

getInsertionPoint

public Coords getInsertionPoint()

getSelectedIndex

public int getSelectedIndex()

prevPageButtonClicked

public void prevPageButtonClicked()
called when prevPage Button is Clicked


resizeTemplateComponentInModel

public void resizeTemplateComponentInModel(com.google.gwt.user.client.ui.Widget toResize,
                                           int newWidth,
                                           int newHeight)
Resize the template componet just the model

Parameters:
toResize - .
newWidth - .
newHeight - .

resizeWorkingArea

public void resizeWorkingArea(int width,
                              int height)
Parameters:
width - .
height - .

setHeader

public void setHeader(Headerbar header)
Parameters:
header - .

setToolBoxPanel

public void setToolBoxPanel(ToolboxPanel toolBoxPanel)
Parameters:
toolBoxPanel - It's the tool box panel

setWp

public void setWp(WorkspacePanel wp)
Parameters:
wp - .

getCurrentScope

public String getCurrentScope()
Returns:
the scope in which the application is running on

getCurrentUser

public UserBean getCurrentUser()
Returns:
the user username who is using the application

getTitleBar

public TitleBar getTitleBar()
Returns:
.

refreshWorkspace

public void refreshWorkspace()
refresh the root in the workspace


showUploadFilePopup

public void showUploadFilePopup()
show the upload file popup


getCurrentSelected

public RichTextToolbar getCurrentSelected()
Returns:
the current selected rich text area

setMenuForWorkflowDocument

public void setMenuForWorkflowDocument(boolean enable)

getMenuForWorkflowDocument

public boolean getMenuForWorkflowDocument()

setAreaForBiblio

public void setAreaForBiblio(com.google.gwt.user.client.ui.RichTextArea d4sArea)

toggleReportStructure

public void toggleReportStructure()

getExportsPanel

public com.google.gwt.user.client.ui.HorizontalPanel getExportsPanel()

setExportsPanel

public void setExportsPanel(com.google.gwt.user.client.ui.HorizontalPanel exportsPanel)

showExportSaveOptions

public void showExportSaveOptions(String filePath,
                                  String itemName,
                                  org.gcube.portlets.widgets.exporter.shared.TypeExporter type)
when export is done this method is called

Parameters:
filePath -
itemName -
type -

showExportPanel

public void showExportPanel(String filePath,
                            String itemName,
                            org.gcube.portlets.widgets.exporter.shared.TypeExporter type,
                            String tempFileId)

clearExportPanel

public void clearExportPanel()

showVMEImportDialog

public void showVMEImportDialog()

showVMEReportRefImportDialog

public void showVMEReportRefImportDialog(VMETypeIdentifier refType)

showVMERefAssociateDialog

public void showVMERefAssociateDialog(VMETypeIdentifier refType)

importVMETemplate

public void importVMETemplate(VMETypeIdentifier type)

getTypeIdFromString

public VMETypeIdentifier getTypeIdFromString(String theType)
                                      throws Exception
this method translate the VME ReportRef String in an ENUM

Parameters:
theType -
Returns:
Throws:
Exception


Copyright © 2014. All Rights Reserved.