fr.paris.lutece.plugins.form.business
Class Entry

java.lang.Object
  extended by fr.paris.lutece.plugins.form.business.Entry
All Implemented Interfaces:
IEntry
Direct Known Subclasses:
EntryTypeCheckBox, EntryTypeComment, EntryTypeDate, EntryTypeFile, EntryTypeGroup, EntryTypeRadioButton, EntryTypeSelect, EntryTypeSelectSQL, EntryTypeText, EntryTypeTextArea

public class Entry
extends java.lang.Object
implements IEntry

class Entry


Field Summary
protected static java.lang.String EMPTY_STRING
           
protected static java.lang.String FIELD_COMMENT
           
protected static java.lang.String FIELD_CONFIRM_FIELD
           
protected static java.lang.String FIELD_CONFIRM_FIELD_TITLE
           
protected static java.lang.String FIELD_HEIGHT
           
protected static java.lang.String FIELD_HELP_MESSAGE
           
protected static java.lang.String FIELD_INSERT_GROUP
           
protected static java.lang.String FIELD_MANDATORY
           
protected static java.lang.String FIELD_MAX_SIZE_ENTER
           
protected static java.lang.String FIELD_PRESENTATION
           
protected static java.lang.String FIELD_TITLE
           
protected static java.lang.String FIELD_VALUE
           
protected static java.lang.String FIELD_WIDTH
           
protected static java.lang.String JSP_DOWNLOAD_FILE
           
protected static java.lang.String MARK_ENTRY
           
protected static java.lang.String MESSAGE_CONFIRM_FIELD
           
protected static java.lang.String MESSAGE_MANDATORY_FIELD
           
protected static java.lang.String MESSAGE_NUMERIC_FIELD
           
protected static java.lang.String MESSAGE_UNIQUE_FIELD
           
protected static java.lang.String MESSAGE_XSS_FIELD
           
protected static java.lang.String PARAMETER_COMMENT
           
protected static java.lang.String PARAMETER_CONFIRM_FIELD
           
protected static java.lang.String PARAMETER_CONFIRM_FIELD_TITLE
           
protected static java.lang.String PARAMETER_FIELD_IN_LINE
           
protected static java.lang.String PARAMETER_HEIGHT
           
protected static java.lang.String PARAMETER_HELP_MESSAGE
           
protected static java.lang.String PARAMETER_MANDATORY
           
protected static java.lang.String PARAMETER_MAX_SIZE_ENTER
           
protected static java.lang.String PARAMETER_TITLE
           
protected static java.lang.String PARAMETER_UNIQUE
           
protected static java.lang.String PARAMETER_VALUE
           
protected static java.lang.String PARAMETER_WIDTH
           
protected static java.lang.String SUFFIX_CONFIRM_FIELD
           
 
Constructor Summary
Entry()
           
 
Method Summary
 java.util.List<IEntry> getChildren()
           
 java.lang.String getComment()
           
 java.lang.String getConfirmFieldTitle()
          Get the title of the confirmation field
 EntryType getEntryType()
           
 Field getFieldDepend()
           
 java.util.List<Field> getFields()
           
 Form getForm()
           
 java.lang.String getHelpMessage()
           
 java.lang.String getHtmlCode()
          Get the HtmlCode of the entry
 int getIdEntry()
           
 int getNumberConditionalQuestion()
           
 fr.paris.lutece.util.html.Paginator getPaginator(int nItemPerPage, java.lang.String strBaseUrl, java.lang.String strPageIndexParameterName, java.lang.String strPageIndex)
          The paginator who is use in the template modify of the entry
 IEntry getParent()
           
 int getPosition()
           
 fr.paris.lutece.util.ReferenceList getReferenceListRegularExpression(IEntry entry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of regular expression who is use in the template modify of the entry
 java.lang.String getRequestData(javax.servlet.http.HttpServletRequest request, java.util.Locale locale)
          Get the request data
 FormError getResponseData(javax.servlet.http.HttpServletRequest request, java.util.List<Response> listResponse, java.util.Locale locale)
          save in the list of response the response associate to the entry in the form submit
 java.lang.String getResponseValueForExport(javax.servlet.http.HttpServletRequest request, Response response, java.util.Locale locale)
          Get the response value associate to the entry to export in the file export
 java.lang.String getResponseValueForRecap(javax.servlet.http.HttpServletRequest request, Response response, java.util.Locale locale)
          Get the response value associate to the entry to write in the recap
 java.lang.String getTemplateCreate()
          Get template create url of the entry
 java.lang.String getTemplateModify()
          Get the template modify url of the entry
 java.lang.String getTitle()
           
 boolean isConfirmField()
          Get the confirmField value
 boolean isFieldInLine()
           
 boolean isFirstInTheList()
           
 boolean isLastInTheList()
           
 boolean isMandatory()
           
 boolean isUnique()
           
 void setChildren(java.util.List<IEntry> children)
          set the list of entry who are insert in the group
 void setComment(java.lang.String comment)
          set entry comment
 void setConfirmField(boolean bConfirmField)
          Set the confirmField
 void setConfirmFieldTitle(java.lang.String strConfirmFieldTitle)
          Set the title of the confirmation field
 void setEntryType(EntryType entryType)
          set the type of the entry
 void setFieldDepend(Field depend)
          set the field if the entry is a conditional question
 void setFieldInLine(boolean fieldInLine)
          set true if the field associate must be display in line
 void setFields(java.util.List<Field> fields)
          set the list of field who are associate to the entry
 void setFirstInTheList(boolean firstInTheList)
          set true if the entry is the first entry of a group or the list of entry
 void setForm(Form form)
          set the form of the entry
 void setHelpMessage(java.lang.String helpMessage)
          set the entry help message
 void setIdEntry(int idEntry)
          set the id of the entry
 void setLastInTheList(boolean lastInTheList)
          set true if the entry is the last entry of a group or the list of entry
 void setMandatory(boolean mandatory)
          set true if the question is mandatory
 void setNumberConditionalQuestion(int numberConditionalQuestion)
          set the number of conditional questions who are assocaite to the entry
 void setParent(IEntry parent)
          set parent entry if the entry is insert in a group
 void setPosition(int position)
          set position entry
 void setTitle(java.lang.String title)
          set title entry
 void setUnique(boolean _bUnique)
          Set to true if the value of the response to this question must be unique
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETER_TITLE

protected static final java.lang.String PARAMETER_TITLE
See Also:
Constant Field Values

PARAMETER_HELP_MESSAGE

protected static final java.lang.String PARAMETER_HELP_MESSAGE
See Also:
Constant Field Values

PARAMETER_COMMENT

protected static final java.lang.String PARAMETER_COMMENT
See Also:
Constant Field Values

PARAMETER_MANDATORY

protected static final java.lang.String PARAMETER_MANDATORY
See Also:
Constant Field Values

PARAMETER_FIELD_IN_LINE

protected static final java.lang.String PARAMETER_FIELD_IN_LINE
See Also:
Constant Field Values

PARAMETER_HEIGHT

protected static final java.lang.String PARAMETER_HEIGHT
See Also:
Constant Field Values

PARAMETER_WIDTH

protected static final java.lang.String PARAMETER_WIDTH
See Also:
Constant Field Values

PARAMETER_VALUE

protected static final java.lang.String PARAMETER_VALUE
See Also:
Constant Field Values

PARAMETER_MAX_SIZE_ENTER

protected static final java.lang.String PARAMETER_MAX_SIZE_ENTER
See Also:
Constant Field Values

PARAMETER_CONFIRM_FIELD

protected static final java.lang.String PARAMETER_CONFIRM_FIELD
See Also:
Constant Field Values

PARAMETER_CONFIRM_FIELD_TITLE

protected static final java.lang.String PARAMETER_CONFIRM_FIELD_TITLE
See Also:
Constant Field Values

SUFFIX_CONFIRM_FIELD

protected static final java.lang.String SUFFIX_CONFIRM_FIELD
See Also:
Constant Field Values

PARAMETER_UNIQUE

protected static final java.lang.String PARAMETER_UNIQUE
See Also:
Constant Field Values

MESSAGE_MANDATORY_FIELD

protected static final java.lang.String MESSAGE_MANDATORY_FIELD
See Also:
Constant Field Values

MESSAGE_NUMERIC_FIELD

protected static final java.lang.String MESSAGE_NUMERIC_FIELD
See Also:
Constant Field Values

MESSAGE_CONFIRM_FIELD

protected static final java.lang.String MESSAGE_CONFIRM_FIELD
See Also:
Constant Field Values

MESSAGE_UNIQUE_FIELD

protected static final java.lang.String MESSAGE_UNIQUE_FIELD
See Also:
Constant Field Values

MESSAGE_XSS_FIELD

protected static final java.lang.String MESSAGE_XSS_FIELD
See Also:
Constant Field Values

FIELD_TITLE

protected static final java.lang.String FIELD_TITLE
See Also:
Constant Field Values

FIELD_INSERT_GROUP

protected static final java.lang.String FIELD_INSERT_GROUP
See Also:
Constant Field Values

FIELD_HELP_MESSAGE

protected static final java.lang.String FIELD_HELP_MESSAGE
See Also:
Constant Field Values

FIELD_COMMENT

protected static final java.lang.String FIELD_COMMENT
See Also:
Constant Field Values

FIELD_VALUE

protected static final java.lang.String FIELD_VALUE
See Also:
Constant Field Values

FIELD_PRESENTATION

protected static final java.lang.String FIELD_PRESENTATION
See Also:
Constant Field Values

FIELD_MANDATORY

protected static final java.lang.String FIELD_MANDATORY
See Also:
Constant Field Values

FIELD_WIDTH

protected static final java.lang.String FIELD_WIDTH
See Also:
Constant Field Values

FIELD_HEIGHT

protected static final java.lang.String FIELD_HEIGHT
See Also:
Constant Field Values

FIELD_MAX_SIZE_ENTER

protected static final java.lang.String FIELD_MAX_SIZE_ENTER
See Also:
Constant Field Values

FIELD_CONFIRM_FIELD

protected static final java.lang.String FIELD_CONFIRM_FIELD
See Also:
Constant Field Values

FIELD_CONFIRM_FIELD_TITLE

protected static final java.lang.String FIELD_CONFIRM_FIELD_TITLE
See Also:
Constant Field Values

JSP_DOWNLOAD_FILE

protected static final java.lang.String JSP_DOWNLOAD_FILE
See Also:
Constant Field Values

MARK_ENTRY

protected static final java.lang.String MARK_ENTRY
See Also:
Constant Field Values

EMPTY_STRING

protected static final java.lang.String EMPTY_STRING
See Also:
Constant Field Values
Constructor Detail

Entry

public Entry()
Method Detail

getChildren

public java.util.List<IEntry> getChildren()
Specified by:
getChildren in interface IEntry
Returns:
the list of entry who are insert in the group

getComment

public java.lang.String getComment()
Specified by:
getComment in interface IEntry
Returns:
the entry comment

getEntryType

public EntryType getEntryType()
Specified by:
getEntryType in interface IEntry
Returns:
the type of the entry

getFields

public java.util.List<Field> getFields()
Specified by:
getFields in interface IEntry
Returns:
the list of field who are associate to the entry

getHelpMessage

public java.lang.String getHelpMessage()
Specified by:
getHelpMessage in interface IEntry
Returns:
the entry help message

getIdEntry

public int getIdEntry()
Specified by:
getIdEntry in interface IEntry
Returns:
the id of entry

getParent

public IEntry getParent()
Specified by:
getParent in interface IEntry
Returns:
parent entry if the entry is insert in a group

getPosition

public int getPosition()
Specified by:
getPosition in interface IEntry
Returns:
position entry

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface IEntry
Returns:
title entry

isFieldInLine

public boolean isFieldInLine()
Specified by:
isFieldInLine in interface IEntry
Returns:
true if the field associate must be display in line

isMandatory

public boolean isMandatory()
Specified by:
isMandatory in interface IEntry
Returns:
true if the question is mandatory

setChildren

public void setChildren(java.util.List<IEntry> children)
set the list of entry who are insert in the group

Specified by:
setChildren in interface IEntry
Parameters:
children - the list of entry

setComment

public void setComment(java.lang.String comment)
set entry comment

Specified by:
setComment in interface IEntry
Parameters:
comment - entry comment

setEntryType

public void setEntryType(EntryType entryType)
set the type of the entry

Specified by:
setEntryType in interface IEntry
Parameters:
entryType - the type of the entry

setFieldInLine

public void setFieldInLine(boolean fieldInLine)
set true if the field associate must be display in line

Specified by:
setFieldInLine in interface IEntry
Parameters:
fieldInLine - true if the field associate must be display in line

setFields

public void setFields(java.util.List<Field> fields)
set the list of field who are associate to the entry

Specified by:
setFields in interface IEntry
Parameters:
fields - the list of field

setHelpMessage

public void setHelpMessage(java.lang.String helpMessage)
set the entry help message

Specified by:
setHelpMessage in interface IEntry
Parameters:
helpMessage - the entry help message

setIdEntry

public void setIdEntry(int idEntry)
set the id of the entry

Specified by:
setIdEntry in interface IEntry
Parameters:
idEntry - the id of the entry

setMandatory

public void setMandatory(boolean mandatory)
set true if the question is mandatory

Specified by:
setMandatory in interface IEntry
Parameters:
mandatory - true if the question is mandatory

setParent

public void setParent(IEntry parent)
set parent entry if the entry is insert in a group

Specified by:
setParent in interface IEntry
Parameters:
parent - parent entry

setPosition

public void setPosition(int position)
set position entry

Specified by:
setPosition in interface IEntry
Parameters:
position - position entry

setTitle

public void setTitle(java.lang.String title)
set title entry

Specified by:
setTitle in interface IEntry
Parameters:
title - title

getForm

public Form getForm()
Specified by:
getForm in interface IEntry
Returns:
the form of the entry

setForm

public void setForm(Form form)
set the form of the entry

Specified by:
setForm in interface IEntry
Parameters:
form - the form of the entry

getFieldDepend

public Field getFieldDepend()
Specified by:
getFieldDepend in interface IEntry
Returns:
the field if the entry is a conditional question

setFieldDepend

public void setFieldDepend(Field depend)
set the field if the entry is a conditional question

Specified by:
setFieldDepend in interface IEntry
Parameters:
depend - the field if the entry is a conditional question

getHtmlCode

public java.lang.String getHtmlCode()
Get the HtmlCode of the entry

Specified by:
getHtmlCode in interface IEntry
Returns:
the HtmlCode of the entry

getRequestData

public java.lang.String getRequestData(javax.servlet.http.HttpServletRequest request,
                                       java.util.Locale locale)
Get the request data

Specified by:
getRequestData in interface IEntry
Parameters:
request - HttpRequest
locale - the locale
Returns:
null if all data requiered are in the request else the url of jsp error

getResponseData

public FormError getResponseData(javax.servlet.http.HttpServletRequest request,
                                 java.util.List<Response> listResponse,
                                 java.util.Locale locale)
save in the list of response the response associate to the entry in the form submit

Specified by:
getResponseData in interface IEntry
Parameters:
request - HttpRequest
listResponse - the list of response associate to the entry in the form submit
locale - the locale
Returns:
a Form error object if there is an error in the response

getTemplateCreate

public java.lang.String getTemplateCreate()
Get template create url of the entry

Specified by:
getTemplateCreate in interface IEntry
Returns:
template create url of the entry

getTemplateModify

public java.lang.String getTemplateModify()
Get the template modify url of the entry

Specified by:
getTemplateModify in interface IEntry
Returns:
template modify url of the entry

getNumberConditionalQuestion

public int getNumberConditionalQuestion()
Specified by:
getNumberConditionalQuestion in interface IEntry
Returns:
the number of conditional questions who are assocaite to the entry

getResponseValueForExport

public java.lang.String getResponseValueForExport(javax.servlet.http.HttpServletRequest request,
                                                  Response response,
                                                  java.util.Locale locale)
Get the response value associate to the entry to export in the file export

Specified by:
getResponseValueForExport in interface IEntry
Parameters:
response - the response associate to the entry
locale - the locale
request - the request
Returns:
the response value associate to the entry to export in the file export

getResponseValueForRecap

public java.lang.String getResponseValueForRecap(javax.servlet.http.HttpServletRequest request,
                                                 Response response,
                                                 java.util.Locale locale)
Get the response value associate to the entry to write in the recap

Specified by:
getResponseValueForRecap in interface IEntry
Parameters:
response - the response associate to the entry
locale - the locale
request - the request
Returns:
the response value associate to the entry to write in the recap

setNumberConditionalQuestion

public void setNumberConditionalQuestion(int numberConditionalQuestion)
set the number of conditional questions who are assocaite to the entry

Specified by:
setNumberConditionalQuestion in interface IEntry
Parameters:
numberConditionalQuestion - the number of conditional questions who are assocaite to the entry

getPaginator

public fr.paris.lutece.util.html.Paginator getPaginator(int nItemPerPage,
                                                        java.lang.String strBaseUrl,
                                                        java.lang.String strPageIndexParameterName,
                                                        java.lang.String strPageIndex)
The paginator who is use in the template modify of the entry

Specified by:
getPaginator in interface IEntry
Parameters:
nItemPerPage - Number of items to display per page
strBaseUrl - The base Url for build links on each page link
strPageIndexParameterName - The parameter name for the page index
strPageIndex - The current page index
Returns:
the paginator who is use in the template modify of the entry

getReferenceListRegularExpression

public fr.paris.lutece.util.ReferenceList getReferenceListRegularExpression(IEntry entry,
                                                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of regular expression who is use in the template modify of the entry

Specified by:
getReferenceListRegularExpression in interface IEntry
Parameters:
entry - the entry
plugin - the plugin
Returns:
the regular expression list who is use in the template modify of the entry

isLastInTheList

public boolean isLastInTheList()
Specified by:
isLastInTheList in interface IEntry
Returns:
true if the entry is the last entry of a group or the list of entry

setLastInTheList

public void setLastInTheList(boolean lastInTheList)
set true if the entry is the last entry of a group or the list of entry

Specified by:
setLastInTheList in interface IEntry
Parameters:
lastInTheList - true if the entry is the last entry of a group or the list of entry

isFirstInTheList

public boolean isFirstInTheList()
Specified by:
isFirstInTheList in interface IEntry
Returns:
true if the entry is the first entry of a group or the list of entry

setFirstInTheList

public void setFirstInTheList(boolean firstInTheList)
set true if the entry is the first entry of a group or the list of entry

Specified by:
setFirstInTheList in interface IEntry
Parameters:
firstInTheList - true if the entry is the last entry of a group or the list of entry

setConfirmField

public void setConfirmField(boolean bConfirmField)
Set the confirmField

Specified by:
setConfirmField in interface IEntry
Parameters:
nConfirmField -

isConfirmField

public boolean isConfirmField()
Get the confirmField value

Specified by:
isConfirmField in interface IEntry
Returns:
the value of the confirmField

setConfirmFieldTitle

public void setConfirmFieldTitle(java.lang.String strConfirmFieldTitle)
Set the title of the confirmation field

Specified by:
setConfirmFieldTitle in interface IEntry
Parameters:
strConfirmFieldTitle -

getConfirmFieldTitle

public java.lang.String getConfirmFieldTitle()
Get the title of the confirmation field

Specified by:
getConfirmFieldTitle in interface IEntry
Returns:
The title of the confirmation field

setUnique

public void setUnique(boolean _bUnique)
Set to true if the value of the response to this question must be unique

Specified by:
setUnique in interface IEntry

isUnique

public boolean isUnique()
Specified by:
isUnique in interface IEntry
Returns:
true if the value of the response to this question must be unique


Copyright © 2010 Mairie de Paris. All Rights Reserved.