Package org.ametys.odf.course
Class ShareableCourseHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.course.ShareableCourseHelper
- All Implemented Interfaces:
LogEnabled,Component,Configurable,Serviceable
public class ShareableCourseHelper
extends AbstractLogEnabled
implements Component, Serviceable, Configurable
Helper for shareable course
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ODFHelperThe ODF helperprotected OdfReferenceTableHelperThe ODF reference table helperprotected AmetysObjectResolverThe Ametys object resolverprotected org.ametys.odf.course.ShareableCourseHelper.ShareableConfigurationThe shareable course configurationprotected ShareableCourseStatusHelperThe shareable course statusstatic final StringThe component role. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean_parseAutoValidated(Configuration configuration) Parse configuration to know if courses are validated after initializationprotected org.ametys.odf.course.ShareableCourseHelper.ShareableConfiguration_parseConfiguration(Configuration configuration) Parse configuration to create a shareable course configurationprotected org.ametys.odf.course.ShareableCourseHelper.ShareableField_parseDegreeField(Configuration configuration) Parse configuration to get degree fieldprotected org.ametys.odf.course.ShareableCourseHelper.ShareableField_parseOrgUnitField(Configuration configuration) Parse configuration to get orgUnit fieldprotected org.ametys.odf.course.ShareableCourseHelper.ShareableField_parsePeriodField(Configuration configuration) Parse configuration to get period fieldprotected org.ametys.odf.course.ShareableCourseHelper.ShareableField_parseProgramField(Configuration configuration) Parse configuration to get program fieldvoidconfigure(Configuration configuration) getDegrees(Set<Program> programs) Get degrees from programsgetOrgUnits(Set<Program> programs) Get orgUnits from programsgetPeriods(Set<Container> containers) Get periods from containersgetProgramIds(Set<Program> programs) Get programs ids from programsgetShareableCourses(String programId, String degreeId, String periodId, String orgUnitId) Get theCourses with shareable filters matching the given argumentsbooleanReturn true if shareable course are handledbooleaninitializeShareableFields(Course courseContent, List<CourseList> courseListContents, UserIdentity user, boolean ignoreRights) Initialize the shareable course fieldsbooleaninitializeShareableFields(Course courseContent, CourseList courseListContent, UserIdentity user, boolean ignoreRights) Initialize the shareable course fieldsbooleanisShareableFieldsMatch(Course courseContent, CourseList courseList) True if shareable course fields match with the course listvoidservice(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The component role. -
_odfRefTableHelper
The ODF reference table helper -
_odfHelper
The ODF helper -
_resolver
The Ametys object resolver
-
-
Constructor Details
-
ShareableCourseHelper
public ShareableCourseHelper()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
configure
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
_parseConfiguration
protected org.ametys.odf.course.ShareableCourseHelper.ShareableConfiguration _parseConfiguration(Configuration configuration) Parse configuration to create a shareable course configuration- Parameters:
configuration- the configuration- Returns:
- the shareable course configuration
-
_parseAutoValidated
Parse configuration to know if courses are validated after initialization- Parameters:
configuration- the configuration- Returns:
trueif courses are validated after initialization
-
_parseProgramField
protected org.ametys.odf.course.ShareableCourseHelper.ShareableField _parseProgramField(Configuration configuration) Parse configuration to get program field- Parameters:
configuration- the configuration- Returns:
- the program field
-
_parseDegreeField
protected org.ametys.odf.course.ShareableCourseHelper.ShareableField _parseDegreeField(Configuration configuration) Parse configuration to get degree field- Parameters:
configuration- the configuration- Returns:
- the degree field
-
_parsePeriodField
protected org.ametys.odf.course.ShareableCourseHelper.ShareableField _parsePeriodField(Configuration configuration) Parse configuration to get period field- Parameters:
configuration- the configuration- Returns:
- the period field
-
_parseOrgUnitField
protected org.ametys.odf.course.ShareableCourseHelper.ShareableField _parseOrgUnitField(Configuration configuration) Parse configuration to get orgUnit field- Parameters:
configuration- the configuration- Returns:
- the orgUnit field
-
getProgramIds
Get programs ids from programs- Parameters:
programs- the list of programs- Returns:
- the list of progam ids
-
getDegrees
Get degrees from programs- Parameters:
programs- the list of programs- Returns:
- the list of degrees
-
getPeriods
Get periods from containers- Parameters:
containers- the list of containers- Returns:
- the list of periods
-
getOrgUnits
Get orgUnits from programs- Parameters:
programs- the list of programs- Returns:
- the list of orgUnits
-