Class QualificationServiceImpl
java.lang.Object
ch.tocco.nice2.optional.qualification.impl.services.QualificationServiceImpl
- All Implemented Interfaces:
QualificationService
-
Constructor Summary
ConstructorDescriptionQualificationServiceImpl
(QueryBuilderFactory queryBuilderFactory, DefaultDisplayService defaultDisplayService, TextResources textResources, Context context, SecurityManager securityManager, L10N l10n, EntityDefaultValueService defaultValueService) -
Method Summary
Modifier and TypeMethodDescriptionint
getL10N()
getMc()
getNodeDataForUsers
(InputNode inputNode, List<PrimaryKey> participantKeys, InputDataLogicContribution.ContextData contextData) Get the relevant InputData for some given participants for this InputNode See implementations ofInputDataLogicContribution
for different data gathering strategies The default implementations loads Input_data by filtering by Input.date in the past and picking the newest, filled Input_dataint
boolean
void
setChildrenBasePromotionStatusFlag
(boolean setBaseStatusOnChildren) void
setDefaultMaxGrade
(double grade) void
setDefaultMinGrade
(double grade) void
setDefaultRounding
(double rounding) void
setGradesNumberFormat
(int digits) void
setInputDataLogicContributions
(List<InputDataLogicContribution> contributions) void
setPointsNumberFormat
(int digits) void
boolean
void
need to synchronize this method, so no two threads create the same entities at the same time...wrapEvaluationDataEntity
(Entity evaluationDataEntity) wrap an Evaluation_data instance
-
Constructor Details
-
QualificationServiceImpl
public QualificationServiceImpl(QueryBuilderFactory queryBuilderFactory, DefaultDisplayService defaultDisplayService, TextResources textResources, Context context, SecurityManager securityManager, L10N l10n, EntityDefaultValueService defaultValueService)
-
-
Method Details
-
getRelevantRegistrationStatuses
- Specified by:
getRelevantRegistrationStatuses
in interfaceQualificationService
-
getQueryBuilderFactory
- Specified by:
getQueryBuilderFactory
in interfaceQualificationService
-
getDefaultDisplayService
- Specified by:
getDefaultDisplayService
in interfaceQualificationService
-
getTextResources
- Specified by:
getTextResources
in interfaceQualificationService
-
getSecurityManager
- Specified by:
getSecurityManager
in interfaceQualificationService
-
getPersistContext
- Specified by:
getPersistContext
in interfaceQualificationService
-
getL10N
- Specified by:
getL10N
in interfaceQualificationService
-
getDefaultValueService
- Specified by:
getDefaultValueService
in interfaceQualificationService
-
getMc
- Specified by:
getMc
in interfaceQualificationService
-
getGradeDecimalDigits
public int getGradeDecimalDigits()- Specified by:
getGradeDecimalDigits
in interfaceQualificationService
-
getPointsDecimalDigits
public int getPointsDecimalDigits()- Specified by:
getPointsDecimalDigits
in interfaceQualificationService
-
getGradesNumberFormat
- Specified by:
getGradesNumberFormat
in interfaceQualificationService
-
getPointsNumberFormat
- Specified by:
getPointsNumberFormat
in interfaceQualificationService
-
commaSeparatedString
- Specified by:
commaSeparatedString
in interfaceQualificationService
-
isHideFinishButton
public boolean isHideFinishButton()- Specified by:
isHideFinishButton
in interfaceQualificationService
-
getExtensions
- Specified by:
getExtensions
in interfaceQualificationService
-
updateInputDatasForParticipants
need to synchronize this method, so no two threads create the same entities at the same time...- Specified by:
updateInputDatasForParticipants
in interfaceQualificationService
- Parameters:
input
- an Input
-
wrapEvaluationDataEntity
Description copied from interface:QualificationService
wrap an Evaluation_data instance- Specified by:
wrapEvaluationDataEntity
in interfaceQualificationService
- Parameters:
evaluationDataEntity
- an Evaluation_data entity- Returns:
- an object wrapping the provided entity
-
getDefaultMinGrade
- Specified by:
getDefaultMinGrade
in interfaceQualificationService
-
getDefaultMaxGrade
- Specified by:
getDefaultMaxGrade
in interfaceQualificationService
-
getDefaultRounding
- Specified by:
getDefaultRounding
in interfaceQualificationService
-
shouldSetBaseStatusOnChildren
public boolean shouldSetBaseStatusOnChildren()- Specified by:
shouldSetBaseStatusOnChildren
in interfaceQualificationService
-
getNodeDataForUsers
public List<InputData> getNodeDataForUsers(InputNode inputNode, List<PrimaryKey> participantKeys, InputDataLogicContribution.ContextData contextData) Description copied from interface:QualificationService
Get the relevant InputData for some given participants for this InputNode See implementations ofInputDataLogicContribution
for different data gathering strategies The default implementations loads Input_data by filtering by Input.date in the past and picking the newest, filled Input_data- Specified by:
getNodeDataForUsers
in interfaceQualificationService
- Parameters:
inputNode
- the node data is being loaded forparticipantKeys
- the keys of the User entitiescontextData
- additional info used byInputDataLogicContribution
- Returns:
- InputData for the specified participants
-
setQualificationServiceExtensions
@Autowired(required=false) public void setQualificationServiceExtensions(Collection<QualificationServiceExtension> extensions) -
setInputDataLogicContributions
@Autowired @Lazy public void setInputDataLogicContributions(List<InputDataLogicContribution> contributions) -
setGradesNumberFormat
@Value("${nice2.optional.qualification.gradeFormat.digits}") @VisibleForTesting public void setGradesNumberFormat(int digits) -
setPointsNumberFormat
@Value("${nice2.optional.qualification.pointsFormat.digits}") @VisibleForTesting public void setPointsNumberFormat(int digits) -
setDefaultMinGrade
@Value("${nice2.optional.qualification.gradeScaleMin}") public void setDefaultMinGrade(double grade) -
setDefaultMaxGrade
@Value("${nice2.optional.qualification.gradeScaleMax}") public void setDefaultMaxGrade(double grade) -
setDefaultRounding
@Value("${nice2.optional.qualification.defaultRounding}") public void setDefaultRounding(double rounding) -
setChildrenBasePromotionStatusFlag
@Value("${nice2.optional.qualification.setBaseStatusOnChildren}") public void setChildrenBasePromotionStatusFlag(boolean setBaseStatusOnChildren)
-