Interface MoodleWebService
- All Known Implementing Classes:
MoodleWebServiceImpl
public interface MoodleWebService
Client class for the Moodle web service.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncoreUserGetUsersByField(MoodleWebService.CoreUserGetUserByFieldFilters filter, List<String> values) Searches for a user in Moodle.getURL()Returns the URL to the Moodle web service.toolOpencastGetCoursesForInstructor(String username) Returns the list of Moodle course IDs the given user has the instructor capability.toolOpencastGetCoursesForLearner(String username) Returns the list of Moodle course IDs the given user has the learner capability.toolOpencastGetGroupsForLearner(String username) Returns the list of Moodle group IDs where the given user has the learner capability.
-
Field Details
-
MOODLE_FUNCTION_CORE_USER_GET_USERS_BY_FIELD
- See Also:
-
MOODLE_FUNCTION_TOOL_OPENCAST_GET_COURSES_FOR_INSTRUCTOR
- See Also:
-
MOODLE_FUNCTION_TOOL_OPENCAST_GET_COURSES_FOR_LEARNER
- See Also:
-
MOODLE_FUNCTION_TOOL_OPENCAST_GET_GROUPS_FOR_LEARNER
- See Also:
-
-
Method Details
-
coreUserGetUsersByField
List<MoodleUser> coreUserGetUsersByField(MoodleWebService.CoreUserGetUserByFieldFilters filter, List<String> values) throws URISyntaxException, IOException, MoodleWebServiceException, org.json.simple.parser.ParseException Searches for a user in Moodle.- Parameters:
filter- Filter type to applyvalues- Value for the filter.- Returns:
- A
MoodleUserlist. - Throws:
URISyntaxException- In case the URL cannot be constructed.IOException- In case of an IO error.MoodleWebServiceException- In case Moodle returns an error.org.json.simple.parser.ParseException- In case the Moodle response cannot be parsed.
-
toolOpencastGetCoursesForInstructor
List<String> toolOpencastGetCoursesForInstructor(String username) throws URISyntaxException, IOException, MoodleWebServiceException, org.json.simple.parser.ParseException Returns the list of Moodle course IDs the given user has the instructor capability.- Parameters:
username- The username to search for.- Returns:
- A list of Moodle course IDs.
- Throws:
URISyntaxException- In case the URL cannot be constructed.IOException- In case of an IO error.MoodleWebServiceException- In case Moodle returns an error.org.json.simple.parser.ParseException- In case the Moodle response cannot be parsed.
-
toolOpencastGetCoursesForLearner
List<String> toolOpencastGetCoursesForLearner(String username) throws URISyntaxException, IOException, MoodleWebServiceException, org.json.simple.parser.ParseException Returns the list of Moodle course IDs the given user has the learner capability.- Parameters:
username- The username to search for.- Returns:
- A list of Moodle course IDs.
- Throws:
URISyntaxException- In case the URL cannot be constructed.IOException- In case of an IO error.MoodleWebServiceException- In case Moodle returns an error.org.json.simple.parser.ParseException- In case the Moodle response cannot be parsed.
-
toolOpencastGetGroupsForLearner
List<String> toolOpencastGetGroupsForLearner(String username) throws URISyntaxException, IOException, MoodleWebServiceException, org.json.simple.parser.ParseException Returns the list of Moodle group IDs where the given user has the learner capability.- Parameters:
username- The username to search for.- Returns:
- A list of Moodle group IDs.
- Throws:
URISyntaxException- In case the URL cannot be constructed.IOException- In case of an IO error.MoodleWebServiceException- In case Moodle returns an error.org.json.simple.parser.ParseException- In case the Moodle response cannot be parsed.
-
getURL
String getURL()Returns the URL to the Moodle web service.- Returns:
- URL to the Moodle web service.
-