org.kuali.student.lum.course.service.impl
Class CourseServiceImpl

java.lang.Object
  extended by org.kuali.student.lum.course.service.impl.CourseServiceImpl
All Implemented Interfaces:
DictionaryService, VersionManagementService, CourseService

@Transactional(readOnly=true,
               noRollbackFor=DoesNotExistException.class,
               rollbackFor=java.lang.Throwable.class)
public class CourseServiceImpl
extends Object
implements CourseService

CourseServiceImpl implements CourseService Interface by mapping DTOs in CourseInfo to underlying entity DTOs like CluInfo and CluCluRelationInfo. For Credits, there are three credit types that are set with a combination of type and dynamic attributes To set a variable(range) credit option, set the ResultComponentInfo type to CourseAssemblerConstants.COURSE_RESULT_COMP_TYPE_CREDIT_VARIABLE and add the dynamic attributes CourseAssemblerConstants.COURSE_RESULT_COMP_ATTR_MIN_CREDIT_VALUE and CourseAssemblerConstants.COURSE_RESULT_COMP_ATTR_MAX_CREDIT_VALUE with respective credit min and max values. To set a fixed credit option, set the ResultComponentInfo type to CourseAssemblerConstants.COURSE_RESULT_COMP_TYPE_CREDIT_FIXED and add the dynamic attribute CourseAssemblerConstants.COURSE_RESULT_COMP_ATTR_FIXED_CREDIT_VALUE with the fixed credit value To Set multiple credit options, set the ResultComponentInfo type to CourseAssemblerConstants.COURSE_RESULT_COMP_TYPE_CREDIT_MULTIPLE and add each credit as a numeric ResultValue on the ResultComponentInfo for each credit you desire

Author:
Kuali Student Team

Field Summary
private  CourseAssembler courseAssembler
           
private  BusinessServiceMethodInvoker courseServiceMethodInvoker
           
private  DictionaryService dictionaryServiceDelegate
           
(package private) static Logger LOG
           
private  LuService luService
           
private  StatementService statementService
           
private  ValidatorFactory validatorFactory
           
 
Constructor Summary
CourseServiceImpl()
           
 
Method Summary
private  void checkForMissingParameter(Object param, String paramName)
          Check for missing parameter and throw localized exception if missing
private  void clearStatementTreeViewIds(List<StatementTreeViewInfo> statementTreeViews)
           
private  void clearStatementTreeViewIdsRecursively(StatementTreeViewInfo statementTreeView)
           
 CourseInfo createCourse(CourseInfo courseInfo)
          Creates a Course
 StatementTreeViewInfo createCourseStatement(String courseId, StatementTreeViewInfo statementTreeViewInfo)
          Creates the Statement for a Course.
 CourseInfo createNewCourseVersion(String versionIndCourseId, String versionComment)
          Creates a new Course version based on the current course
 StatusInfo deleteCourse(String courseId)
          Deletes a Course.
 StatusInfo deleteCourseStatement(String courseId, StatementTreeViewInfo statementTreeViewInfo)
          Delete the Statement for a Course.
private  RefStatementRelationInfo findStatementReference(String courseId, StatementTreeViewInfo statementTreeViewInfo)
           
 CourseInfo getCourse(String courseId)
          Retrieves a Course
 List<ActivityInfo> getCourseActivities(String formatId)
          Retrieves the Activities for a Course.
 CourseAssembler getCourseAssembler()
           
 List<FormatInfo> getCourseFormats(String courseId)
          Retrieves the formats for a Course.
 List<LoDisplayInfo> getCourseLos(String courseId)
          Retrieves the Los for a Course.
 BusinessServiceMethodInvoker getCourseServiceMethodInvoker()
           
 List<StatementTreeViewInfo> getCourseStatements(String courseId, String nlUsageTypeKey, String language)
          Retrieves the Statements of a Course.
 VersionDisplayInfo getCurrentVersion(String refObjectTypeURI, String refObjectId)
          Retrieves current version associated with the objectId.
 VersionDisplayInfo getCurrentVersionOnDate(String refObjectTypeURI, String refObjectId, Date date)
          Retrieves the current version associated with the objectId on a given date.
 DictionaryService getDictionaryServiceDelegate()
           
 VersionDisplayInfo getFirstVersion(String refObjectTypeURI, String refObjectId)
          Retrieves first version associated with the objectId.
 VersionDisplayInfo getLatestVersion(String refObjectTypeURI, String refObjectId)
          Retrieves latest version associated with the objectId.
 LuService getLuService()
           
 ObjectStructureDefinition getObjectStructure(String objectTypeKey)
           
 List<String> getObjectTypes()
           
 StatementService getStatementService()
           
 ValidatorFactory getValidatorFactory()
           
 VersionDisplayInfo getVersionBySequenceNumber(String refObjectTypeURI, String refObjectId, Long sequence)
          Retrieves the version associated with the objectId and the sequence number.
 List<VersionDisplayInfo> getVersions(String refObjectTypeURI, String refObjectId)
          Retrieves list of version associated with the objectId.
 List<VersionDisplayInfo> getVersionsInDateRange(String refObjectTypeURI, String refObjectId, Date from, Date to)
          Retrieves the current version associated with the objectId on a given date.
private  CourseInfo processCourseInfo(CourseInfo courseInfo, BaseDTOAssemblyNode.NodeOperation operation)
           
private  void resetIds(CourseInfo course)
           
private  void resetLoRecursively(LoDisplayInfo lo)
           
 void setCourseAssembler(CourseAssembler courseAssembler)
           
 void setCourseServiceMethodInvoker(BusinessServiceMethodInvoker courseServiceMethodInvoker)
           
 StatusInfo setCurrentCourseVersion(String courseVersionId, Date currentVersionStart)
          Sets a specific version of the Course as current.
 void setDictionaryServiceDelegate(DictionaryService dictionaryServiceDelegate)
           
 void setLuService(LuService luService)
           
 void setStatementService(StatementService statementService)
           
 void setValidatorFactory(ValidatorFactory validatorFactory)
           
 CourseInfo updateCourse(CourseInfo courseInfo)
          Updates a Course.
 StatementTreeViewInfo updateCourseStatement(String courseId, StatementTreeViewInfo statementTreeViewInfo)
          Updates the Statement for a Course.
 List<ValidationResultInfo> validateCourse(String validationType, CourseInfo courseInfo)
          Validates a course based on its dictionary
 List<ValidationResultInfo> validateCourseStatement(String courseId, StatementTreeViewInfo statementTreeViewInfo)
          Validates the Statement for a Course.
 
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

courseAssembler

private CourseAssembler courseAssembler

courseServiceMethodInvoker

private BusinessServiceMethodInvoker courseServiceMethodInvoker

dictionaryServiceDelegate

private DictionaryService dictionaryServiceDelegate

validatorFactory

private ValidatorFactory validatorFactory

statementService

private StatementService statementService
Constructor Detail

CourseServiceImpl

public CourseServiceImpl()
Method Detail

createCourse

@Transactional(readOnly=false)
public CourseInfo createCourse(CourseInfo courseInfo)
                        throws AlreadyExistsException,
                               DataValidationErrorException,
                               InvalidParameterException,
                               MissingParameterException,
                               OperationFailedException,
                               PermissionDeniedException,
                               VersionMismatchException,
                               DoesNotExistException,
                               CircularRelationshipException,
                               DependentObjectsExistException,
                               UnsupportedActionException
Description copied from interface: CourseService
Creates a Course

Specified by:
createCourse in interface CourseService
Parameters:
courseInfo - courseInfo
Returns:
the created course
Throws:
AlreadyExistsException - The Course already exists
DataValidationErrorException - One or more values invalid for this operation
InvalidParameterException - invalid course
MissingParameterException - missing Course
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure
VersionMismatchException
DoesNotExistException
CircularRelationshipException
DependentObjectsExistException
UnsupportedActionException

updateCourse

@Transactional(readOnly=false)
public CourseInfo updateCourse(CourseInfo courseInfo)
                        throws DataValidationErrorException,
                               DoesNotExistException,
                               InvalidParameterException,
                               MissingParameterException,
                               VersionMismatchException,
                               OperationFailedException,
                               PermissionDeniedException,
                               AlreadyExistsException,
                               CircularRelationshipException,
                               DependentObjectsExistException,
                               UnsupportedActionException,
                               UnsupportedOperationException,
                               CircularReferenceException
Description copied from interface: CourseService
Updates a Course.

Specified by:
updateCourse in interface CourseService
Parameters:
courseInfo - courseInfo
Returns:
updated Course
Throws:
DataValidationErrorException - One or more values invalid for this operation
DoesNotExistException - course not found
InvalidParameterException - invalid course
MissingParameterException - missing course
VersionMismatchException - The action was attempted on an out of date version.
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure
AlreadyExistsException
CircularRelationshipException
DependentObjectsExistException
UnsupportedActionException
UnsupportedOperationException
CircularReferenceException

deleteCourse

@Transactional(readOnly=false)
public StatusInfo deleteCourse(String courseId)
                        throws DoesNotExistException,
                               InvalidParameterException,
                               MissingParameterException,
                               OperationFailedException,
                               PermissionDeniedException,
                               VersionMismatchException,
                               DataValidationErrorException,
                               AlreadyExistsException,
                               CircularRelationshipException,
                               DependentObjectsExistException,
                               UnsupportedActionException,
                               UnsupportedOperationException,
                               CircularReferenceException
Description copied from interface: CourseService
Deletes a Course.

Specified by:
deleteCourse in interface CourseService
Parameters:
courseId - identifier for Course.Maps to cluId
Returns:
status of the operation (success or failure)
Throws:
DoesNotExistException - Course does not exist
InvalidParameterException - invalid courseId
MissingParameterException - invalid courseId
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure
VersionMismatchException
DataValidationErrorException
AlreadyExistsException
CircularRelationshipException
DependentObjectsExistException
UnsupportedActionException
UnsupportedOperationException
CircularReferenceException

getCourse

public CourseInfo getCourse(String courseId)
                     throws DoesNotExistException,
                            InvalidParameterException,
                            MissingParameterException,
                            OperationFailedException,
                            PermissionDeniedException
Description copied from interface: CourseService
Retrieves a Course

Specified by:
getCourse in interface CourseService
Parameters:
courseId - Unique Id of the Course. Maps to cluId
Returns:
the created course
Throws:
DoesNotExistException - Course does not exist
InvalidParameterException - invalid course
MissingParameterException - missing Course
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getCourseActivities

public List<ActivityInfo> getCourseActivities(String formatId)
                                       throws DoesNotExistException,
                                              InvalidParameterException,
                                              MissingParameterException,
                                              OperationFailedException,
                                              PermissionDeniedException
Description copied from interface: CourseService
Retrieves the Activities for a Course.

Specified by:
getCourseActivities in interface CourseService
Parameters:
formatId - Unique Id of the Format. Maps to cluId
Returns:
a list of activity info Structures
Throws:
DoesNotExistException - Format does not exist
InvalidParameterException - invalid format
MissingParameterException - missing Format
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getCourseFormats

public List<FormatInfo> getCourseFormats(String courseId)
                                  throws DoesNotExistException,
                                         InvalidParameterException,
                                         MissingParameterException,
                                         OperationFailedException,
                                         PermissionDeniedException
Description copied from interface: CourseService
Retrieves the formats for a Course.

Specified by:
getCourseFormats in interface CourseService
Parameters:
courseId - Unique Id of the Course. Maps to cluId
Returns:
a list of format info Structures
Throws:
DoesNotExistException - Course does not exist
InvalidParameterException - invalid courseId
MissingParameterException - invalid courseId
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getCourseLos

public List<LoDisplayInfo> getCourseLos(String courseId)
                                 throws DoesNotExistException,
                                        InvalidParameterException,
                                        MissingParameterException,
                                        OperationFailedException,
                                        PermissionDeniedException
Description copied from interface: CourseService
Retrieves the Los for a Course.

Specified by:
getCourseLos in interface CourseService
Parameters:
courseId - Unique Id of the Course. Maps to cluId
Returns:
a list of LoDisplay info Structures
Throws:
DoesNotExistException - Course does not exist
InvalidParameterException - invalid courseId
MissingParameterException - invalid courseId
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getCourseStatements

public List<StatementTreeViewInfo> getCourseStatements(String courseId,
                                                       String nlUsageTypeKey,
                                                       String language)
                                                throws DoesNotExistException,
                                                       InvalidParameterException,
                                                       MissingParameterException,
                                                       OperationFailedException,
                                                       PermissionDeniedException
Description copied from interface: CourseService
Retrieves the Statements of a Course.

Specified by:
getCourseStatements in interface CourseService
Parameters:
courseId - Unique Id of the Course. Maps to cluId
nlUsageTypeKey - Natural language usage type key (context)
language - Translation language e.g en, es, gr
Returns:
a list of Statementree Structures
Throws:
DoesNotExistException - Course does not exist
InvalidParameterException - invalid courseId
MissingParameterException - invalid courseId
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

validateCourse

public List<ValidationResultInfo> validateCourse(String validationType,
                                                 CourseInfo courseInfo)
                                          throws InvalidParameterException,
                                                 MissingParameterException,
                                                 OperationFailedException
Description copied from interface: CourseService
Validates a course based on its dictionary

Specified by:
validateCourse in interface CourseService
Parameters:
validationType - identifier of the extent of validation
courseInfo - Course to be validated
Returns:
results from performing the validation
Throws:
InvalidParameterException - invalid courseId
MissingParameterException - invalid courseId
OperationFailedException - unable to complete request

createCourseStatement

@Transactional(readOnly=false)
public StatementTreeViewInfo createCourseStatement(String courseId,
                                                                         StatementTreeViewInfo statementTreeViewInfo)
                                            throws DoesNotExistException,
                                                   InvalidParameterException,
                                                   MissingParameterException,
                                                   OperationFailedException,
                                                   PermissionDeniedException,
                                                   DataValidationErrorException
Description copied from interface: CourseService
Creates the Statement for a Course.

Specified by:
createCourseStatement in interface CourseService
Parameters:
courseId - Unique Id of the Course. Maps to cluId
Returns:
created Statementree Structures
Throws:
DoesNotExistException - Course does not exist
InvalidParameterException - invalid courseId
MissingParameterException - invalid courseId
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure
DataValidationErrorException

deleteCourseStatement

@Transactional(readOnly=false)
public StatusInfo deleteCourseStatement(String courseId,
                                                              StatementTreeViewInfo statementTreeViewInfo)
                                 throws DoesNotExistException,
                                        InvalidParameterException,
                                        MissingParameterException,
                                        OperationFailedException,
                                        PermissionDeniedException
Description copied from interface: CourseService
Delete the Statement for a Course.

Specified by:
deleteCourseStatement in interface CourseService
Parameters:
courseId - Unique Id of the Course. Maps to cluId
Returns:
status of the operation (success or failure)
Throws:
DoesNotExistException - Course does not exist
InvalidParameterException - invalid courseId
MissingParameterException - invalid courseId
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

updateCourseStatement

@Transactional(readOnly=false)
public StatementTreeViewInfo updateCourseStatement(String courseId,
                                                                         StatementTreeViewInfo statementTreeViewInfo)
                                            throws DoesNotExistException,
                                                   InvalidParameterException,
                                                   MissingParameterException,
                                                   OperationFailedException,
                                                   PermissionDeniedException,
                                                   DataValidationErrorException,
                                                   CircularReferenceException,
                                                   VersionMismatchException
Description copied from interface: CourseService
Updates the Statement for a Course.

Specified by:
updateCourseStatement in interface CourseService
Parameters:
courseId - Unique Id of the Course. Maps to cluId
Returns:
updated Statementree Structures
Throws:
DoesNotExistException - Course does not exist
InvalidParameterException - invalid courseId
MissingParameterException - invalid courseId
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure
DataValidationErrorException
CircularReferenceException
VersionMismatchException

validateCourseStatement

public List<ValidationResultInfo> validateCourseStatement(String courseId,
                                                          StatementTreeViewInfo statementTreeViewInfo)
                                                   throws InvalidParameterException,
                                                          MissingParameterException,
                                                          OperationFailedException
Description copied from interface: CourseService
Validates the Statement for a Course.

Specified by:
validateCourseStatement in interface CourseService
Parameters:
courseId - Unique Id of the Course. Maps to cluId
Returns:
results from performing the validation
Throws:
InvalidParameterException - invalid courseId or stratement tree view Id
MissingParameterException - invalid courseId or statement tree view Id
OperationFailedException - unable to complete request

getObjectStructure

public ObjectStructureDefinition getObjectStructure(String objectTypeKey)
Specified by:
getObjectStructure in interface DictionaryService

getObjectTypes

public List<String> getObjectTypes()
Specified by:
getObjectTypes in interface DictionaryService

getCourseAssembler

public CourseAssembler getCourseAssembler()

setCourseAssembler

public void setCourseAssembler(CourseAssembler courseAssembler)

getCourseServiceMethodInvoker

public BusinessServiceMethodInvoker getCourseServiceMethodInvoker()

setCourseServiceMethodInvoker

public void setCourseServiceMethodInvoker(BusinessServiceMethodInvoker courseServiceMethodInvoker)

getDictionaryServiceDelegate

public DictionaryService getDictionaryServiceDelegate()

setDictionaryServiceDelegate

public void setDictionaryServiceDelegate(DictionaryService dictionaryServiceDelegate)

processCourseInfo

private CourseInfo processCourseInfo(CourseInfo courseInfo,
                                     BaseDTOAssemblyNode.NodeOperation operation)
                              throws AssemblyException,
                                     OperationFailedException,
                                     VersionMismatchException,
                                     PermissionDeniedException,
                                     MissingParameterException,
                                     InvalidParameterException,
                                     DoesNotExistException,
                                     DataValidationErrorException,
                                     AlreadyExistsException,
                                     CircularRelationshipException,
                                     DependentObjectsExistException,
                                     UnsupportedActionException,
                                     UnsupportedOperationException,
                                     CircularReferenceException
Throws:
AssemblyException
OperationFailedException
VersionMismatchException
PermissionDeniedException
MissingParameterException
InvalidParameterException
DoesNotExistException
DataValidationErrorException
AlreadyExistsException
CircularRelationshipException
DependentObjectsExistException
UnsupportedActionException
UnsupportedOperationException
CircularReferenceException

getValidatorFactory

public ValidatorFactory getValidatorFactory()

setValidatorFactory

public void setValidatorFactory(ValidatorFactory validatorFactory)

getLuService

public LuService getLuService()

setLuService

public void setLuService(LuService luService)

getStatementService

public StatementService getStatementService()

setStatementService

public void setStatementService(StatementService statementService)

createNewCourseVersion

@Transactional(readOnly=false)
public CourseInfo createNewCourseVersion(String versionIndCourseId,
                                                               String versionComment)
                                  throws DataValidationErrorException,
                                         DoesNotExistException,
                                         InvalidParameterException,
                                         MissingParameterException,
                                         OperationFailedException,
                                         PermissionDeniedException,
                                         VersionMismatchException
Description copied from interface: CourseService
Creates a new Course version based on the current course

Specified by:
createNewCourseVersion in interface CourseService
Parameters:
versionIndCourseId - identifier for the Course to be versioned
versionComment - comment for the current version
Returns:
the new versioned Course information
Throws:
DataValidationErrorException - One or more values invalid for this operation
DoesNotExistException - courseId not found
InvalidParameterException - invalid courseId
MissingParameterException - missing courseId
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure
VersionMismatchException - The action was attempted on an out of date version

clearStatementTreeViewIds

private void clearStatementTreeViewIds(List<StatementTreeViewInfo> statementTreeViews)
                                throws OperationFailedException
Throws:
OperationFailedException

clearStatementTreeViewIdsRecursively

private void clearStatementTreeViewIdsRecursively(StatementTreeViewInfo statementTreeView)
                                           throws OperationFailedException
Throws:
OperationFailedException

resetIds

private void resetIds(CourseInfo course)

resetLoRecursively

private void resetLoRecursively(LoDisplayInfo lo)

setCurrentCourseVersion

@Transactional(readOnly=false)
public StatusInfo setCurrentCourseVersion(String courseVersionId,
                                                                Date currentVersionStart)
                                   throws DoesNotExistException,
                                          InvalidParameterException,
                                          MissingParameterException,
                                          IllegalVersionSequencingException,
                                          OperationFailedException,
                                          PermissionDeniedException
Description copied from interface: CourseService
Sets a specific version of the Course as current. The sequence number must be greater than the existing current Course version. This will truncate the current version's end date to the currentVersionStart param. If a Course exists which is set to become current in the future, that course's currentVersionStart and CurrentVersionEnd will be nullified. The currentVersionStart must be in the future to prevent changing historic data.

Specified by:
setCurrentCourseVersion in interface CourseService
Parameters:
courseVersionId - Version Specific Id of the Course
currentVersionStart - Date when this course becomes current. Must be in the future and be after the most current course's start date.
Returns:
status of the operation
Throws:
DoesNotExistException - courseVersionId not found
InvalidParameterException - invalid courseVersionId, previousState, newState
MissingParameterException - missing courseVersionId, previousState, newState
IllegalVersionSequencingException - a Course with higher sequence number from the one provided is marked current
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getCurrentVersion

public VersionDisplayInfo getCurrentVersion(String refObjectTypeURI,
                                            String refObjectId)
                                     throws DoesNotExistException,
                                            InvalidParameterException,
                                            MissingParameterException,
                                            OperationFailedException,
                                            PermissionDeniedException
Description copied from interface: VersionManagementService
Retrieves current version associated with the objectId.

Specified by:
getCurrentVersion in interface VersionManagementService
Parameters:
refObjectTypeURI - reference object type URI
refObjectId - reference object Id
Returns:
current version
Throws:
DoesNotExistException - specified refObjectId, refObjectTypeURI not found
InvalidParameterException - invalid refObjectId, refObjectTypeURI
MissingParameterException - refObjectId, refObjectTypeURI not specified
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getCurrentVersionOnDate

public VersionDisplayInfo getCurrentVersionOnDate(String refObjectTypeURI,
                                                  String refObjectId,
                                                  Date date)
                                           throws DoesNotExistException,
                                                  InvalidParameterException,
                                                  MissingParameterException,
                                                  OperationFailedException,
                                                  PermissionDeniedException
Description copied from interface: VersionManagementService
Retrieves the current version associated with the objectId on a given date.

Specified by:
getCurrentVersionOnDate in interface VersionManagementService
Parameters:
refObjectTypeURI - reference object type URI
refObjectId - reference object Id
date - date
Returns:
current version on date
Throws:
DoesNotExistException - specified refObjectId, refObjectTypeURI not found
InvalidParameterException - invalid refObjectId, refObjectTypeURI, date
MissingParameterException - refObjectId, refObjectTypeURI, date not specified
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getFirstVersion

public VersionDisplayInfo getFirstVersion(String refObjectTypeURI,
                                          String refObjectId)
                                   throws DoesNotExistException,
                                          InvalidParameterException,
                                          MissingParameterException,
                                          OperationFailedException,
                                          PermissionDeniedException
Description copied from interface: VersionManagementService
Retrieves first version associated with the objectId.

Specified by:
getFirstVersion in interface VersionManagementService
Parameters:
refObjectTypeURI - reference object type URI
refObjectId - reference object Id
Returns:
first version
Throws:
DoesNotExistException - specified refObjectId, refObjectTypeURI not found
InvalidParameterException - invalid refObjectId, refObjectTypeURI
MissingParameterException - refObjectId, refObjectTypeURI not specified
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getLatestVersion

public VersionDisplayInfo getLatestVersion(String refObjectTypeURI,
                                           String refObjectId)
                                    throws DoesNotExistException,
                                           InvalidParameterException,
                                           MissingParameterException,
                                           OperationFailedException,
                                           PermissionDeniedException
Description copied from interface: VersionManagementService
Retrieves latest version associated with the objectId. This is not always the current version. A current version is what is being used by the system right now, but there could be draft version created after the current version.

Specified by:
getLatestVersion in interface VersionManagementService
Parameters:
refObjectTypeURI - reference object type URI
refObjectId - reference object Id
Returns:
current version
Throws:
DoesNotExistException - specified refObjectId, refObjectTypeURI not found
InvalidParameterException - invalid refObjectId, refObjectTypeURI
MissingParameterException - refObjectId, refObjectTypeURI not specified
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getVersionBySequenceNumber

public VersionDisplayInfo getVersionBySequenceNumber(String refObjectTypeURI,
                                                     String refObjectId,
                                                     Long sequence)
                                              throws DoesNotExistException,
                                                     InvalidParameterException,
                                                     MissingParameterException,
                                                     OperationFailedException,
                                                     PermissionDeniedException
Description copied from interface: VersionManagementService
Retrieves the version associated with the objectId and the sequence number.

Specified by:
getVersionBySequenceNumber in interface VersionManagementService
Parameters:
refObjectTypeURI - reference object type URI
refObjectId - reference object Id
sequence - sequence number
Returns:
version matching the sequence
Throws:
DoesNotExistException - specified refObjectId, refObjectTypeURI, sequence not found
InvalidParameterException - invalid refObjectId, refObjectTypeURI, sequence
MissingParameterException - refObjectId, refObjectTypeURI, sequence not specified
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getVersions

public List<VersionDisplayInfo> getVersions(String refObjectTypeURI,
                                            String refObjectId)
                                     throws DoesNotExistException,
                                            InvalidParameterException,
                                            MissingParameterException,
                                            OperationFailedException,
                                            PermissionDeniedException
Description copied from interface: VersionManagementService
Retrieves list of version associated with the objectId.

Specified by:
getVersions in interface VersionManagementService
Parameters:
refObjectTypeURI - reference object type URI
refObjectId - reference object Id
Returns:
list of versions
Throws:
DoesNotExistException - specified refObjectId, refObjectTypeURI not found
InvalidParameterException - invalid refObjectId, refObjectTypeURI
MissingParameterException - refObjectId, refObjectTypeURI not specified
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getVersionsInDateRange

public List<VersionDisplayInfo> getVersionsInDateRange(String refObjectTypeURI,
                                                       String refObjectId,
                                                       Date from,
                                                       Date to)
                                                throws DoesNotExistException,
                                                       InvalidParameterException,
                                                       MissingParameterException,
                                                       OperationFailedException,
                                                       PermissionDeniedException
Description copied from interface: VersionManagementService
Retrieves the current version associated with the objectId on a given date.

Specified by:
getVersionsInDateRange in interface VersionManagementService
Parameters:
refObjectTypeURI - reference object type URI
refObjectId - reference object Id
from - from date
to - to date
Returns:
current version on date
Throws:
DoesNotExistException - specified refObjectId, refObjectTypeURI not found
InvalidParameterException - invalid refObjectId, refObjectTypeURI, date
MissingParameterException - refObjectId, refObjectTypeURI, date not specified
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

checkForMissingParameter

private void checkForMissingParameter(Object param,
                                      String paramName)
                               throws MissingParameterException
Check for missing parameter and throw localized exception if missing

Parameters:
param -
parameter - name
Throws:
MissingParameterException

findStatementReference

private RefStatementRelationInfo findStatementReference(String courseId,
                                                        StatementTreeViewInfo statementTreeViewInfo)
                                                 throws InvalidParameterException,
                                                        MissingParameterException,
                                                        OperationFailedException,
                                                        DoesNotExistException
Parameters:
courseId -
statementTreeViewInfo -
Returns:
reference exists
Throws:
InvalidParameterException
MissingParameterException
OperationFailedException
DoesNotExistException


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