org.sakaiproject.component.app.syllabus
Class SyllabusManagerImpl

java.lang.Object
  extended byorg.springframework.dao.support.DaoSupport
      extended byorg.springframework.orm.hibernate.support.HibernateDaoSupport
          extended byorg.sakaiproject.component.app.syllabus.SyllabusManagerImpl
All Implemented Interfaces:
InitializingBean, SyllabusManager

public class SyllabusManagerImpl
extends HibernateDaoSupport
implements SyllabusManager

SyllabusManagerImpl provides convenience functions to query the database

Version:
$Id:
Author:
Jarrod Lannan

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
SyllabusManagerImpl()
           
 
Method Summary
 void addSyllabusAttachToSyllabusData(SyllabusData syllabusData, SyllabusAttachment syllabusAttach)
           
 void addSyllabusToSyllabusItem(SyllabusItem syllabusItem, SyllabusData syllabusData)
          addSyllabusToSyllabusItem adds a SyllabusData object to syllabi collection
 SyllabusAttachment createSyllabusAttachmentObject(String attachId, String name)
           
 SyllabusData createSyllabusDataObject(String title, Integer position, String asset, String view, String status, String emailNotification)
          createSyllabusData creates a persistent SyllabusData object
 SyllabusItem createSyllabusItem(String userId, String contextId, String redirectURL)
          createSyllabusItem creates a new SyllabusItem
 Integer findLargestSyllabusPosition(SyllabusItem syllabusItem)
          findLargestSyllabusPosition finds the largest syllabus data position for an item
 Set getSyllabiForSyllabusItem(SyllabusItem syllabusItem)
          getSyllabiForSyllabusItem returns the collection of syllabi
 SyllabusAttachment getSyllabusAttachment(String syllabusAttachId)
           
 Set getSyllabusAttachmentsForSyllabusData(SyllabusData syllabusData)
           
 SyllabusData getSyllabusData(String dataId)
           
 SyllabusItem getSyllabusItemByContextId(String contextId)
          getSyllabusItemByContextId finds a SyllabusItem
 SyllabusItem getSyllabusItemByUserAndContextIds(String userId, String contextId)
          getSyllabusItemByUserAndContextIds finds a SyllabusItem
 void removeSyllabusAttachmentObject(SyllabusAttachment o)
           
 void removeSyllabusAttachSyllabusData(SyllabusData syllabusData, SyllabusAttachment syllabusAttach)
           
 void removeSyllabusDataObject(SyllabusData o)
          removes a syllabus data object (on form cancel action)
 void removeSyllabusFromSyllabusItem(SyllabusItem syllabusItem, SyllabusData syllabusData)
          removeSyllabusToSyllabusItem loads many side of the relationship
 void saveSyllabus(SyllabusData data)
          saveSyllabus persists a SyllabusData object
 void saveSyllabusAttachment(SyllabusAttachment attach)
           
 void saveSyllabusItem(SyllabusItem item)
          saveSyllabusItem persists a SyllabusItem
 void swapSyllabusDataPositions(SyllabusItem syllabusItem, SyllabusData d1, SyllabusData d2)
          swapSyllabusDataPositions swaps positions for two SyllabusData objects
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
checkDaoConfig, closeSessionIfNecessary, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyllabusManagerImpl

public SyllabusManagerImpl()
Method Detail

createSyllabusItem

public SyllabusItem createSyllabusItem(String userId,
                                       String contextId,
                                       String redirectURL)
createSyllabusItem creates a new SyllabusItem

Specified by:
createSyllabusItem in interface SyllabusManager
Parameters:
userId -
contextId -
redirectURL -

getSyllabiForSyllabusItem

public Set getSyllabiForSyllabusItem(SyllabusItem syllabusItem)
getSyllabiForSyllabusItem returns the collection of syllabi

Specified by:
getSyllabiForSyllabusItem in interface SyllabusManager
Parameters:
syllabusItem -

createSyllabusDataObject

public SyllabusData createSyllabusDataObject(String title,
                                             Integer position,
                                             String asset,
                                             String view,
                                             String status,
                                             String emailNotification)
createSyllabusData creates a persistent SyllabusData object

Specified by:
createSyllabusDataObject in interface SyllabusManager
Parameters:
title -
position -
view -
status -
emailNotification -

removeSyllabusDataObject

public void removeSyllabusDataObject(SyllabusData o)
removes a syllabus data object (on form cancel action)

Specified by:
removeSyllabusDataObject in interface SyllabusManager
See Also:
SyllabusManager.removeSyllabusDataObject(org.sakaiproject.api.app.syllabus.SyllabusData)

swapSyllabusDataPositions

public void swapSyllabusDataPositions(SyllabusItem syllabusItem,
                                      SyllabusData d1,
                                      SyllabusData d2)
swapSyllabusDataPositions swaps positions for two SyllabusData objects

Specified by:
swapSyllabusDataPositions in interface SyllabusManager
Parameters:
syllabusItem -
d1 -
d2 -

findLargestSyllabusPosition

public Integer findLargestSyllabusPosition(SyllabusItem syllabusItem)
findLargestSyllabusPosition finds the largest syllabus data position for an item

Specified by:
findLargestSyllabusPosition in interface SyllabusManager
Parameters:
syllabusItem -

getSyllabusItemByContextId

public SyllabusItem getSyllabusItemByContextId(String contextId)
getSyllabusItemByContextId finds a SyllabusItem

Specified by:
getSyllabusItemByContextId in interface SyllabusManager
Parameters:
contextId -
Returns:
SyllabusItem

getSyllabusItemByUserAndContextIds

public SyllabusItem getSyllabusItemByUserAndContextIds(String userId,
                                                       String contextId)
getSyllabusItemByUserAndContextIds finds a SyllabusItem

Specified by:
getSyllabusItemByUserAndContextIds in interface SyllabusManager
Parameters:
userId -
contextId -
Returns:
SyllabusItem

addSyllabusToSyllabusItem

public void addSyllabusToSyllabusItem(SyllabusItem syllabusItem,
                                      SyllabusData syllabusData)
addSyllabusToSyllabusItem adds a SyllabusData object to syllabi collection

Specified by:
addSyllabusToSyllabusItem in interface SyllabusManager
Parameters:
syllabusItem -
syllabusData -
Returns:
Set

removeSyllabusFromSyllabusItem

public void removeSyllabusFromSyllabusItem(SyllabusItem syllabusItem,
                                           SyllabusData syllabusData)
removeSyllabusToSyllabusItem loads many side of the relationship

Specified by:
removeSyllabusFromSyllabusItem in interface SyllabusManager
Parameters:
syllabusItem -
syllabusData -
Returns:
Set

saveSyllabusItem

public void saveSyllabusItem(SyllabusItem item)
saveSyllabusItem persists a SyllabusItem

Specified by:
saveSyllabusItem in interface SyllabusManager
Parameters:
item -

saveSyllabus

public void saveSyllabus(SyllabusData data)
saveSyllabus persists a SyllabusData object

Specified by:
saveSyllabus in interface SyllabusManager

getSyllabusData

public SyllabusData getSyllabusData(String dataId)
Specified by:
getSyllabusData in interface SyllabusManager

createSyllabusAttachmentObject

public SyllabusAttachment createSyllabusAttachmentObject(String attachId,
                                                         String name)
Specified by:
createSyllabusAttachmentObject in interface SyllabusManager

saveSyllabusAttachment

public void saveSyllabusAttachment(SyllabusAttachment attach)
Specified by:
saveSyllabusAttachment in interface SyllabusManager

addSyllabusAttachToSyllabusData

public void addSyllabusAttachToSyllabusData(SyllabusData syllabusData,
                                            SyllabusAttachment syllabusAttach)
Specified by:
addSyllabusAttachToSyllabusData in interface SyllabusManager

removeSyllabusAttachmentObject

public void removeSyllabusAttachmentObject(SyllabusAttachment o)
Specified by:
removeSyllabusAttachmentObject in interface SyllabusManager

removeSyllabusAttachSyllabusData

public void removeSyllabusAttachSyllabusData(SyllabusData syllabusData,
                                             SyllabusAttachment syllabusAttach)
Specified by:
removeSyllabusAttachSyllabusData in interface SyllabusManager

getSyllabusAttachmentsForSyllabusData

public Set getSyllabusAttachmentsForSyllabusData(SyllabusData syllabusData)
Specified by:
getSyllabusAttachmentsForSyllabusData in interface SyllabusManager

getSyllabusAttachment

public SyllabusAttachment getSyllabusAttachment(String syllabusAttachId)
Specified by:
getSyllabusAttachment in interface SyllabusManager