fr.paris.lutece.plugins.workflow.modules.automaticassignment.service
Class AutomaticAssignmentService

java.lang.Object
  extended by fr.paris.lutece.plugins.workflow.modules.automaticassignment.service.AutomaticAssignmentService
All Implemented Interfaces:
IAutomaticAssignmentService

public final class AutomaticAssignmentService
extends java.lang.Object
implements IAutomaticAssignmentService

AutomaticAssignmentService


Field Summary
static java.lang.String BEAN_SERVICE
           
 
Method Summary
 boolean checkExist(AutomaticAssignment assign, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check if an assignment already exist
 void create(AutomaticAssignment assign, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Creation of an instance of assign
 java.util.List<java.lang.Integer> findAllIdEntriesByTask(int nIdTask, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Return a list of id from entries with the same task
 java.util.List<AutomaticAssignment> findByTask(int nIdTask, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Return a list of assignment with the same task
 java.util.List<AutomaticAssignment> findByTaskByEntry(int nIdTask, int nIdEntry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Return a list of assignment with the same task and entry
 java.util.List<fr.paris.lutece.util.mail.FileAttachment> getFilesAttachment(TaskAutomaticAssignmentConfig config, int nIdRecord, int nIdDirectory)
          the files Attachments to insert in the mail
 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> getListEntriesFile(int nIdTask, java.util.Locale locale)
          Get the list of entries that have the accepted type for file
 boolean isEntryTypeFileAccepted(int nIdEntryType)
          Check if the given entry type id is accepted for file
 void notify(TaskAutomaticAssignmentConfig config, java.util.List<java.lang.String> listWorkgroup, fr.paris.lutece.plugins.workflowcore.business.resource.ResourceHistory resourceHistory, javax.servlet.http.HttpServletRequest request, java.util.Locale locale, fr.paris.lutece.plugins.workflowcore.service.task.ITask task)
          Notify the mailing list associated to the list of workgroups
 void remove(AutomaticAssignment assign, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove assign which is specified in parameter
 void removeByTask(int nIdTask, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove all assign linked to the task
 
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
See Also:
Constant Field Values
Method Detail

create

@Transactional(value="workflow-automaticassignment.transactionManager")
public void create(AutomaticAssignment assign,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Creation of an instance of assign

Specified by:
create in interface IAutomaticAssignmentService
Parameters:
assign - The instance of AutomaticAssignment
plugin - the plugin

remove

@Transactional(value="workflow-automaticassignment.transactionManager")
public void remove(AutomaticAssignment assign,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove assign which is specified in parameter

Specified by:
remove in interface IAutomaticAssignmentService
Parameters:
assign - The AutomaticAssignment
plugin - the plugin

removeByTask

@Transactional(value="workflow-automaticassignment.transactionManager")
public void removeByTask(int nIdTask,
                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove all assign linked to the task

Specified by:
removeByTask in interface IAutomaticAssignmentService
Parameters:
nIdTask - The id of the task
plugin - the plugin

checkExist

public boolean checkExist(AutomaticAssignment assign,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if an assignment already exist

Specified by:
checkExist in interface IAutomaticAssignmentService
Parameters:
assign - the assignment to check
plugin - the plugin
Returns:
true if exists

isEntryTypeFileAccepted

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

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

findByTaskByEntry

public java.util.List<AutomaticAssignment> findByTaskByEntry(int nIdTask,
                                                             int nIdEntry,
                                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return a list of assignment with the same task and entry

Specified by:
findByTaskByEntry in interface IAutomaticAssignmentService
Parameters:
nIdTask - the task id
nIdEntry - the entry id
plugin - the plugin
Returns:
assignmentList the list of automatic assignment

findByTask

public java.util.List<AutomaticAssignment> findByTask(int nIdTask,
                                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return a list of assignment with the same task

Specified by:
findByTask in interface IAutomaticAssignmentService
Parameters:
nIdTask - the task id
plugin - the plugin
Returns:
assignmentList the list of automatic assignment

findAllIdEntriesByTask

public java.util.List<java.lang.Integer> findAllIdEntriesByTask(int nIdTask,
                                                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return a list of id from entries with the same task

Specified by:
findAllIdEntriesByTask in interface IAutomaticAssignmentService
Parameters:
nIdTask - the task id
plugin - the plugin
Returns:
idEntriesList the list of entries id

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 IAutomaticAssignmentService
Parameters:
nIdTask - the id task
Returns:
a list of IEntry

getListEntriesFile

public java.util.List<fr.paris.lutece.plugins.directory.business.IEntry> getListEntriesFile(int nIdTask,
                                                                                            java.util.Locale locale)
Get the list of entries that have the accepted type for file

Specified by:
getListEntriesFile in interface IAutomaticAssignmentService
Parameters:
nIdTask - the id task
locale - the Locale
Returns:
a List of entries

getFilesAttachment

public java.util.List<fr.paris.lutece.util.mail.FileAttachment> getFilesAttachment(TaskAutomaticAssignmentConfig config,
                                                                                   int nIdRecord,
                                                                                   int nIdDirectory)
the files Attachments to insert in the mail

Specified by:
getFilesAttachment in interface IAutomaticAssignmentService
Parameters:
config - the configuration
nIdRecord - the record id
nIdDirectory - the directory id
Returns:
the files Attachments to insert in the mail

notify

public void notify(TaskAutomaticAssignmentConfig config,
                   java.util.List<java.lang.String> listWorkgroup,
                   fr.paris.lutece.plugins.workflowcore.business.resource.ResourceHistory resourceHistory,
                   javax.servlet.http.HttpServletRequest request,
                   java.util.Locale locale,
                   fr.paris.lutece.plugins.workflowcore.service.task.ITask task)
Notify the mailing list associated to the list of workgroups

Specified by:
notify in interface IAutomaticAssignmentService
Parameters:
config - the config
listWorkgroup - the list of workgroups
resourceHistory - the resource history
request - the HTTP request
locale - the Locale
task - the task


Copyright © 2012 Mairie de Paris. All Rights Reserved.