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
Modifier and TypeFieldDescriptionprotected ODFHelper
The ODF helperprotected OdfReferenceTableHelper
The ODF reference table helperprotected AmetysObjectResolver
The Ametys object resolverprotected org.ametys.odf.course.ShareableCourseHelper.ShareableConfiguration
The shareable course configurationprotected ShareableCourseStatusHelper
The shareable course statusstatic final String
The component role. -
Constructor Summary
-
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 fieldvoid
configure
(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 theCourse
s with shareable filters matching the given argumentsboolean
Return true if shareable course are handledboolean
initializeShareableFields
(Course courseContent, List<CourseList> courseListContents, UserIdentity user, boolean ignoreRights) Initialize the shareable course fieldsboolean
initializeShareableFields
(Course courseContent, CourseList courseListContent, UserIdentity user, boolean ignoreRights) Initialize the shareable course fieldsboolean
isShareableFieldsMatch
(Course courseContent, CourseList courseList) True if shareable course fields match with the course listvoid
service
(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:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in 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:
true
if 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
-