fr.paris.lutece.plugins.workflow.modules.alert.service
Interface IAlertService

All Known Implementing Classes:
AlertService

public interface IAlertService

IAlertService


Method Summary
 void create(Alert alert)
          Create a new alert
 void doChangeRecordState(TaskAlertConfig config, int nIdRecord, Alert alert)
          Do change the record state
 Alert find(int nIdResourceHistory, int nIdTask)
          Find an alert
 java.util.List<Alert> findAll()
          Find all alerts
 long getDate(TaskAlertConfig config, int nIdRecord, int nIdDirectory)
          Get the date
 fr.paris.lutece.util.ReferenceList getListDirectories()
          Get the list of directories
 java.util.List<fr.paris.lutece.plugins.directory.business.IEntry> getListEntries(int nIdTask)
          Get the list of entries from a given id task
 fr.paris.lutece.util.ReferenceList getListEntriesDate(int nIdTask, java.util.Locale locale)
          Get the list of entries that have the accepted type (which are defined in workflow-alert.properties)
 fr.paris.lutece.util.ReferenceList getListStates(int nIdAction)
          Get the list of states
 fr.paris.lutece.plugins.directory.business.Record getRecord(Alert alert)
          Get the record from a given Alert
 java.lang.String getRecordFieldValue(int nPosition, int nIdRecord, int nIdDirectory)
          Get the record field value
 boolean isEntryTypeDateAccepted(int nIdEntryType)
          Check if the given entry type id is accepted for the date
 boolean isRecordStateValid(TaskAlertConfig config, fr.paris.lutece.plugins.directory.business.Record record, java.util.Locale locale)
          Check if the record has the same state before executing the action
 void removeByHistory(int nIdResourceHistory, int nIdTask)
          Remove an alert by id history
 void removeByTask(int nIdTask)
          Remove an alert by id task
 

Method Detail

create

void create(Alert alert)
Create a new alert

Parameters:
alert - the alert

removeByHistory

void removeByHistory(int nIdResourceHistory,
                     int nIdTask)
Remove an alert by id history

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

removeByTask

void removeByTask(int nIdTask)
Remove an alert by id task

Parameters:
nIdTask - the id task

find

Alert find(int nIdResourceHistory,
           int nIdTask)
Find an alert

Parameters:
nIdResourceHistory - the id history
nIdTask - the id task
Returns:
an Alert

findAll

java.util.List<Alert> findAll()
Find all alerts

Returns:
a list of Alert

isEntryTypeDateAccepted

boolean isEntryTypeDateAccepted(int nIdEntryType)
Check if the given entry type id is accepted for the date

Parameters:
nIdEntryType - the id entry type
Returns:
true if it is accepted, false otherwise

isRecordStateValid

boolean isRecordStateValid(TaskAlertConfig config,
                           fr.paris.lutece.plugins.directory.business.Record record,
                           java.util.Locale locale)
Check if the record has the same state before executing the action

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

getListEntries

java.util.List<fr.paris.lutece.plugins.directory.business.IEntry> getListEntries(int nIdTask)
Get the list of entries from a given id task

Parameters:
nIdTask - the id task
Returns:
a list of IEntry

getListEntriesDate

fr.paris.lutece.util.ReferenceList getListEntriesDate(int nIdTask,
                                                      java.util.Locale locale)
Get the list of entries that have the accepted type (which are defined in workflow-alert.properties)

Parameters:
nIdTask - the id task
locale - the Locale
Returns:
a ReferenceList

getListDirectories

fr.paris.lutece.util.ReferenceList getListDirectories()
Get the list of directories

Returns:
a ReferenceList

getListStates

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

Parameters:
nIdAction - the id action
Returns:
a ReferenceList

getRecord

fr.paris.lutece.plugins.directory.business.Record getRecord(Alert alert)
Get the record from a given Alert

Parameters:
alert - the alert
Returns:
a Record

getDate

long getDate(TaskAlertConfig config,
             int nIdRecord,
             int nIdDirectory)
Get the date

Parameters:
config - the config
nIdRecord - the id record
nIdDirectory - the id directory
Returns:
the date

getRecordFieldValue

java.lang.String getRecordFieldValue(int nPosition,
                                     int nIdRecord,
                                     int nIdDirectory)
Get the record field value

Parameters:
nPosition - the position of the entry
nIdRecord - the id record
nIdDirectory - the id directory
Returns:
the record field value

doChangeRecordState

void doChangeRecordState(TaskAlertConfig config,
                         int nIdRecord,
                         Alert alert)
Do change the record state

Parameters:
config - the config
nIdRecord - the id record
alert - the alert


Copyright © 2012 Mairie de Paris. All Rights Reserved.