fr.paris.lutece.plugins.quiz.service.outputprocessor
Class QuizOutputProcessorManagementService

java.lang.Object
  extended by fr.paris.lutece.plugins.quiz.service.outputprocessor.QuizOutputProcessorManagementService

public final class QuizOutputProcessorManagementService
extends Object

Service to manage quiz output processors.


Method Summary
 void changeProcessorEnabling(String strProcessorId, int nIdQuiz)
          Enable or disable a processor for a given quiz.
 void disableProcessors(int nIdQuiz)
          Disable every enabled processors for a given quiz
static QuizOutputProcessorManagementService getInstance()
          Get the instance of the service
 IQuizOutputProcessor getProcessor(String strProcessorId)
          Get a processor from its id
 List<IQuizOutputProcessor> getProcessorsList()
          Get the list of every processors
 boolean isProcessorEnabled(String strProcessorId, int nIdQuiz)
          Check if a processor is enabled or not for a given quiz
 void processEnabledProcessors(Map<String,String[]> mapAnswers, String strScore, int nIdQuiz)
          Process every enabled processors for a given quiz over answers made by a user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static QuizOutputProcessorManagementService getInstance()
Get the instance of the service

Returns:
The instance of the service

getProcessorsList

public List<IQuizOutputProcessor> getProcessorsList()
Get the list of every processors

Returns:
the list of every processors

getProcessor

public IQuizOutputProcessor getProcessor(String strProcessorId)
Get a processor from its id

Parameters:
strProcessorId - The id of the processor to get
Returns:
The processor, or null if no processor has the given id

isProcessorEnabled

public boolean isProcessorEnabled(String strProcessorId,
                                  int nIdQuiz)
Check if a processor is enabled or not for a given quiz

Parameters:
strProcessorId - The id of the processor to check
nIdQuiz - The id of the quiz
Returns:
True if the processor is enabled, false otherwise

changeProcessorEnabling

public void changeProcessorEnabling(String strProcessorId,
                                    int nIdQuiz)
Enable or disable a processor for a given quiz. If the processor was enabled, it is disabled and vice versa

Parameters:
nIdQuiz - The id of the quiz
strProcessorId - The id of the processor to enable or disable

disableProcessors

public void disableProcessors(int nIdQuiz)
Disable every enabled processors for a given quiz

Parameters:
nIdQuiz - the id of the quiz to disable processors of

processEnabledProcessors

public void processEnabledProcessors(Map<String,String[]> mapAnswers,
                                     String strScore,
                                     int nIdQuiz)
Process every enabled processors for a given quiz over answers made by a user

Parameters:
mapAnswers - the map containing answers
nIdQuiz - The id of the answered quiz


Copyright © 2014 Mairie de Paris. All Rights Reserved.