fr.paris.lutece.plugins.workflow.modules.notifycrm.service
Class NotifyCRMService

java.lang.Object
  extended by fr.paris.lutece.plugins.workflow.modules.notifycrm.service.NotifyCRMService
All Implemented Interfaces:
INotifyCRMService

public final class NotifyCRMService
extends java.lang.Object
implements INotifyCRMService

NotifyCRMService


Field Summary
static java.lang.String BEAN_SERVICE
          The Constant BEAN_SERVICE.
 
Method Summary
 java.util.Map<java.lang.String,java.lang.Object> fillModel(TaskNotifyCRMConfig config, fr.paris.lutece.plugins.directory.business.Record record, fr.paris.lutece.plugins.directory.business.Directory directory, javax.servlet.http.HttpServletRequest request, int nIdAction, int nIdHistory)
          Fill the model for the notification message
 java.lang.String getIdDemand(TaskNotifyCRMConfig config, int nIdRecord, int nIdDirectory)
          Get the id demand
 fr.paris.lutece.util.ReferenceList getListDirectories()
          Get the list of directorise
 java.util.List<fr.paris.lutece.plugins.directory.business.IEntry> getListEntries(int nIdTask)
          Get the list of entries from a given id task
 java.util.List<fr.paris.lutece.plugins.directory.business.IEntry> getListEntriesFreemarker(int nIdTask)
          Get the list of entries that have not the refused type (which are defined in the workflow-notifycrm.properties).
 fr.paris.lutece.util.ReferenceList getListEntriesIdDemand(int nIdTask, java.util.Locale locale)
          Get the list of entries that have the accepted type (which are defined in workflow-notifycrm.properties)
 fr.paris.lutece.util.ReferenceList getListEntriesUserGuid(int nIdTask, java.util.Locale locale)
          Get the list of entries that have the accepted type (which are defined in workflow-notifycrm.properties)
 java.util.List<fr.paris.lutece.plugins.workflowcore.service.task.ITask> getListTasks(int nIdAction, java.util.Locale locale)
          Get the list of tasks
 java.lang.String getUserGuid(TaskNotifyCRMConfig config, int nIdRecord, int nIdDirectory)
          Get the user guid
 boolean isEntryTypeIdDemandAccepted(int nIdEntryType)
          Check if the given entry type id is accepted for the id demand
 boolean isEntryTypeRefused(int nIdEntryType)
          Check if the given entry type id is refused
 boolean isEntryTypeUserGuidAccepted(int nIdEntryType)
          Check if the given entry type id is accepted for the user guid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN_SERVICE

public static final java.lang.String BEAN_SERVICE
The Constant BEAN_SERVICE.

See Also:
Constant Field Values
Method Detail

isEntryTypeRefused

public boolean isEntryTypeRefused(int nIdEntryType)
Check if the given entry type id is refused

Specified by:
isEntryTypeRefused in interface INotifyCRMService
Parameters:
nIdEntryType - the id entry type
Returns:
true if it is refused, false otherwise

isEntryTypeIdDemandAccepted

public boolean isEntryTypeIdDemandAccepted(int nIdEntryType)
Check if the given entry type id is accepted for the id demand

Specified by:
isEntryTypeIdDemandAccepted in interface INotifyCRMService
Parameters:
nIdEntryType - the id entry type
Returns:
true if it is accepted, false otherwise

isEntryTypeUserGuidAccepted

public boolean isEntryTypeUserGuidAccepted(int nIdEntryType)
Check if the given entry type id is accepted for the user guid

Specified by:
isEntryTypeUserGuidAccepted in interface INotifyCRMService
Parameters:
nIdEntryType - the id entry type
Returns:
true if it is accepted, false otherwise

getListDirectories

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

Specified by:
getListDirectories in interface INotifyCRMService
Returns:
a ReferenceList

getListEntries

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

Specified by:
getListEntries in interface INotifyCRMService
Parameters:
nIdTask - the id task
Returns:
a list of IEntry

getListEntriesIdDemand

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

Specified by:
getListEntriesIdDemand in interface INotifyCRMService
Parameters:
nIdTask - the id task
locale - the Locale
Returns:
a ReferenceList

getListEntriesUserGuid

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

Specified by:
getListEntriesUserGuid in interface INotifyCRMService
Parameters:
nIdTask - the id task
locale - the Locale
Returns:
a ReferenceList

getListEntriesFreemarker

public java.util.List<fr.paris.lutece.plugins.directory.business.IEntry> getListEntriesFreemarker(int nIdTask)
Get the list of entries that have not the refused type (which are defined in the workflow-notifycrm.properties).
This list will be displayed as a freemarker label that the webmaster can use to write the notifications.

Specified by:
getListEntriesFreemarker in interface INotifyCRMService
Parameters:
nIdTask - the id task
Returns:
a list of IEntry

getIdDemand

public java.lang.String getIdDemand(TaskNotifyCRMConfig config,
                                    int nIdRecord,
                                    int nIdDirectory)
Get the id demand

Specified by:
getIdDemand in interface INotifyCRMService
Parameters:
config - the config
nIdRecord - the id record
nIdDirectory - the id directory
Returns:
the id demand

getUserGuid

public java.lang.String getUserGuid(TaskNotifyCRMConfig config,
                                    int nIdRecord,
                                    int nIdDirectory)
Get the user guid

Specified by:
getUserGuid in interface INotifyCRMService
Parameters:
config - the config
nIdRecord - the id record
nIdDirectory - the id directory
Returns:
the user guid, an empty string if the position is not set

getListTasks

public java.util.List<fr.paris.lutece.plugins.workflowcore.service.task.ITask> getListTasks(int nIdAction,
                                                                                            java.util.Locale locale)
Get the list of tasks

Specified by:
getListTasks in interface INotifyCRMService
Parameters:
nIdAction - the id action
locale - the locale
Returns:
a list of ITask

fillModel

public java.util.Map<java.lang.String,java.lang.Object> fillModel(TaskNotifyCRMConfig config,
                                                                  fr.paris.lutece.plugins.directory.business.Record record,
                                                                  fr.paris.lutece.plugins.directory.business.Directory directory,
                                                                  javax.servlet.http.HttpServletRequest request,
                                                                  int nIdAction,
                                                                  int nIdHistory)
Fill the model for the notification message

Specified by:
fillModel in interface INotifyCRMService
Parameters:
config - the config
record - the record
directory - the directory
request - the HTTP request
nIdAction - the id action
nIdHistory - the id history
Returns:
the model filled


Copyright © 2012 Mairie de Paris. All Rights Reserved.