org.kuali.student.lum.course.service.assembler
Class CourseAssembler

java.lang.Object
  extended by org.kuali.student.lum.course.service.assembler.CourseAssembler
All Implemented Interfaces:
BOAssembler<CourseInfo,CluInfo>

public class CourseAssembler
extends Object
implements BOAssembler<CourseInfo,CluInfo>

Assembler for CourseInfo. Provides assemble and disassemble operation on CourseInfo from/to CluInfo and other base DTOs

Author:
Kuali Student Team

Field Summary
private  CluAssemblerUtils cluAssemblerUtils
           
private  CourseJointAssembler courseJointAssembler
           
private  FormatAssembler formatAssembler
           
private  LoAssembler loAssembler
           
(package private) static Logger LOG
           
private  LearningObjectiveService loService
           
private  LrcService lrcService
           
private  LuService luService
           
 
Constructor Summary
CourseAssembler()
           
 
Method Summary
 CourseInfo assemble(CluInfo clu, CourseInfo courseInfo, boolean shallowBuild)
          This method assembles the business DTO from its base DTO.
private  List<ResultComponentInfo> assembleCreditOptions(List<CluResultInfo> cluResults)
           
private  List<CourseCrossListingInfo> assembleCrossListings(List<CluIdentifierInfo> cluIdents)
           
private  List<String> assembleGradingOptions(List<CluResultInfo> cluResults)
           
private  List<CourseVariationInfo> assembleVariations(List<CluIdentifierInfo> cluIdents)
           
private  String calculateCourseCode(String subjectArea, String suffixNumber)
          This method calculates code for course and cross listed course.
 BaseDTOAssemblyNode<CourseInfo,CluInfo> disassemble(CourseInfo course, BaseDTOAssemblyNode.NodeOperation operation)
          This method returns a collection of base DTOs and the operations that need to be performed on them in a given order
private  List<BaseDTOAssemblyNode<?,?>> disassembleCreditOutcomes(CourseInfo course, CluInfo clu, List<CluResultInfo> currentCluResults, BaseDTOAssemblyNode.NodeOperation operation)
           
private  List<BaseDTOAssemblyNode<?,?>> disassembleFormats(String nodeId, CourseInfo course, BaseDTOAssemblyNode.NodeOperation operation)
           
private  BaseDTOAssemblyNode<?,?> disassembleGradingOptions(String cluId, String courseState, List<String> options, List<CluResultInfo> currentCluResults, BaseDTOAssemblyNode.NodeOperation operation)
           
private  List<BaseDTOAssemblyNode<?,?>> disassembleJoints(String nodeId, CourseInfo course, BaseDTOAssemblyNode.NodeOperation operation)
           
private  List<BaseDTOAssemblyNode<?,?>> disassembleLos(String cluId, CourseInfo course, BaseDTOAssemblyNode.NodeOperation operation)
           
 void setCluAssemblerUtils(CluAssemblerUtils cluAssemblerUtils)
           
 void setCourseJointAssembler(CourseJointAssembler courseJointAssembler)
           
 void setFormatAssembler(FormatAssembler formatAssembler)
           
 void setLoAssembler(LoAssembler loAssembler)
           
 void setLoService(LearningObjectiveService loService)
           
 void setLrcService(LrcService lrcService)
           
 void setLuService(LuService luService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

static final Logger LOG

luService

private LuService luService

formatAssembler

private FormatAssembler formatAssembler

courseJointAssembler

private CourseJointAssembler courseJointAssembler

loAssembler

private LoAssembler loAssembler

loService

private LearningObjectiveService loService

cluAssemblerUtils

private CluAssemblerUtils cluAssemblerUtils

lrcService

private LrcService lrcService
Constructor Detail

CourseAssembler

public CourseAssembler()
Method Detail

assemble

public CourseInfo assemble(CluInfo clu,
                           CourseInfo courseInfo,
                           boolean shallowBuild)
                    throws AssemblyException
Description copied from interface: BOAssembler
This method assembles the business DTO from its base DTO.

Specified by:
assemble in interface BOAssembler<CourseInfo,CluInfo>
Parameters:
clu - Base DTO that corresponds to the business DTO
courseInfo - Reference to Business DTO
shallowBuild - boolean flag to indicate if the assembly should be shallow or deep
Returns:
Assembled business DTO
Throws:
AssemblyException

disassemble

public BaseDTOAssemblyNode<CourseInfo,CluInfo> disassemble(CourseInfo course,
                                                           BaseDTOAssemblyNode.NodeOperation operation)
                                                    throws AssemblyException
Description copied from interface: BOAssembler
This method returns a collection of base DTOs and the operations that need to be performed on them in a given order

Specified by:
disassemble in interface BOAssembler<CourseInfo,CluInfo>
Parameters:
course - Business DTO to be disassembled
Returns:
A sorted map of BaseDTOAssemblyNodes to be processed in the given order. The key (Integer) is the sequence in which the nodes have to be processed
Throws:
AssemblyException

disassembleCreditOutcomes

private List<BaseDTOAssemblyNode<?,?>> disassembleCreditOutcomes(CourseInfo course,
                                                                 CluInfo clu,
                                                                 List<CluResultInfo> currentCluResults,
                                                                 BaseDTOAssemblyNode.NodeOperation operation)
                                                          throws AssemblyException,
                                                                 NumberFormatException
Throws:
AssemblyException
NumberFormatException

assembleGradingOptions

private List<String> assembleGradingOptions(List<CluResultInfo> cluResults)

assembleCreditOptions

private List<ResultComponentInfo> assembleCreditOptions(List<CluResultInfo> cluResults)
                                                 throws AssemblyException
Throws:
AssemblyException

disassembleLos

private List<BaseDTOAssemblyNode<?,?>> disassembleLos(String cluId,
                                                      CourseInfo course,
                                                      BaseDTOAssemblyNode.NodeOperation operation)
                                               throws AssemblyException
Throws:
AssemblyException

disassembleGradingOptions

private BaseDTOAssemblyNode<?,?> disassembleGradingOptions(String cluId,
                                                           String courseState,
                                                           List<String> options,
                                                           List<CluResultInfo> currentCluResults,
                                                           BaseDTOAssemblyNode.NodeOperation operation)
                                                    throws AssemblyException
Throws:
AssemblyException

disassembleFormats

private List<BaseDTOAssemblyNode<?,?>> disassembleFormats(String nodeId,
                                                          CourseInfo course,
                                                          BaseDTOAssemblyNode.NodeOperation operation)
                                                   throws AssemblyException,
                                                          DoesNotExistException,
                                                          InvalidParameterException,
                                                          MissingParameterException,
                                                          OperationFailedException
Throws:
AssemblyException
DoesNotExistException
InvalidParameterException
MissingParameterException
OperationFailedException

assembleVariations

private List<CourseVariationInfo> assembleVariations(List<CluIdentifierInfo> cluIdents)

assembleCrossListings

private List<CourseCrossListingInfo> assembleCrossListings(List<CluIdentifierInfo> cluIdents)

disassembleJoints

private List<BaseDTOAssemblyNode<?,?>> disassembleJoints(String nodeId,
                                                         CourseInfo course,
                                                         BaseDTOAssemblyNode.NodeOperation operation)
                                                  throws AssemblyException
Throws:
AssemblyException

calculateCourseCode

private String calculateCourseCode(String subjectArea,
                                   String suffixNumber)
This method calculates code for course and cross listed course.

Parameters:
subjectArea -
suffixNumber -
Returns:

setLuService

public void setLuService(LuService luService)

setFormatAssembler

public void setFormatAssembler(FormatAssembler formatAssembler)

setCourseJointAssembler

public void setCourseJointAssembler(CourseJointAssembler courseJointAssembler)

setLoAssembler

public void setLoAssembler(LoAssembler loAssembler)

setLoService

public void setLoService(LearningObjectiveService loService)

setCluAssemblerUtils

public void setCluAssemblerUtils(CluAssemblerUtils cluAssemblerUtils)

setLrcService

public void setLrcService(LrcService lrcService)


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.