001/*
002 *  Copyright 2010 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package org.ametys.odf.course;
017
018import java.util.List;
019
020
021/**
022 * Interface representing a container of courses
023 */
024public interface CourseContainer
025{
026    /**
027     * Get the list of child {@link Course}
028     * @return the courses id in a List
029     */
030    public List<Course> getCourses();
031    
032    /**
033     * Determines if the container contains a courses
034     * @param courseId id of the {@link Course} to test
035     * @return true if the course exists
036     */
037    public boolean containsCourse (String courseId);
038    
039    /**
040     * Determines if the container contains courses
041     * @return true if the container contains at least one course
042     */
043    public boolean hasCourses();
044}