edu.mit.stellar.images.component
Class CollectionManagerImpl

java.lang.Object
  extended byorg.springframework.dao.support.DaoSupport
      extended byorg.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended byedu.mit.stellar.images.component.CollectionManagerImpl
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean

public class CollectionManagerImpl
extends org.springframework.orm.hibernate3.support.HibernateDaoSupport

Manager for all image operations.

Version:
$Revision: 1385 $, $Date: 2006-08-11 18:43:20 -0400 (Fri, 11 Aug 2006) $
Author:
MIT Stellar team

Nested Class Summary
 class CollectionManagerImpl.CourseLecturePage
           
 class CollectionManagerImpl.lectureByDate
           
 class CollectionManagerImpl.LecturePage
           
 
Field Summary
(package private) static org.hibernate.SessionFactory mySessionFactory
           
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
CollectionManagerImpl()
           
 
Method Summary
 void addImageToCourseCollection(java.util.Map imageInfo, java.lang.String username, java.lang.String siteHandle)
           
 void addImageToLecture(java.lang.String imageId, java.lang.String lectureId)
           
 void changeCourseCollectionItemDescription(java.lang.Long crlItemId, java.lang.String description)
           
 void changeCourseCollectionItemTitle(java.lang.Long crlItemId, java.lang.String title)
           
 void changeCourseCollectionTitle(java.lang.Long crlLectureId, java.lang.String title, java.lang.String date)
           
 CourseCollection createCourseCollection(java.lang.String name, java.lang.String description, java.lang.String siteHandle, java.lang.Long type)
           
 CourseCollectionItem createCourseCollectionItem(CourseCollection courseCollection, Item item, User user)
           
 java.util.Map createLocalImageFiles(java.lang.String largeImageURL, java.lang.String imageId, java.lang.String baseDir, java.lang.String repositoryId, java.lang.String imageMagickDir, java.lang.String urlBase)
           
 Item createLocalItemFromImageMap(java.util.Map imageInfo)
           
 NexusInfo createNexusInfo(java.lang.String siteHandle, java.lang.String siteService)
           
 User createUser(java.lang.String username, java.lang.String domain, java.lang.String userservice)
           
 boolean deleteImageFromCourseCollectionItem(java.lang.Long crlItemId)
           
 void deleteImageFromCourseCollectionItem(java.lang.Long crlItemId, java.lang.String baseDir)
           
 void deleteImageFromLecture(java.lang.Long crlItemId, java.lang.Long crlPageId)
           
 void deleteLectureFromCourseCollection(java.lang.Long crlLectureId)
           
 java.lang.String downloadImage(java.lang.String largeImageURL, java.lang.String imageId, java.lang.String repositoryId, java.lang.String baseDir)
           
 CourseCollection getCourseCollectionById(java.lang.String id)
           
 CourseCollection getCourseCollectionBySiteHandle(java.lang.String sitehandle)
           
 CourseCollectionItem getCourseCollectionItemById(java.lang.String id)
           
 java.lang.Long getCourseCollectionItemId()
           
 java.util.Vector getCourseCollectionItemSet()
          used from .jsp
 java.util.Vector getCourseCollectionItemVector(java.lang.String siteHandle)
           
 java.util.Vector getCourseCollectionLectureItemsSet()
          used from .jsp
 java.util.Vector getCourseCollectionLectureItemsVector(java.lang.Long lectureId)
           
 java.util.Vector getCourseCollectionLectureSet()
          used from .jsp
 java.util.Vector getCourseCollectionLectureVector(java.lang.String siteHandle)
           
 CollectionManagerImpl.CourseLecturePage getCourseLecturePage()
           
 java.lang.String getDownloadJournal()
           
 java.util.HashMap getImageItemInfo()
           
 java.lang.Long getLectureId()
           
 java.util.Vector getLecturePageSet()
           
 java.util.Vector getLecturePageVector(java.lang.Long lectureId)
           
 org.hibernate.SessionFactory getMySessionFactory()
           
 NexusInfo getNexusInfoBySiteHandle(java.lang.String siteHandle)
           
 java.lang.String getSiteHandle()
           
 User getUser()
          Return the User based on the userName field
 User getUserByUserName(java.lang.String username)
           
 java.lang.String getUserName()
           
 boolean isImageRemoved()
           
 boolean isImageSaved()
           
 void saveLecturePageVector(java.util.Vector mLecturePageVector)
           
 void setCourseCollectionItemId(java.lang.Long crsCollectionItemId)
           
 void setDownloadJournal(java.lang.String newDownloadJournal)
           
 void setImageItemInfo(java.util.HashMap imageItemInfo)
           
 void setLectureId(java.lang.Long lectureId)
          used from .jsp
 void setMySessionFactory(org.hibernate.SessionFactory sesf)
           
 void setSiteHandle(java.lang.String sitehandle)
          used from .jsp
 void setUserName(java.lang.String userName)
           
 void updateCourseCollectionItemDescription(CourseCollectionItem crlItem, java.lang.String description)
           
 void updateCourseCollectionItemOrder(java.lang.Long crlItemId, java.lang.Long order)
           
 void updateCourseCollectionItemTitle(CourseCollectionItem crlItem, java.lang.String title)
           
 void updateCourseCollectionPageOrder(java.lang.Long crlPageId, long order)
           
 void updateCouseCollectionPageTemplate(java.lang.String crlPageTemplate, java.lang.String crlLectureId, java.lang.Long crlPageId)
           
 
Methods inherited from class org.springframework.orm.hibernate3.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
 

Field Detail

mySessionFactory

static org.hibernate.SessionFactory mySessionFactory
Constructor Detail

CollectionManagerImpl

public CollectionManagerImpl()
Method Detail

getCourseLecturePage

public CollectionManagerImpl.CourseLecturePage getCourseLecturePage()

getDownloadJournal

public java.lang.String getDownloadJournal()
Returns:

setDownloadJournal

public void setDownloadJournal(java.lang.String newDownloadJournal)

getMySessionFactory

public org.hibernate.SessionFactory getMySessionFactory()

setMySessionFactory

public void setMySessionFactory(org.hibernate.SessionFactory sesf)

setUserName

public void setUserName(java.lang.String userName)

getUserName

public java.lang.String getUserName()
Returns:
Returns the userName.

getUser

public User getUser()
Return the User based on the userName field


getSiteHandle

public java.lang.String getSiteHandle()

setSiteHandle

public void setSiteHandle(java.lang.String sitehandle)
used from .jsp


getLectureId

public java.lang.Long getLectureId()

setLectureId

public void setLectureId(java.lang.Long lectureId)
used from .jsp


getImageItemInfo

public java.util.HashMap getImageItemInfo()

setImageItemInfo

public void setImageItemInfo(java.util.HashMap imageItemInfo)

getCourseCollectionItemId

public java.lang.Long getCourseCollectionItemId()
Returns:
Returns the courseCollectionItemId.

setCourseCollectionItemId

public void setCourseCollectionItemId(java.lang.Long crsCollectionItemId)

createUser

public User createUser(java.lang.String username,
                       java.lang.String domain,
                       java.lang.String userservice)

getUserByUserName

public User getUserByUserName(java.lang.String username)

createNexusInfo

public NexusInfo createNexusInfo(java.lang.String siteHandle,
                                 java.lang.String siteService)

getNexusInfoBySiteHandle

public NexusInfo getNexusInfoBySiteHandle(java.lang.String siteHandle)

createCourseCollection

public CourseCollection createCourseCollection(java.lang.String name,
                                               java.lang.String description,
                                               java.lang.String siteHandle,
                                               java.lang.Long type)

getCourseCollectionBySiteHandle

public CourseCollection getCourseCollectionBySiteHandle(java.lang.String sitehandle)

getCourseCollectionById

public CourseCollection getCourseCollectionById(java.lang.String id)

getCourseCollectionLectureVector

public java.util.Vector getCourseCollectionLectureVector(java.lang.String siteHandle)
Returns:
Vector of CourseCollection (lectures) for current siteHandle

createCourseCollectionItem

public CourseCollectionItem createCourseCollectionItem(CourseCollection courseCollection,
                                                       Item item,
                                                       User user)

getCourseCollectionItemById

public CourseCollectionItem getCourseCollectionItemById(java.lang.String id)

getCourseCollectionItemVector

public java.util.Vector getCourseCollectionItemVector(java.lang.String siteHandle)
Returns:
Vector of CourseCollectionItems for siteHandle

getCourseCollectionLectureItemsVector

public java.util.Vector getCourseCollectionLectureItemsVector(java.lang.Long lectureId)
Returns:
Vector of CourseCollectionItems for lecture

addImageToCourseCollection

public void addImageToCourseCollection(java.util.Map imageInfo,
                                       java.lang.String username,
                                       java.lang.String siteHandle)

addImageToLecture

public void addImageToLecture(java.lang.String imageId,
                              java.lang.String lectureId)

updateCouseCollectionPageTemplate

public void updateCouseCollectionPageTemplate(java.lang.String crlPageTemplate,
                                              java.lang.String crlLectureId,
                                              java.lang.Long crlPageId)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

updateCourseCollectionItemTitle

public void updateCourseCollectionItemTitle(CourseCollectionItem crlItem,
                                            java.lang.String title)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

changeCourseCollectionTitle

public void changeCourseCollectionTitle(java.lang.Long crlLectureId,
                                        java.lang.String title,
                                        java.lang.String date)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

changeCourseCollectionItemTitle

public void changeCourseCollectionItemTitle(java.lang.Long crlItemId,
                                            java.lang.String title)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

updateCourseCollectionItemOrder

public void updateCourseCollectionItemOrder(java.lang.Long crlItemId,
                                            java.lang.Long order)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

updateCourseCollectionPageOrder

public void updateCourseCollectionPageOrder(java.lang.Long crlPageId,
                                            long order)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

updateCourseCollectionItemDescription

public void updateCourseCollectionItemDescription(CourseCollectionItem crlItem,
                                                  java.lang.String description)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

changeCourseCollectionItemDescription

public void changeCourseCollectionItemDescription(java.lang.Long crlItemId,
                                                  java.lang.String description)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

deleteLectureFromCourseCollection

public void deleteLectureFromCourseCollection(java.lang.Long crlLectureId)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

deleteImageFromLecture

public void deleteImageFromLecture(java.lang.Long crlItemId,
                                   java.lang.Long crlPageId)
                            throws java.lang.Exception
Throws:
java.lang.Exception

deleteImageFromCourseCollectionItem

public void deleteImageFromCourseCollectionItem(java.lang.Long crlItemId,
                                                java.lang.String baseDir)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

deleteImageFromCourseCollectionItem

public boolean deleteImageFromCourseCollectionItem(java.lang.Long crlItemId)
                                            throws java.lang.Exception
Throws:
java.lang.Exception

getLecturePageSet

public java.util.Vector getLecturePageSet()
Returns:
Vector of LecturePages for current lectureId

getLecturePageVector

public java.util.Vector getLecturePageVector(java.lang.Long lectureId)
Returns:
Vector of LecturePage for lectureId

getCourseCollectionItemSet

public java.util.Vector getCourseCollectionItemSet()
used from .jsp


getCourseCollectionLectureSet

public java.util.Vector getCourseCollectionLectureSet()
used from .jsp


getCourseCollectionLectureItemsSet

public java.util.Vector getCourseCollectionLectureItemsSet()
used from .jsp


isImageSaved

public boolean isImageSaved()

isImageRemoved

public boolean isImageRemoved()
                       throws java.lang.Exception
Throws:
java.lang.Exception

downloadImage

public java.lang.String downloadImage(java.lang.String largeImageURL,
                                      java.lang.String imageId,
                                      java.lang.String repositoryId,
                                      java.lang.String baseDir)
                               throws java.io.IOException
Throws:
java.io.IOException

createLocalImageFiles

public java.util.Map createLocalImageFiles(java.lang.String largeImageURL,
                                           java.lang.String imageId,
                                           java.lang.String baseDir,
                                           java.lang.String repositoryId,
                                           java.lang.String imageMagickDir,
                                           java.lang.String urlBase)
                                    throws java.io.IOException,
                                           java.lang.Exception
Throws:
java.io.IOException
java.lang.Exception

saveLecturePageVector

public void saveLecturePageVector(java.util.Vector mLecturePageVector)

createLocalItemFromImageMap

public Item createLocalItemFromImageMap(java.util.Map imageInfo)


Copyright 2005-2005-2006 MIT AMPS. All Rights Reserved.