|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gcube.portlets.user.reportgenerator.client.model.TemplateModel
public class TemplateModel
The TemplateModel
class represents the current Template state, the model in the the MVC pattern
Field Summary | |
---|---|
static String |
BIBLIO_SECTION
|
static String |
DEFAULT_NAME
DEFAULT_NAME |
static int |
OLD_TEMPLATE_WIDTH
default w and h |
static int |
TEMPLATE_WIDTH
|
static String |
USER_COMMENT
|
static String |
USER_COMMENT_HEIGHT
|
Constructor Summary | |
---|---|
TemplateModel(Presenter presenter)
Constructs a Default Template Model |
Method Summary | |
---|---|
void |
addCitation(String citeKey,
String citeText)
|
void |
addCommentToComponent(com.google.gwt.user.client.ui.Widget component,
String comment2Add,
int visibleHeight)
look for the model in the current page and edits its size |
boolean |
containsLargeTS()
|
TemplateSection |
discardSection(int sectNo)
|
int |
getColumnWidth()
|
int |
getCurrentPage()
|
String |
getExportedFileURL(ExportManifestationType type,
String templateName)
|
String |
getLastEditBy()
|
int |
getMarginBottom()
|
int |
getMarginLeft()
|
int |
getMarginRight()
|
int |
getMarginTop()
|
List<org.gcube.portlets.d4sreporting.common.shared.Metadata> |
getMetadata()
metadata . |
ReportServiceAsync |
getModelService()
|
int |
getPageHeight()
|
int |
getPageWidth()
|
TemplateSection |
getSection(int pageNo)
|
List<TemplateComponent> |
getSectionComponent(int pageNo)
|
org.gcube.portlets.d4sreporting.common.shared.Model |
getSerializableModel()
|
String |
getTemplateName()
|
int |
getTotalPages()
|
void |
importSectionInModel(org.gcube.portlets.d4sreporting.common.shared.Model toLoad,
int sectionNoToimport,
int beforeSection,
boolean asLastSection)
generally used when reading a model form disk |
void |
insertBiblioSection()
|
void |
loadModel(org.gcube.portlets.d4sreporting.common.shared.Model toLoad,
Presenter presenter)
generally used when reaing a model form disk |
boolean |
removeCitation(String citeKey)
remove a Citation from the model |
void |
removeComment(com.google.gwt.user.client.ui.Widget toRemove)
|
void |
resizeModelComponent(com.google.gwt.user.client.ui.Widget toResize,
int newWidth,
int newHeight)
look for the model in the current page and edits its size |
void |
saveReport(org.gcube.portlets.d4sreporting.common.shared.Model toSave)
|
void |
saveReport(org.gcube.portlets.d4sreporting.common.shared.Model toSave,
String folderid,
String name)
|
void |
setColumnWidth(int columnWidth)
|
void |
setCurrentPage(int currentPage)
|
void |
setLastEditBy(String lastEditBy)
|
void |
setMarginBottom(int marginBottom)
|
void |
setMarginLeft(int marginLeft)
|
void |
setMarginRight(int marginRight)
|
void |
setMarginTop(int marginTop)
|
void |
setPageHeight(int pageHeight)
|
void |
setPageWidth(int pageWidth)
|
void |
setTemplateName(String templateName)
|
void |
setTotalPages(int totalPages)
|
void |
updateWorkflowDocument(org.gcube.portlets.d4sreporting.common.shared.Model toSave,
boolean update)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int OLD_TEMPLATE_WIDTH
public static final int TEMPLATE_WIDTH
public static final String DEFAULT_NAME
public static final String BIBLIO_SECTION
public static final String USER_COMMENT
public static final String USER_COMMENT_HEIGHT
Constructor Detail |
---|
public TemplateModel(Presenter presenter)
presenter
- .Method Detail |
---|
public List<TemplateComponent> getSectionComponent(int pageNo)
pageNo
- .
public void addCommentToComponent(com.google.gwt.user.client.ui.Widget component, String comment2Add, int visibleHeight)
toResize
- .newWidth
- .newHeight
- .public void removeComment(com.google.gwt.user.client.ui.Widget toRemove)
public void insertBiblioSection()
public void addCitation(String citeKey, String citeText)
citeKey
- -citeText
- -public boolean removeCitation(String citeKey)
citeKey
- .public TemplateSection getSection(int pageNo)
pageNo
- .
public void loadModel(org.gcube.portlets.d4sreporting.common.shared.Model toLoad, Presenter presenter)
toLoad
- the SerializableModel instance to load in the modelpresenter
- .public void importSectionInModel(org.gcube.portlets.d4sreporting.common.shared.Model toLoad, int sectionNoToimport, int beforeSection, boolean asLastSection)
toLoad
- the SerializableModel instance where toget the sectionsectionNoToimport
- section to import 0 -> n-1beforeSection
- say where to import this section (before)asLastSection
- say to import this section as last section in the curren template / reportpublic TemplateSection discardSection(int sectNo)
sectNo
- the section to discard
public org.gcube.portlets.d4sreporting.common.shared.Model getSerializableModel()
public void saveReport(org.gcube.portlets.d4sreporting.common.shared.Model toSave, String folderid, String name)
folderid
- .name
- .public void saveReport(org.gcube.portlets.d4sreporting.common.shared.Model toSave)
public void resizeModelComponent(com.google.gwt.user.client.ui.Widget toResize, int newWidth, int newHeight)
toResize
- .newWidth
- .newHeight
- .public String getExportedFileURL(ExportManifestationType type, String templateName)
type
- atemplateName
- a
return a URL which is lookable for on the web
public int getCurrentPage()
public void setCurrentPage(int currentPage)
currentPage
- .public int getMarginBottom()
public void setMarginBottom(int marginBottom)
marginBottom
- .public int getMarginLeft()
public void setMarginLeft(int marginLeft)
marginLeft
- .public int getMarginRight()
public void setMarginRight(int marginRight)
marginRight
- .public int getMarginTop()
public void setMarginTop(int marginTop)
marginTop
- .public int getPageHeight()
public void setPageHeight(int pageHeight)
pageHeight
- .public int getPageWidth()
public void setPageWidth(int pageWidth)
pageWidth
- .public String getTemplateName()
public void setTemplateName(String templateName)
templateName
- .public int getTotalPages()
public void setTotalPages(int totalPages)
totalPages
- .public int getColumnWidth()
public void setColumnWidth(int columnWidth)
columnWidth
- .public ReportServiceAsync getModelService()
public List<org.gcube.portlets.d4sreporting.common.shared.Metadata> getMetadata()
public String getLastEditBy()
public void setLastEditBy(String lastEditBy)
lastEditBy
- .public boolean containsLargeTS()
public void updateWorkflowDocument(org.gcube.portlets.d4sreporting.common.shared.Model toSave, boolean update)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |