Le document suivant contient les résultats de l'inspection CPD CPD 6.13.0.
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/TicketPjMigrationDaemon.java | 288 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/task/TaskAutomaticCentralizeAttachments.java | 244 |
insertTicketPjAndUpdateFileNameFromMap( coreIdFileAgentFromIdResponseListClean, ticket, false ); } } /** * Find the final list of id core from workflow_task_upload_files * * @param idHistory * the id history * @param idCoreUploadFinal * the list of id file to complete * @return the final list of id core from workflow_task_upload_files */ private List<Integer> findIsFileFromTaskUploadFiles( int idHistory, List<Integer> idCoreUploadFinal ) { List<Integer> idCoreUploadFound = TicketTransfertPjService.findUploadFiles( idHistory ); idCoreUploadFinal.addAll( idCoreUploadFound ); return idCoreUploadFinal; } /** * Find the final list of id core from workflow_task_ticketing_information * * @param idHistory * the id history * @param idResponseTotal * the list of id response to complete * @return the final list of id core from workflow_task_ticketing_information */ private List<Integer> findIdResponseFromTaskInfo( int idHistory, List<Integer> idResponseTotal ) { List<Integer> idResponseFromTaskInfo = ticketTaskInfoService( idHistory ); idResponseTotal.addAll( idResponseFromTaskInfo ); return idResponseTotal; } /** * Find the final list of id core from workflow_task_notify_gru_history * * @param idHistory * the id history * @param idResponseTotal * the list of id response to complete * @return the final list of id core from workflow_task_notify_gru_history */ private List<Integer> findIdResponseFromNotifyHistory( int idHistory, List<Integer> idResponseTotal ) { List<Integer> idResponseFromNotifyHistory = ticketNotifyHsitoryService( idHistory ); idResponseTotal.addAll( idResponseFromNotifyHistory ); return idResponseTotal; } /** * Insert pj in ticketing_ticket_pj and update file name in core_file with a id File list * * @param idFileList * the id pj list * @param ticket * the ticket * @param isUsagerPj * true if the pj is from usager otherwise false */ private void insertTicketPjAndUpdateFileName( List<Integer> idFileList, Ticket ticket, boolean isUsagerPj ) { idFileList = cleanIdCoreList( idFileList ); insertTicketPj( idFileList, ticket, isUsagerPj ); updateFileName( idFileList, ticket ); } /** * Insert pj in ticketing_ticket_pj and update file name in core_file with from id file and id response map * * @param coreIdFileAgent * the id file list * @param ticket * the ticket * @param isUsagerPj * true if the pj is from usager otherwise false */ private void insertTicketPjAndUpdateFileNameFromMap( Map<Integer, Integer> coreIdFileAgent, Ticket ticket, boolean isUsagerPj ) { insertTicketPjFromMap( coreIdFileAgent, ticket, isUsagerPj ); List<Integer> idFileList = new ArrayList<>( coreIdFileAgent.values( ) ); updateFileName( idFileList, ticket ); } /** * Update the name of file in core_file * * @param idFileList * the id file list * @param ticket * the ticket */ private void updateFileName( List<Integer> idFileList, Ticket ticket ) { for ( Integer idFile : idFileList ) { File file = FileHome.findByPrimaryKey( idFile ); if ( null != file ) { String newNameForS3 = TicketTransfertPjService.nomDepotFichierUsager( ticket.getId( ), file.getTitle( ) ); TicketPjHome.storeFileName( newNameForS3, idFile ); } } } /** * Insert pj in ticketing_ticket_pj from id file list * * @param idFileList * the id file list * @param ticket * the ticket * @param isUsagerPj * true if the pj is from usager otherwise false */ private void insertTicketPj( List<Integer> idFileList, Ticket ticket, boolean isUsagerPj ) { if ( ( null != idFileList ) && !idFileList.isEmpty( ) ) { for ( Integer idFile : idFileList ) { TicketPj pj = new TicketPj( ); pj.setIdTicket( ticket.getId( ) ); pj.setIdFile( idFile ); for ( Response response : ticket.getListResponse( ) ) { if ( ( null != response.getFile( ) ) && ( response.getFile( ).getIdFile( ) == idFile ) ) { pj.setIdResponse( response.getIdResponse( ) ); break; } } pj.setUrlTicketing( "" ); pj.setStockageTicketing( 0 ); pj.setUsager( isUsagerPj ); TicketPjHome.create( pj ); } } } /** * Insert pj in ticketing_ticket_pj from id file and id response map * * @param idsMaps * the id file id response map * @param ticket * the ticket * @param isUsagerPj * true if the pj is from usager otherwise false */ private void insertTicketPjFromMap( Map<Integer, Integer> idsMaps, Ticket ticket, boolean isUsagerPj ) { if ( ( null != idsMaps ) && !idsMaps.isEmpty( ) ) { for ( Entry<Integer, Integer> entry : idsMaps.entrySet( ) ) { |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/web/task/AssignTicketToUnitTaskComponent.java | 86 |
fr/paris/lutece/plugins/workflow/modules/ticketing/web/task/AssignUpTicketTaskComponent.java | 84 |
@Override public String getDisplayConfigForm( HttpServletRequest request, Locale locale, ITask task ) { Map<String, Object> model = new HashMap<>( ); TaskAssignTicketToUnitConfig config = getTaskConfigService( ).findByPrimaryKey( task.getId( ) ); model.put( MARK_CONFIG_TITLE, I18nService.getLocalizedString( CONFIG_TITLE_KEY, request.getLocale( ) ) ); if ( config != null ) { model.put( MARK_LEVEL_1, config.isLevel1( ) ); model.put( MARK_LEVEL_2, config.isLevel2( ) ); model.put( MARK_LEVEL_3, config.isLevel3( ) ); } else { model.put( MARK_LEVEL_1, false ); model.put( MARK_LEVEL_2, false ); model.put( MARK_LEVEL_3, false ); } HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_TASK_ASSIGN_TICKET_TO_UNIT_CONFIG, locale, model ); return template.getHtml( ); } /** * {@inheritDoc} */ @Override public String doSaveConfig( HttpServletRequest request, Locale locale, ITask task ) { TaskAssignTicketToUnitConfig config = getTaskConfigService( ).findByPrimaryKey( task.getId( ) ); boolean level1 = StringUtils.isNotEmpty( request.getParameter( MARK_LEVEL_1 ) ); boolean level2 = StringUtils.isNotEmpty( request.getParameter( MARK_LEVEL_2 ) ); boolean level3 = StringUtils.isNotEmpty( request.getParameter( MARK_LEVEL_3 ) ); if ( config == null ) { config = new TaskAssignTicketToUnitConfig( ); config.setIdTask( task.getId( ) ); config.setLevel1( level1 ); config.setLevel2( level2 ); config.setLevel3( level3 ); getTaskConfigService( ).create( config ); } else { config.setLevel1( level1 ); config.setLevel2( level2 ); config.setLevel3( level3 ); getTaskConfigService( ).update( config ); } return null; } /** * {@inheritDoc} */ @Override public String getDisplayTaskForm( int nIdResource, String strResourceType, HttpServletRequest request, Locale locale, ITask task ) { |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/web/task/NotifyWaitingTicketTaskComponent.java | 139 |
fr/paris/lutece/plugins/workflow/modules/ticketing/web/task/TicketEmailExternalUserTaskComponent.java | 415 |
MessageDirectionExternalUser.RE_AGENT_TO_EXTERNAL_USER.getLocalizedMessage( locale ) ); model.put( MARK_MESSAGE_DIRECTIONS_LIST, listMessageDirections ); model.put( MARK_CONFIG_FOLLOW_ACTION_ID, StringUtils.EMPTY ); model.put( MARK_CONFIG_CONTACT_ATTRIBUTE, StringUtils.EMPTY ); model.put( MARK_CONFIG_DEFAULT_SUBJECT, StringUtils.EMPTY ); if ( config != null ) { model.put( MARK_MESSAGE_DIRECTION, config.getMessageDirectionExternalUser( ).ordinal( ) ); if ( config.getIdFollowingAction( ) != null ) { model.put( MARK_CONFIG_FOLLOW_ACTION_ID, config.getIdFollowingAction( ) ); } if ( config.getIdContactAttribute( ) != null ) { model.put( MARK_CONFIG_CONTACT_ATTRIBUTE, config.getIdContactAttribute( ) ); } if ( config.getDefaultSubject( ) != null ) { model.put( MARK_CONFIG_DEFAULT_SUBJECT, config.getDefaultSubject( ) ); } } else { model.put( MARK_MESSAGE_DIRECTION, MessageDirectionExternalUser.AGENT_TO_EXTERNAL_USER ); } model.put( MARK_CONFIG, config ); HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_TASK_TICKET_CONFIG, locale, model ); return template.getHtml( ); } /** * {@inheritDoc} */ @Override public String doSaveConfig( HttpServletRequest request, Locale locale, ITask task ) { Integer nMessageDirectionId = getParameterAsInteger( request.getParameter( PARAMETER_MESSAGE_DIRECTION ) ); Integer nIdFollowingAction = getParameterAsInteger( request.getParameter( PARAMETER_FOLLOW_ACTION_ID ) ); Integer nIdContactAttribute = getParameterAsInteger( request.getParameter( PARAMETER_CONTACT_ATTRIBUTE ) ); String strDefaultSubject = request.getParameter( PARAMETER_DEFAULT_SUBJECT ); |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/TicketPjMigrationDaemon.java | 454 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/task/TaskAutomaticCentralizeAttachments.java | 413 |
} } } /** * find historic data From task info table * * @param ticket * the ticket to anonymizes */ private List<Integer> ticketTaskInfoService( int idHistory ) { String valueInfo = _daoTaskInfo.getInfoHistoryValueByIdHistory( idHistory, _plugin ); List<Integer> idResponseTotal = new ArrayList<>( ); if ( !valueInfo.isEmpty( ) ) { String valueInfoUpdated = _daoTaskInfo.getInfoHistoryValueByIdHistory( idHistory, _plugin ); if ( valueInfoUpdated.contains( "a href=" ) ) { List<Integer> idResponseListForAgent = TicketTransfertPjService.extractIdResponse( valueInfoUpdated ); idResponseTotal.addAll( idResponseListForAgent ); } } return idResponseTotal; } /** * find historic data From task info table * * @param ticket * the ticket to anonymizes */ private List<Integer> ticketNotifyHsitoryService( int idHistory ) { Map<String, String> valueNotifyMessages = _daoAnonymisation.loadMessageNotifyHIstoryTotal( idHistory, _plugin ); List<Integer> idResponseTotal = new ArrayList<>( ); if ( ( null != valueNotifyMessages ) && !valueNotifyMessages.isEmpty( ) ) { for ( Map.Entry<String, String> mapEntry : valueNotifyMessages.entrySet( ) ) { if ( ( null != mapEntry.getValue( ) ) && mapEntry.getValue( ).contains( "a href=" ) ) { List<Integer> idResponseListForAgent = TicketTransfertPjService.extractIdResponse( mapEntry.getValue( ) ); idResponseTotal.addAll( idResponseListForAgent ); } } } return idResponseTotal; } |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyDaemon.java | 256 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyLevel3Daemon.java | 234 |
|| ( nIdActionRetourFromTerrainNiv3 <= 0 ) || ( nIdActionRetourFromContribNiv2 <= 0 ) || ( nIdActionRetourFromContribNiv3 <= 0 ) ) { sbLog.append( "Paramétrage des id de workflow GRU incorrect, vérifier fichiers properties" ); AppLogService.error( "Paramétrage des id de workflow GRU incorrect, vérifier fichiers properties" ); return false; } if ( nbRelanceMax < 1 ) { // relance desactivée sbLog.append( "Paramétrage relance_auto.nb_relance_max inf. à 1, relance desactivée" ); AppLogService.error( "Paramétrage relance_auto.nb_relance_max inférieur à 1, relance desactivée" ); return false; } return true; } /** * Relance si pas de date de dernière relance * * @param ticket * ticket * @param dateExecution * date d'exécution */ private void processRelanceNoDate( Ticket ticket, Date dateExecution ) { ticket.setDateDerniereRelance( new Timestamp( dateExecution.getTime( ) ) ); ticket.setNbRelance( 1 ); // mise à jour du ticket (sans màj de la date d'update) // update date true si retour de sollicitation, false si relance auto TicketHome.update( ticket, false ); // Relance automatique _workflowService.doProcessAction( ticket.getId( ), Ticket.TICKET_RESOURCE_TYPE, nIdActionRelance, null, null, null, true ); } /** * Relance avec contrôle de la date de dernière relance * * @param ticket * ticket * @param dateDerniereRelance * date de dernière relance * @param dateExecution * date d'exécution * @return nombre de tickets relancé (0 ou 1) */ private int processRelance( Ticket ticket, Timestamp dateDerniereRelance, Date dateExecution ) { Date dateLimiteRelance = getDatelimiteRelance( dateDerniereRelance ); if ( dateLimiteRelance.before( dateExecution ) ) { ticket.setDateDerniereRelance( new Timestamp( dateExecution.getTime( ) ) ); ticket.setNbRelance( ticket.getNbRelance( ) + 1 ); // mise à jour du ticket (sans màj de la date d'update) // update date true si retour de sollicitation, false si relance auto TicketHome.update( ticket, false ); // Relance automatique _workflowService.doProcessAction( ticket.getId( ), Ticket.TICKET_RESOURCE_TYPE, nIdActionRelance, null, null, null, true ); return 1; } return 0; } /** * Gère le retour en fonction de la dernière action manuelle * * @param ticket * ticket * @param dateExecution * date d'exécution * @return nombre de tickets en retour (0 ou 1) */ private int processRetour( Ticket ticket, Timestamp dateDerniereRelance, Date dateExecution ) |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyDaemon.java | 175 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyLevel3Daemon.java | 155 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyUsagerDaemon.java | 155 |
|| ( resourceHistory.getAction( ).getId( ) == nIdActionSolliciterFromContribNiv3 ) ) { int nRelance = processRelance( ticket, resourceHistory.getCreationDate( ), dateExecution ); nNbTicketRelance = nNbTicketRelance + nRelance; isTicketUpdated = ( nRelance == 1 ); break; } } } else if ( nNbRelance < nbRelanceMax ) { int nRelance = processRelance( ticket, dateDerniereRelance, dateExecution ); nNbTicketRelance = nNbTicketRelance + nRelance; isTicketUpdated = ( nRelance == 1 ); } else { int nRelance = processRetour( ticket, dateDerniereRelance, dateExecution ); nNbTicketRetour = nNbTicketRetour + nRelance; isTicketUpdated = ( nRelance == 1 ); } } } catch( Exception e ) { AppLogService.error( "Erreur du traitement du ticket " + nIdResource, e ); if ( ( ticket != null ) && ( ticket.getNbRelance( ) != nNbRelance ) ) { // si le ticket a été mis à jour mais a eu une erreur ticket.setNbRelance( nNbRelance ); ticket.setDateDerniereRelance( dateDerniereRelance ); TicketHome.update( ticket, false ); isTicketUpdated = true; } } finally { if ( isTicketUpdated ) { // Index: store the Ticket in the table for the daemon IndexerActionHome.create( TicketIndexerActionUtil.createIndexerActionFromTicket( ticket ) ); } } } sbLog.append( "Nombre de tickets au statut " ) .append( _workflowService.getState( nIdStateWaiting, Ticket.TICKET_RESOURCE_TYPE, nIdWorkflow, null ).getName( ) ).append( " dont :" ); |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/TicketPjMigrationDaemon.java | 165 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/task/TaskAutomaticCentralizeAttachments.java | 124 |
} /** * Search ditinct id_core from workflow_task_upload_files * * @param idHistory * the id history * @param idCoreUploadFinal * the list of id file to complete * @return the list of distinct id_file */ private List<Integer> searchPjFromTaskUploadFiles( int idHistory, List<Integer> idCoreUploadFinal ) { List<Integer> idCoreUploadList = findIsFileFromTaskUploadFiles( idHistory, idCoreUploadFinal ); if ( !idCoreUploadList.isEmpty( ) ) { idCoreUploadFinal.addAll( idCoreUploadList ); } return idCoreUploadFinal.stream( ).distinct( ).collect( Collectors.toList( ) ); } /** * Search list of distinct id_response * * @param idHistory * the id history * @param idResponseTotal * the list of id response to complete * @return the list of distinct id_response */ private List<Integer> searchPjFromTaskInfoAndNotifyHistory( int idHistory, List<Integer> idResponseTotal ) { List<Integer> idResponseTaskInfoList = findIdResponseFromTaskInfo( idHistory, idResponseTotal ); List<Integer> idResponseNotifyHistoryList = findIdResponseFromNotifyHistory( idHistory, idResponseTotal ); if ( !idResponseTaskInfoList.isEmpty( ) ) { idResponseTotal.addAll( idResponseTaskInfoList ); } if ( !idResponseNotifyHistoryList.isEmpty( ) ) { idResponseTotal.addAll( idResponseNotifyHistoryList ); } return idResponseTotal.stream( ).distinct( ).collect( Collectors.toList( ) ); } /** * Manage pj for usager * * @param ticket * the ticket */ private void managePjforS3ForUsager( Ticket ticket ) { List<Integer> usagerAttachment = TicketTransfertPjService.findUsagerAttachment( ticket ); |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyDaemon.java | 399 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyUsagerDaemon.java | 314 |
_workflowService.doProcessAction( ticket.getId( ), Ticket.TICKET_RESOURCE_TYPE, nIdActionRetourFromContribNiv3, null, null, null, true ); return 1; } else { AppLogService.error( "Dernière action manuelle non trouvée pour le ticket " + ticket.getId( ) ); } } return 0; } /** * Renvoie la date de prochaine relance * * @param dateDerniereRelance * date de dernière relance * @return date limite de relance */ private Date getDatelimiteRelance( Timestamp dateDerniereRelance ) { Calendar calendarLimiteRelance = Calendar.getInstance( ); calendarLimiteRelance.setTime( dateDerniereRelance ); if ( isMinuteMode == 1 ) { calendarLimiteRelance.add( Calendar.MINUTE, nFrequence ); // date dernière relance + n minutes } else { // date à 00h 00mn 00s calendarLimiteRelance.set( Calendar.HOUR_OF_DAY, 0 ); calendarLimiteRelance.set( Calendar.MINUTE, 0 ); calendarLimiteRelance.set( Calendar.SECOND, 0 ); calendarLimiteRelance.set( Calendar.MILLISECOND, 0 ); calendarLimiteRelance.add( Calendar.DAY_OF_YEAR, nFrequence ); // date dernière relance + n jours } return calendarLimiteRelance.getTime( ); } /** * * @param nIdResource * identifiant de la ressource * @param nIdWorkflow * identifiant du workflow * @return identifiant de la dernière action si dans la liste des actions de sollicitation */ private int getLastManualActionSollicitation( int nIdResource, int nIdWorkflow ) { List<ResourceHistory> listAllHistoryByResource = _resourceHistoryService.getAllHistoryByResource( nIdResource, Ticket.TICKET_RESOURCE_TYPE, nIdWorkflow ); if ( ( listAllHistoryByResource != null ) && !listAllHistoryByResource.isEmpty( ) ) { // récupération de la dernière action manuelle de sollicitation for ( int i = 0; i < listAllHistoryByResource.size( ); i++ ) |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/web/task/TicketingTaskComponent.java | 239 |
fr/paris/lutece/plugins/workflow/modules/ticketing/web/task/TicketingTaskComponent.java | 277 |
protected static ReferenceList getUnitsList( AdminUser user, List<Integer> levelList ) { List<AssigneeUnit> listUnitByLevel = new ArrayList<>( ); for ( Integer level : levelList ) { listUnitByLevel .addAll( SupportEntityHome.getSupportEntityListByLevel( level ).stream( ).map( SupportEntity::getUnit ).collect( Collectors.toList( ) ) ); } ReferenceList lstRef = new ReferenceList( listUnitByLevel.size( ) ); ReferenceItem emptyReferenceItem = new ReferenceItem( ); emptyReferenceItem.setCode( StringUtils.EMPTY ); emptyReferenceItem.setName( I18nService.getLocalizedString( MESSAGE_DEFAULT_LABEL_ENTITY_TASK_FORM, Locale.FRANCE ) ); emptyReferenceItem.setChecked( true ); lstRef.add( emptyReferenceItem ); for ( AssigneeUnit unit : listUnitByLevel ) { if ( RBACService.isAuthorized( unit, AssigneeUnit.PERMISSION_ASSIGN, (User) user ) ) { lstRef.addItem( unit.getUnitId( ), unit.getName( ) ); } } return lstRef; } |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/business/config/TaskNotifyWaitingTicketConfigDAO.java | 97 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/config/TaskTicketEmailExternalUserConfigDAO.java | 100 |
public void store( TaskNotifyWaitingTicketConfig config ) { try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_UPDATE, WorkflowTicketingPlugin.getPlugin( ) ) ) { int nIndex = 1; daoUtil.setInt( nIndex++, config.getMessageDirectionExternalUser( ).ordinal( ) ); if ( config.getIdFollowingAction( ) == null ) { daoUtil.setIntNull( nIndex++ ); } else { daoUtil.setInt( nIndex++, config.getIdFollowingAction( ) ); } if ( config.getIdContactAttribute( ) == null ) { daoUtil.setIntNull( nIndex++ ); } else { daoUtil.setInt( nIndex++, config.getIdContactAttribute( ) ); } if ( config.getDefaultSubject( ) == null ) { daoUtil.setString( nIndex++, StringUtils.EMPTY ); } else { daoUtil.setString( nIndex++, config.getDefaultSubject( ) ); } daoUtil.setInt( nIndex, config.getIdTask( ) ); |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/message/TicketEmailExternalUserMessageDAO.java | 226 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/message/TicketEmailExternalUserMessageDAO.java | 257 |
try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_FIRST_MESSAGE, WorkflowTicketingPlugin.getPlugin( ) ) ) { daoUtil.setInt( 1, nIdTicket ); daoUtil.executeQuery( ); int nIndex = 1; if ( daoUtil.next( ) ) { emailExternalUserMessage = new TicketEmailExternalUserMessage( ); emailExternalUserMessage.setIdMessageExternalUser( daoUtil.getInt( nIndex++ ) ); emailExternalUserMessage.setIdTicket( daoUtil.getInt( nIndex++ ) ); emailExternalUserMessage.setEmailRecipients( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setEmailRecipientsCc( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setMessageQuestion( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setMessageResponse( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setIsAnswered( daoUtil.getBoolean( nIndex++ ) ); emailExternalUserMessage.setEmailSubject( daoUtil.getString( nIndex++ ) ); } } return emailExternalUserMessage; } /** * {@inheritDoc} */ @Override public TicketEmailExternalUserMessage loadLastByIdTicket( int nIdTicket ) |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyDaemon.java | 293 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyUsagerDaemon.java | 251 |
} /** * Relance avec contrôle de la date de dernière relance * * @param ticket * ticket * @param dateDerniereRelance * date de dernière relance * @param dateExecution * date d'exécution * @return nombre de tickets relancé (0 ou 1) */ private int processRelance( Ticket ticket, Timestamp dateDerniereRelance, Date dateExecution ) { Date dateLimiteRelance = getDatelimiteRelance( dateDerniereRelance ); if ( dateLimiteRelance.before( dateExecution ) ) { ticket.setDateDerniereRelance( new Timestamp( dateExecution.getTime( ) ) ); ticket.setNbRelance( ticket.getNbRelance( ) + 1 ); // mise à jour du ticket (sans màj de la date d'update) // update date true si retour de sollicitation, false si relance auto TicketHome.update( ticket, false ); // Relance automatique _workflowService.doProcessAction( ticket.getId( ), Ticket.TICKET_RESOURCE_TYPE, nIdActionRelance, null, null, null, true ); return 1; } return 0; } /** * Gère le retour en fonction de la dernière action manuelle * * @param ticket * ticket * @param dateExecution * date d'exécution * @return nombre de tickets en retour (0 ou 1) */ private int processRetour( Ticket ticket, Timestamp dateDerniereRelance, Date dateExecution ) { Date dateLimiteRelance = getDatelimiteRelance( dateDerniereRelance ); if ( dateLimiteRelance.before( dateExecution ) ) { // retour sollicitation int nIdDerniereActionManuelle = getLastManualActionSollicitation( ticket.getId( ), nIdWorkflow ); if ( nIdDerniereActionManuelle == nIdActionSolliciterFromTerrainNiv2 ) |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/business/config/TaskNotifyWaitingTicketConfigDAO.java | 56 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/config/TaskTicketEmailExternalUserConfigDAO.java | 56 |
public void insert( TaskNotifyWaitingTicketConfig config ) { try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT, WorkflowTicketingPlugin.getPlugin( ) ) ) { int nIndex = 1; daoUtil.setInt( nIndex++, config.getIdTask( ) ); daoUtil.setInt( nIndex++, config.getMessageDirectionExternalUser( ).ordinal( ) ); if ( config.getIdFollowingAction( ) == null ) { daoUtil.setIntNull( nIndex++ ); } else { daoUtil.setInt( nIndex++, config.getIdFollowingAction( ) ); } if ( config.getIdContactAttribute( ) == null ) { daoUtil.setIntNull( nIndex++ ); } else { daoUtil.setInt( nIndex++, config.getIdContactAttribute( ) ); } if ( config.getDefaultSubject( ) == null ) { daoUtil.setString( nIndex, StringUtils.EMPTY ); |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyDaemon.java | 144 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyUsagerDaemon.java | 127 |
sbLog.append( "Aucun ticket au statut en attente d'une réponse" ); return sbLog.toString( ); } // boucle sur les tickets for ( int nIdResource : listResourceWaitingId ) { int nNbRelance = 0; Timestamp dateDerniereRelance = null; Ticket ticket = null; boolean isTicketUpdated = false; try { ticket = TicketHome.findByPrimaryKey( nIdResource ); if ( ticket != null ) { nNbRelance = ticket.getNbRelance( ); dateDerniereRelance = ticket.getDateDerniereRelance( ); if ( ( dateDerniereRelance == null ) || ( nNbRelance == 0 ) ) { List<ResourceHistory> allHistory = _resourceHistoryService.getAllHistoryByResource( ticket.getId( ), Ticket.TICKET_RESOURCE_TYPE, nIdWorkflow ); allHistory.sort( Comparator.comparing( ResourceHistory::getCreationDate ).reversed( ) ); // tri du plus récent au plus ancien for ( ResourceHistory resourceHistory : allHistory ) { // pas de dernière relance, récupération de la date de dernière sollicitation if ( ( resourceHistory.getAction( ).getId( ) == nIdActionSolliciterFromTerrainNiv2 ) |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/service/task/TaskNotifyWaitingTicket.java | 198 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/task/TaskTicketEmailExternalUser.java | 190 |
AdminUser user = AdminUserHome.findUserByLogin( AdminUserHome.findUserByEmail( emailRecipient ) ); TicketEmailExternalUserRecipient infosEmailExternalUser = new TicketEmailExternalUserRecipient( ); infosEmailExternalUser.setIdResourceHistory( nIdResourceHistory ); infosEmailExternalUser.setIdTask( getId( ) ); infosEmailExternalUser.setEmail( user.getEmail( ) ); List<ExternalUser> listUsers = _externalUserDAO.findExternalUser( user.getLastName( ), user.getEmail( ), String.valueOf( config.getIdContactAttribute( ) ), null, null ); if ( ( listUsers != null ) && !listUsers.isEmpty( ) ) { infosEmailExternalUser.setField( listUsers.iterator( ).next( ).getAdditionalAttribute( ) ); } infosEmailExternalUser.setName( user.getLastName( ) ); infosEmailExternalUser.setFirstName( user.getFirstName( ) ); _ticketEmailExternalUserRecipientDAO.insert( infosEmailExternalUser ); } } String [ ] emailRecipientsCc; |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyDaemon.java | 223 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyLevel3Daemon.java | 203 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyUsagerDaemon.java | 203 |
.append( _workflowService.getState( nIdStateWaiting, Ticket.TICKET_RESOURCE_TYPE, nIdWorkflow, null ).getName( ) ).append( " dont :" ); sbLog.append( "\n " ).append( nNbTicketRelance ).append( " tickets relancés" ); sbLog.append( "\n " ).append( nNbTicketRetour ).append( " tickets en retour de sollicitation" ); AppLogService.info( sbLog.toString( ) ); return sbLog.toString( ); } /** * Vérifie les paramètres configurés * * @param sbLog * logs * @return true si conf OK, false sinon */ private boolean isConfParamOK( StringBuilder sbLog ) { if ( _workflowService == null ) { _workflowService = WorkflowService.getInstance( ); } if ( ( nIdWorkflow <= 0 ) || !_workflowService.isAvailable( ) ) { // pas de workflow trouvé sbLog.append( "Workflow GRU non trouvé" ); AppLogService.error( "Workflow GRU non trouvé" ); return false; } if ( ( nIdActionRelance <= 0 ) || ( nIdStateWaiting <= 0 ) || ( nIdActionSolliciterFromTerrainNiv2 <= 0 ) || ( nIdActionSolliciterFromTerrainNiv3 <= 0 ) |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/message/TicketEmailExternalUserMessageDAO.java | 197 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/message/TicketEmailExternalUserMessageDAO.java | 228 |
daoUtil.setInt( 1, nIdMessageExternalUser ); daoUtil.executeQuery( ); int nIndex = 1; if ( daoUtil.next( ) ) { emailExternalUserMessage = new TicketEmailExternalUserMessage( ); emailExternalUserMessage.setIdMessageExternalUser( daoUtil.getInt( nIndex++ ) ); emailExternalUserMessage.setIdTicket( daoUtil.getInt( nIndex++ ) ); emailExternalUserMessage.setEmailRecipients( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setEmailRecipientsCc( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setMessageQuestion( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setMessageResponse( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setIsAnswered( daoUtil.getBoolean( nIndex++ ) ); emailExternalUserMessage.setEmailSubject( daoUtil.getString( nIndex++ ) ); } } return emailExternalUserMessage; } /** * {@inheritDoc} */ @Override public TicketEmailExternalUserMessage loadFirstByIdTicket( int nIdTicket ) |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/message/TicketEmailExternalUserMessageDAO.java | 197 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/message/TicketEmailExternalUserMessageDAO.java | 259 |
daoUtil.setInt( 1, nIdMessageExternalUser ); daoUtil.executeQuery( ); int nIndex = 1; if ( daoUtil.next( ) ) { emailExternalUserMessage = new TicketEmailExternalUserMessage( ); emailExternalUserMessage.setIdMessageExternalUser( daoUtil.getInt( nIndex++ ) ); emailExternalUserMessage.setIdTicket( daoUtil.getInt( nIndex++ ) ); emailExternalUserMessage.setEmailRecipients( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setEmailRecipientsCc( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setMessageQuestion( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setMessageResponse( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setIsAnswered( daoUtil.getBoolean( nIndex++ ) ); emailExternalUserMessage.setEmailSubject( daoUtil.getString( nIndex++ ) ); } } return emailExternalUserMessage; } /** * {@inheritDoc} */ @Override public TicketEmailExternalUserMessage loadFirstByIdTicket( int nIdTicket ) |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/business/config/TaskNotifyWaitingTicketConfigDAO.java | 103 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/config/TaskTicketEmailExternalUserConfigDAO.java | 63 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/config/TaskTicketEmailExternalUserConfigDAO.java | 106 |
daoUtil.setInt( nIndex++, config.getMessageDirectionExternalUser( ).ordinal( ) ); if ( config.getIdFollowingAction( ) == null ) { daoUtil.setIntNull( nIndex++ ); } else { daoUtil.setInt( nIndex++, config.getIdFollowingAction( ) ); } if ( config.getIdContactAttribute( ) == null ) { daoUtil.setIntNull( nIndex++ ); } else { daoUtil.setInt( nIndex++, config.getIdContactAttribute( ) ); } if ( config.getDefaultSubject( ) == null ) { daoUtil.setString( nIndex++, StringUtils.EMPTY ); } else { daoUtil.setString( nIndex++, config.getDefaultSubject( ) ); } daoUtil.setInt( nIndex, config.getIdTask( ) ); |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/service/task/TaskNotifyWaitingTicket.java | 260 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/task/TaskTicketEmailExternalUser.java | 246 |
String strEmailRecipients = firstEmailsAgentDemand.getEmailRecipients( ); String strEmailRecipientsCc = firstEmailsAgentDemand.getEmailRecipientsCc( ); String strSubject = firstEmailsAgentDemand.getEmailSubject( ); // Create message item TicketEmailExternalUserMessage emailExternalUser = new TicketEmailExternalUserMessage( ); emailExternalUser.setIdTicket( ticket.getId( ) ); emailExternalUser.setMessageQuestion( strAgentMessage ); emailExternalUser.setEmailRecipients( strEmailRecipients ); emailExternalUser.setEmailRecipientsCc( strEmailRecipientsCc ); emailExternalUser.setEmailSubject( strSubject ); _ticketEmailExternalUserDemandDAO.createQuestion( emailExternalUser ); // Create resource item TicketEmailExternalUserHistory emailExternalUserHistory = new TicketEmailExternalUserHistory( ); emailExternalUserHistory.setIdResourceHistory( nIdResourceHistory ); emailExternalUserHistory.setIdTask( getId( ) ); emailExternalUserHistory.setIdMessageExternalUser( emailExternalUser.getIdMessageExternalUser( ) ); _ticketEmailExternalUserHistoryDAO.insert( emailExternalUserHistory ); } /** * Process external user to agent task (response) * * @param nIdResourceHistory * resourceHistory ID * @param ticket * the current ticket * @param request * HttpRequest from doAction */ private void processExternalUserTask( int nIdResourceHistory, Ticket ticket, HttpServletRequest request ) |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/business/config/TaskNotifyWaitingTicketConfig.java | 41 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/config/TaskTicketEmailExternalUserConfig.java | 43 |
public class TaskNotifyWaitingTicketConfig extends TaskConfig { @NotNull private MessageDirectionExternalUser _messageDirectionExternalUser; private Integer _nIdFollowingAction; private Integer _nIdContactAttribute; private String _strDefaultSubject; /** * Gives the message direction * * @return the message direction */ public MessageDirectionExternalUser getMessageDirectionExternalUser( ) { return _messageDirectionExternalUser; } /** * Sets the message direction * * @param messageDirectionExternalUser * the message direction to set */ public void setMessageDirectionExternalUser( MessageDirectionExternalUser messageDirectionExternalUser ) { _messageDirectionExternalUser = messageDirectionExternalUser; } /** * @return the idFollowingAction */ public Integer getIdFollowingAction( ) { return _nIdFollowingAction; } /** * @param nIdFollowingAction * the idFollowingAction to set */ public void setIdFollowingAction( Integer nIdFollowingAction ) { _nIdFollowingAction = nIdFollowingAction; } /** * @return true if the direction is agent to external user */ public boolean isMessageToExternalUser( ) { return MessageDirectionExternalUser.AGENT_TO_EXTERNAL_USER.equals( _messageDirectionExternalUser ); } /** * @return the idContactAttribute */ public Integer getIdContactAttribute( ) { return _nIdContactAttribute; } /** * @param nIdContactAttribute * Id Contact Attribute */ public void setIdContactAttribute( Integer nIdContactAttribute ) { _nIdContactAttribute = nIdContactAttribute; } public String getDefaultSubject( ) { return _strDefaultSubject; } public void setDefaultSubject( String defaultSubject ) { _strDefaultSubject = defaultSubject; } } |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/TicketPjMigrationDaemon.java | 117 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/task/TaskAutomaticCentralizeAttachments.java | 85 |
try { TransactionManager.beginTransaction( _plugin ); // recuperation des PJ usager managePjforS3ForUsager( ticket ); // recuperation des PJ agent par id_history List<Integer> idResponseTotal = new ArrayList<>( ); List<Integer> idCoreUploadFinal = new ArrayList<>( ); List<Integer> idHistoryList = _daoResourceHist.getIdHistoryListByResource( ticket.getId( ), _plugin ); for ( int idHistory : idHistoryList ) { // tables workflow_task_ticketing_information et workflow_task_notify_gru_history idResponseTotal = searchPjFromTaskInfoAndNotifyHistory( idHistory, idResponseTotal ); // table workflow_task_upload_files idCoreUploadFinal = searchPjFromTaskUploadFiles( idHistory, idCoreUploadFinal ); } if ( !idResponseTotal.isEmpty( ) ) { managePjforS3WithIdResponse( idResponseTotal, ticket ); } if ( !idCoreUploadFinal.isEmpty( ) ) { // usager false managePjforS3ForAgent( idCoreUploadFinal, ticket, false ); } |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/message/TicketEmailExternalUserMessageDAO.java | 297 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/message/TicketEmailExternalUserMessageDAO.java | 333 |
while ( daoUtil.next( ) ) { nIndex = 1; emailExternalUserMessage = new TicketEmailExternalUserMessage( ); emailExternalUserMessage.setIdMessageExternalUser( daoUtil.getInt( nIndex++ ) ); emailExternalUserMessage.setIdTicket( daoUtil.getInt( nIndex++ ) ); emailExternalUserMessage.setEmailRecipients( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setEmailRecipientsCc( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setMessageQuestion( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setMessageResponse( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setIsAnswered( daoUtil.getBoolean( nIndex++ ) ); emailExternalUserMessage.setEmailSubject( daoUtil.getString( nIndex++ ) ); |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyDaemon.java | 408 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyLevel3Daemon.java | 301 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyUsagerDaemon.java | 323 |
} return 0; } /** * Renvoie la date de prochaine relance * * @param dateDerniereRelance * date de dernière relance * @return date limite de relance */ private Date getDatelimiteRelance( Timestamp dateDerniereRelance ) { Calendar calendarLimiteRelance = Calendar.getInstance( ); calendarLimiteRelance.setTime( dateDerniereRelance ); if ( isMinuteMode == 1 ) { calendarLimiteRelance.add( Calendar.MINUTE, nFrequence ); // date dernière relance + n minutes } else { // date à 00h 00mn 00s calendarLimiteRelance.set( Calendar.HOUR_OF_DAY, 0 ); calendarLimiteRelance.set( Calendar.MINUTE, 0 ); calendarLimiteRelance.set( Calendar.SECOND, 0 ); calendarLimiteRelance.set( Calendar.MILLISECOND, 0 ); calendarLimiteRelance.add( Calendar.DAY_OF_YEAR, nFrequence ); // date dernière relance + n jours } return calendarLimiteRelance.getTime( ); } /** * * @param nIdResource * identifiant de la ressource * @param nIdWorkflow * identifiant du workflow * @return identifiant de la dernière action si dans la liste des actions de sollicitation */ private int getLastManualActionSollicitation( int nIdResource, int nIdWorkflow ) |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/web/task/TicketingTaskComponent.java | 211 |
fr/paris/lutece/plugins/workflow/modules/ticketing/web/task/TicketingTaskComponent.java | 249 |
ReferenceList lstRef = new ReferenceList( listUnitByLevel.size( ) ); ReferenceItem emptyReferenceItem = new ReferenceItem( ); emptyReferenceItem.setCode( StringUtils.EMPTY ); emptyReferenceItem.setName( I18nService.getLocalizedString( MESSAGE_DEFAULT_LABEL_ENTITY_TASK_FORM, Locale.FRANCE ) ); emptyReferenceItem.setChecked( true ); lstRef.add( emptyReferenceItem ); for ( AssigneeUnit unit : listUnitByLevel ) { if ( RBACService.isAuthorized( unit, AssigneeUnit.PERMISSION_ASSIGN, (User) user ) ) { lstRef.addItem( unit.getUnitId( ), unit.getName( ) ); } } return lstRef; } /** * Load the data of all the unit objects allowed for assignment and returns them in form of a collection * * @param user * connected admin user * @param levelList * the level list * @return the list which contains the data of all the unit objects */ protected static ReferenceList getUnitsList( AdminUser user, List<Integer> levelList ) |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/business/config/TaskNotifyWaitingTicketConfigDAO.java | 150 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/config/TaskTicketEmailExternalUserConfigDAO.java | 156 |
config = new TaskNotifyWaitingTicketConfig( ); config.setIdTask( daoUtil.getInt( nIndex++ ) ); config.setMessageDirectionExternalUser( MessageDirectionExternalUser.valueOf( daoUtil.getInt( nIndex++ ) ) ); String strIdFollowingAction = daoUtil.getString( nIndex++ ); if ( StringUtils.isNotEmpty( strIdFollowingAction ) ) { config.setIdFollowingAction( Integer.parseInt( strIdFollowingAction ) ); } String strIdContactAttribute = daoUtil.getString( nIndex++ ); if ( StringUtils.isNotEmpty( strIdContactAttribute ) ) { config.setIdContactAttribute( Integer.parseInt( strIdContactAttribute ) ); } config.setDefaultSubject( daoUtil.getString( nIndex ) ); |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/business/config/TaskNotifyWaitingTicketConfigDAO.java | 63 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/config/TaskNotifyWaitingTicketConfigDAO.java | 103 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/config/TaskTicketEmailExternalUserConfigDAO.java | 106 |
daoUtil.setInt( nIndex++, config.getMessageDirectionExternalUser( ).ordinal( ) ); if ( config.getIdFollowingAction( ) == null ) { daoUtil.setIntNull( nIndex++ ); } else { daoUtil.setInt( nIndex++, config.getIdFollowingAction( ) ); } if ( config.getIdContactAttribute( ) == null ) { daoUtil.setIntNull( nIndex++ ); } else { daoUtil.setInt( nIndex++, config.getIdContactAttribute( ) ); } if ( config.getDefaultSubject( ) == null ) { daoUtil.setString( nIndex, StringUtils.EMPTY ); |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/message/TicketEmailExternalUserMessageDAO.java | 205 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/message/TicketEmailExternalUserMessageDAO.java | 236 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/message/TicketEmailExternalUserMessageDAO.java | 267 |
fr/paris/lutece/plugins/workflow/modules/ticketing/business/email/message/TicketEmailExternalUserMessageDAO.java | 300 |
emailExternalUserMessage = new TicketEmailExternalUserMessage( ); emailExternalUserMessage.setIdMessageExternalUser( daoUtil.getInt( nIndex++ ) ); emailExternalUserMessage.setIdTicket( daoUtil.getInt( nIndex++ ) ); emailExternalUserMessage.setEmailRecipients( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setEmailRecipientsCc( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setMessageQuestion( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setMessageResponse( daoUtil.getString( nIndex++ ) ); emailExternalUserMessage.setIsAnswered( daoUtil.getBoolean( nIndex++ ) ); emailExternalUserMessage.setEmailSubject( daoUtil.getString( nIndex++ ) ); |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/web/task/TicketingTaskComponent.java | 211 |
fr/paris/lutece/plugins/workflow/modules/ticketing/web/task/TicketingTaskComponent.java | 287 |
ReferenceList lstRef = new ReferenceList( listUnitByLevel.size( ) ); ReferenceItem emptyReferenceItem = new ReferenceItem( ); emptyReferenceItem.setCode( StringUtils.EMPTY ); emptyReferenceItem.setName( I18nService.getLocalizedString( MESSAGE_DEFAULT_LABEL_ENTITY_TASK_FORM, Locale.FRANCE ) ); emptyReferenceItem.setChecked( true ); lstRef.add( emptyReferenceItem ); for ( AssigneeUnit unit : listUnitByLevel ) { if ( RBACService.isAuthorized( unit, AssigneeUnit.PERMISSION_ASSIGN, (User) user ) ) { lstRef.addItem( unit.getUnitId( ), unit.getName( ) ); } } return lstRef; } |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyDaemon.java | 107 |
fr/paris/lutece/plugins/workflow/modules/ticketing/service/daemon/NotifyLevel3Daemon.java | 90 |
private int nIdActionRetourFromContribNiv3 = AppPropertiesService.getPropertyInt( "workflow-ticketing.actions.id.return.sollicite.contrib_un", TicketingConstants.PROPERTY_UNSET_INT ); // nombre de relances maximum avant retour de la sollicitation private int nbRelanceMax = PluginConfigurationService.getInt( PluginConfigurationService.PROPERTY_RELANCE_NB_MAX, 3 ); // durée en jours entre chaque relance private int nFrequence = PluginConfigurationService.getInt( PluginConfigurationService.PROPERTY_RELANCE_FREQUENCE, 10 ); @Override public void run( ) { setLastRunLogs( processNotification( ) ); } private String processNotification( ) { StringBuilder sbLog = new StringBuilder( ); boolean isParamOK = isConfParamOK( sbLog ); if ( !isParamOK ) { return sbLog.toString( ); } // Date execution Date dateExecution = new Date( ); int nNbTicketRelance = 0; int nNbTicketRetour = 0; // step 0: récupération des ressources au statut "En attente d'une reponse" List<Integer> listResourceWaitingId = _workflowService.getResourceIdListByIdState( nIdStateWaiting, Ticket.TICKET_RESOURCE_TYPE ); |