public final class AlertService extends Object implements IAlertService
| Modifier and Type | Field and Description |
|---|---|
static String |
BEAN_SERVICE |
| Modifier and Type | Method and Description |
|---|---|
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
|
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
|
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,
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
|
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,
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
|
public static final String BEAN_SERVICE
@Transactional(value="workflow-alert.transactionManager") public void create(Alert alert)
create in interface IAlertServicealert - the alert@Transactional(value="workflow-alert.transactionManager")
public void removeByHistory(int nIdResourceHistory,
int nIdTask)
removeByHistory in interface IAlertServicenIdResourceHistory - the id historynIdTask - the id task@Transactional(value="workflow-alert.transactionManager") public void removeByTask(int nIdTask)
removeByTask in interface IAlertServicenIdTask - the id taskpublic Alert find(int nIdResourceHistory, int nIdTask)
find in interface IAlertServicenIdResourceHistory - the id historynIdTask - the id taskAlertpublic List<Alert> findAll()
findAll in interface IAlertServiceAlertpublic boolean isEntryTypeDateAccepted(int nIdEntryType)
isEntryTypeDateAccepted in interface IAlertServicenIdEntryType - the id entry typepublic boolean isRecordStateValid(TaskAlertConfig config, fr.paris.lutece.plugins.directory.business.Record record, Locale locale)
isRecordStateValid in interface IAlertServiceconfig - the configrecord - the recordlocale - the localepublic List<fr.paris.lutece.plugins.directory.business.IEntry> getListEntries(int nIdTask)
getListEntries in interface IAlertServicenIdTask - the id taskpublic fr.paris.lutece.util.ReferenceList getListEntriesDate(int nIdTask,
Locale locale)
getListEntriesDate in interface IAlertServicenIdTask - the id tasklocale - the Localepublic fr.paris.lutece.util.ReferenceList getListDirectories()
getListDirectories in interface IAlertServicepublic fr.paris.lutece.util.ReferenceList getListStates(int nIdAction)
getListStates in interface IAlertServicenIdAction - the id actionpublic fr.paris.lutece.plugins.directory.business.Record getRecord(Alert alert)
getRecord in interface IAlertServicealert - the alertRecordpublic long getDate(TaskAlertConfig config, int nIdRecord, int nIdDirectory)
getDate in interface IAlertServiceconfig - the confignIdRecord - the id recordnIdDirectory - the id directorypublic String getRecordFieldValue(int nPosition, int nIdRecord, int nIdDirectory)
getRecordFieldValue in interface IAlertServicenPosition - the position of the entrynIdRecord - the id recordnIdDirectory - the id directorypublic void doChangeRecordState(TaskAlertConfig config, int nIdRecord, Alert alert)
doChangeRecordState in interface IAlertServiceconfig - the confignIdRecord - the id recordalert - the alertCopyright © 2015 City of Paris. All rights reserved.