fr.paris.lutece.plugins.workflow.modules.editrecord.service
Interface IEditRecordService

All Known Implementing Classes:
EditRecordService

public interface IEditRecordService

IEditRecordService


Method Summary
 void create(EditRecord editRecord)
          Create an edit record
 void doChangeRecordState(EditRecord editRecord, java.util.Locale locale)
          Do change the record state
 void doCompleteEditRecord(EditRecord editRecord)
          Do change the edit record to complete
 boolean doEditRecordData(javax.servlet.http.HttpServletRequest request, EditRecord editRecord)
          Do edit the record data
 EditRecord find(int nIdHistory, int nIdTask)
          Find an edit record
 java.util.List<EditRecord> findByIdTask(int nIdTask)
          Find edit records by a given id task
 fr.paris.lutece.plugins.directory.business.IEntry getEntry(int nIdEntry)
          Get the entry from a given id entry
 fr.paris.lutece.plugins.directory.business.EntryType getEntryTypeDownloadUrl()
          Get the entry type download url
 java.util.List<fr.paris.lutece.plugins.directory.business.IEntry> getFormListEntries(int nIdRecord, int nIdTask, javax.servlet.http.HttpServletRequest request)
          Get the list of entries for the form
 java.util.List<fr.paris.lutece.plugins.directory.business.IEntry> getInformationListEntries(int nIdHistory)
          Get the list of entries for information
 java.util.List<fr.paris.lutece.plugins.directory.business.IEntry> getListEntriesToEdit(javax.servlet.http.HttpServletRequest request, java.util.List<EditRecordValue> listEditRecordValues)
          Get the list of entries to edit
 java.util.List<java.lang.Integer> getListIdEntriesToNotEdit(javax.servlet.http.HttpServletRequest request, int nIdRecord, java.util.List<EditRecordValue> listEditRecordValues)
          Get the list of entries to not edit
 java.util.List<fr.paris.lutece.plugins.directory.business.RecordField> getListRecordFieldsToNotEdit(javax.servlet.http.HttpServletRequest request, int nIdRecord, java.util.List<EditRecordValue> listEditRecordValues)
          Get the list of record fieds to not edit
 fr.paris.lutece.util.ReferenceList getListStates(int nIdAction)
          Get the list of states
 java.util.Map<java.lang.String,java.util.List<fr.paris.lutece.plugins.directory.business.RecordField>> getMapIdEntryListRecordField(java.util.List<fr.paris.lutece.plugins.directory.business.IEntry> listEntries, int nIdHistory)
          Get the map id entry - list record fields
 fr.paris.lutece.plugins.directory.business.RecordField getRecordFieldDownloadUrl(int nIdHistory, int nIdEntry)
          Get the record field associated to the entry type download url.
 java.util.List<fr.paris.lutece.plugins.directory.business.RecordField> getRecordFieldsList(int nIdHistory, int nIdEntry)
          Get the list of record fields from a given id history and id entry
 fr.paris.lutece.plugins.directory.business.Record getRecordFromIdHistory(int nIdHistory)
          Get the record from a given id history
 boolean isRecordStateValid(EditRecord editRecord, java.util.Locale locale)
          Check if the record has the same state before executing the action
 boolean isRequestAuthenticated(javax.servlet.http.HttpServletRequest request)
          Check if the request is authenticated or not
 void removeByIdHistory(int nIdHistory, int nIdTask)
          Remove an edit record
 void removeByIdTask(int nIdTask)
          Remove an edit record by id task
 void setSiteMessage(javax.servlet.http.HttpServletRequest request, java.lang.String strMessage, int nTypeMessage, java.lang.String strUrlReturn)
          Set the site message
 void update(EditRecord editRecord)
          Update an edit record
 

Method Detail

setSiteMessage

void setSiteMessage(javax.servlet.http.HttpServletRequest request,
                    java.lang.String strMessage,
                    int nTypeMessage,
                    java.lang.String strUrlReturn)
                    throws fr.paris.lutece.portal.service.message.SiteMessageException
Set the site message

Parameters:
request - the HTTP request
strMessage - the message
nTypeMessage - the message type
strUrlReturn - the url return
Throws:
fr.paris.lutece.portal.service.message.SiteMessageException - the site message

create

@Transactional(value="workflow-editrecord.transactionManager")
void create(EditRecord editRecord)
Create an edit record

Parameters:
editRecord - the edit record

update

@Transactional(value="workflow-editrecord.transactionManager")
void update(EditRecord editRecord)
Update an edit record

Parameters:
editRecord - the edit record

find

EditRecord find(int nIdHistory,
                int nIdTask)
Find an edit record

Parameters:
nIdHistory - the id history
nIdTask - the id task
Returns:
a edit record

findByIdTask

java.util.List<EditRecord> findByIdTask(int nIdTask)
Find edit records by a given id task

Parameters:
nIdTask - the id task
Returns:
the list of edit records

removeByIdHistory

@Transactional(value="workflow-editrecord.transactionManager")
void removeByIdHistory(int nIdHistory,
                                     int nIdTask)
Remove an edit record

Parameters:
nIdHistory - the id history
nIdTask - the id task

removeByIdTask

@Transactional(value="workflow-editrecord.transactionManager")
void removeByIdTask(int nIdTask)
Remove an edit record by id task

Parameters:
nIdTask - the id task

getListStates

fr.paris.lutece.util.ReferenceList getListStates(int nIdAction)
Get the list of states

Parameters:
nIdAction - the id action
Returns:
a ReferenceList

getFormListEntries

java.util.List<fr.paris.lutece.plugins.directory.business.IEntry> getFormListEntries(int nIdRecord,
                                                                                     int nIdTask,
                                                                                     javax.servlet.http.HttpServletRequest request)
Get the list of entries for the form

Parameters:
nIdRecord - the id record
nIdTask - the id task
request - the HTTP request
Returns:
a list of entries

getInformationListEntries

java.util.List<fr.paris.lutece.plugins.directory.business.IEntry> getInformationListEntries(int nIdHistory)
Get the list of entries for information

Parameters:
nIdHistory - the id edit record
Returns:
a list of entries

getListEntriesToEdit

java.util.List<fr.paris.lutece.plugins.directory.business.IEntry> getListEntriesToEdit(javax.servlet.http.HttpServletRequest request,
                                                                                       java.util.List<EditRecordValue> listEditRecordValues)
Get the list of entries to edit

Parameters:
request - the HTTP request
listEditRecordValues - the list of edit record values
Returns:
a list of entries

getListIdEntriesToNotEdit

java.util.List<java.lang.Integer> getListIdEntriesToNotEdit(javax.servlet.http.HttpServletRequest request,
                                                            int nIdRecord,
                                                            java.util.List<EditRecordValue> listEditRecordValues)
Get the list of entries to not edit

Parameters:
request - the HTTP request
nIdRecord - the id record
listEditRecordValues - the list of edit record values
Returns:
a list of entries

getListRecordFieldsToNotEdit

java.util.List<fr.paris.lutece.plugins.directory.business.RecordField> getListRecordFieldsToNotEdit(javax.servlet.http.HttpServletRequest request,
                                                                                                    int nIdRecord,
                                                                                                    java.util.List<EditRecordValue> listEditRecordValues)
Get the list of record fieds to not edit

Parameters:
request - the HTTP request
nIdRecord - the id record
listEditRecordValues - the list of edit record values
Returns:
a list of record fields

getMapIdEntryListRecordField

java.util.Map<java.lang.String,java.util.List<fr.paris.lutece.plugins.directory.business.RecordField>> getMapIdEntryListRecordField(java.util.List<fr.paris.lutece.plugins.directory.business.IEntry> listEntries,
                                                                                                                                    int nIdHistory)
Get the map id entry - list record fields

Parameters:
listEntries - the list of entries to edit
nIdHistory - the id history
Returns:
a map of id entry - list record fields

getEntry

fr.paris.lutece.plugins.directory.business.IEntry getEntry(int nIdEntry)
Get the entry from a given id entry

Parameters:
nIdEntry - the id entry
Returns:
an IEntry

getEntryTypeDownloadUrl

fr.paris.lutece.plugins.directory.business.EntryType getEntryTypeDownloadUrl()
Get the entry type download url

Returns:
the entry type downlaod url

getRecordFromIdHistory

fr.paris.lutece.plugins.directory.business.Record getRecordFromIdHistory(int nIdHistory)
Get the record from a given id history

Parameters:
nIdHistory - the id history
Returns:
the record

getRecordFieldsList

java.util.List<fr.paris.lutece.plugins.directory.business.RecordField> getRecordFieldsList(int nIdHistory,
                                                                                           int nIdEntry)
Get the list of record fields from a given id history and id entry

Parameters:
nIdHistory - the id history
nIdEntry - the id entry
Returns:
the list of record fields

getRecordFieldDownloadUrl

fr.paris.lutece.plugins.directory.business.RecordField getRecordFieldDownloadUrl(int nIdHistory,
                                                                                 int nIdEntry)
Get the record field associated to the entry type download url.
There is currently only on record field per record for the entry type download url. So, this method will only fetch the first record field.

Parameters:
nIdHistory - the id history
nIdEntry - the id entry
Returns:
the record field

doEditRecordData

boolean doEditRecordData(javax.servlet.http.HttpServletRequest request,
                         EditRecord editRecord)
                         throws fr.paris.lutece.portal.service.message.SiteMessageException
Do edit the record data

Parameters:
request - the HTTP request
editRecord - the edit record
Returns:
true if the user the record must be updated, false otherwise
Throws:
fr.paris.lutece.portal.service.message.SiteMessageException - site message if there is a problem

doChangeRecordState

void doChangeRecordState(EditRecord editRecord,
                         java.util.Locale locale)
Do change the record state

Parameters:
editRecord - edit record
locale - the locale

doCompleteEditRecord

void doCompleteEditRecord(EditRecord editRecord)
Do change the edit record to complete

Parameters:
editRecord - the edit record

isRequestAuthenticated

boolean isRequestAuthenticated(javax.servlet.http.HttpServletRequest request)
Check if the request is authenticated or not

Parameters:
request - the HTTP request
Returns:
true if the requet is authenticated, false otherwise

isRecordStateValid

boolean isRecordStateValid(EditRecord editRecord,
                           java.util.Locale locale)
Check if the record has the same state before executing the action

Parameters:
editRecord - the edit record
locale - the locale
Returns:
true if the record has a valid state, false otherwise


Copyright © 2012 Mairie de Paris. All Rights Reserved.