public class CourseOfferingServiceTestDataLoader extends AbstractMockServicesAwareDataLoader
TestAwareDataLoader
api is used by the TestCourseOfferingServiceMockImpl to coordinate the data clear and load operations.
The data modeled here probably should have come from this picture in the CourseOfferingService documentation :
Documentation
We also define some methods that can be used to insert specific kinds of data into various spots for each example CourseOffering.Modifier and Type | Class and Description |
---|---|
static interface |
CourseOfferingServiceTestDataLoader.CourseOfferingCreationDetails |
Modifier and Type | Field and Description |
---|---|
protected AcalTestDataLoader |
acalDataLoader |
protected AcademicCalendarService |
acalService |
protected AtpService |
atpService |
static String |
CHEM123_COURSE_ID |
static String |
CHEM123_COURSE_OFFERING_ID |
static String |
CHEM123_LEC_AND_LAB_FORMAT_OFFERING_ID |
protected CourseOfferingService |
coService |
protected CourseOfferingCodeGenerator |
courseCodeGenerator |
protected CourseService |
courseService |
static String |
ENG101_COURSE_ID |
static String |
ENG101_COURSE_OFFERING_ID |
static String |
ENG101_LEC_ONLY_FORMAT_OFFERING_ID |
static String |
FALL_2012_TERM_ID |
protected RegistrationGroupCodeGeneratorFactory |
registrationGroupCodeGeneratorFactory |
applicationContext, context, initialized
Constructor and Description |
---|
CourseOfferingServiceTestDataLoader() |
afterTest, beforeTest, isInitialized, setApplicationContext
public static final String CHEM123_COURSE_ID
public static final String CHEM123_COURSE_OFFERING_ID
public static final String CHEM123_LEC_AND_LAB_FORMAT_OFFERING_ID
public static final String ENG101_COURSE_ID
public static final String ENG101_COURSE_OFFERING_ID
public static final String ENG101_LEC_ONLY_FORMAT_OFFERING_ID
public static final String FALL_2012_TERM_ID
protected AcademicCalendarService acalService
protected CourseOfferingService coService
protected CourseService courseService
protected AtpService atpService
protected CourseOfferingCodeGenerator courseCodeGenerator
protected RegistrationGroupCodeGeneratorFactory registrationGroupCodeGeneratorFactory
protected AcalTestDataLoader acalDataLoader
public CourseOfferingServiceTestDataLoader()
public void beforeTest(boolean loadInstructors) throws Exception
Exception
protected void initializeData() throws Exception
initializeData
in class AbstractMockServicesAwareDataLoader
Exception
protected void initializeData(boolean loadInstructors) throws Exception
Exception
public void loadTerms() throws PermissionDeniedException, OperationFailedException, InvalidParameterException, ReadOnlyException, MissingParameterException, DataValidationErrorException
public TermInfo createTerm(String id, String name, String atpTypeKey, Date startDate, Date endDate, ContextInfo context) throws OperationFailedException, DataValidationErrorException, InvalidParameterException, MissingParameterException, PermissionDeniedException, ReadOnlyException
public void createCourseByTemplate(TermInfo term, String subjectCode, String courseNumberCode, ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException, DoesNotExistException, CircularRelationshipException, DependentObjectsExistException, UnsupportedActionException, DoesNotExistException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException
AlreadyExistsException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
VersionMismatchException
DoesNotExistException
CircularRelationshipException
DependentObjectsExistException
UnsupportedActionException
ReadOnlyException
public String createCourse(TermInfo term, String subjectCode, String courseNumberCode, ContextInfo context) throws AlreadyExistsException, VersionMismatchException, CircularRelationshipException, DependentObjectsExistException, UnsupportedActionException, DoesNotExistException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException
AlreadyExistsException
VersionMismatchException
CircularRelationshipException
DependentObjectsExistException
UnsupportedActionException
DoesNotExistException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
ReadOnlyException
public void createCourseOffering(TermInfo term, CourseInfo canonicalCourse, ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException, DoesNotExistException, CircularRelationshipException, DependentObjectsExistException, UnsupportedActionException, DoesNotExistException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException
AlreadyExistsException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
VersionMismatchException
DoesNotExistException
CircularRelationshipException
DependentObjectsExistException
UnsupportedActionException
ReadOnlyException
protected void createCourseCHEM123(TermInfo term, boolean loadInstructors, ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException, DoesNotExistException, CircularRelationshipException, DependentObjectsExistException, UnsupportedActionException, DoesNotExistException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException
AlreadyExistsException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
VersionMismatchException
DoesNotExistException
CircularRelationshipException
DependentObjectsExistException
UnsupportedActionException
ReadOnlyException
public String createCourseOffering(TermInfo term, CourseOfferingServiceTestDataLoader.CourseOfferingCreationDetails details, ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException, DoesNotExistException, CircularRelationshipException, DependentObjectsExistException, UnsupportedActionException, DoesNotExistException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException
AlreadyExistsException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
VersionMismatchException
DoesNotExistException
CircularRelationshipException
DependentObjectsExistException
UnsupportedActionException
ReadOnlyException
public void createLabActivityOfferingForCHEM123(String labCode, ContextInfo context) throws DoesNotExistException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException
protected void createCourseENG101(TermInfo term, boolean loadInstructors, ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException, DoesNotExistException, CircularRelationshipException, DependentObjectsExistException, UnsupportedActionException, DoesNotExistException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException
AlreadyExistsException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
VersionMismatchException
DoesNotExistException
CircularRelationshipException
DependentObjectsExistException
UnsupportedActionException
ReadOnlyException
public TermInfo getFall2012()
public void setFall2012(TermInfo fall2012)
public TermInfo getSpring2012()
public void setSpring2012(TermInfo spring2012)
public void setAcalService(AcademicCalendarService acalService)
acalService
- the acalService to setpublic void setCoService(CourseOfferingService coService)
coService
- the coService to setpublic void setCourseService(CourseService courseService)
courseService
- the courseService to setpublic void setAtpService(AtpService atpService)
atpService
- the atpService to setpublic void setCourseCodeGenerator(CourseOfferingCodeGenerator courseCodeGenerator)
courseCodeGenerator
- the courseCodeGenerator to setpublic void setRegistrationGroupCodeGeneratorFactory(RegistrationGroupCodeGeneratorFactory registrationGroupCodeGeneratorFactory)
registrationGroupCodeGeneratorFactory
- the registrationGroupCodeGeneratorFactory to setpublic void setAcalDataLoader(AcalTestDataLoader acalDataLoader)
acalDataLoader
- the acalDataLoader to setpublic void setLoadBaseData(boolean loadBaseData)
loadBaseData
- the loadBaseData to setCopyright © 2004-2013 The Kuali Foundation. All Rights Reserved.