edu.yale.its.tp.portlets.calendar.dao
Class HibernateCalendarStore

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by edu.yale.its.tp.portlets.calendar.dao.HibernateCalendarStore
All Implemented Interfaces:
CalendarStore, org.springframework.beans.factory.InitializingBean

public class HibernateCalendarStore
extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
implements CalendarStore

HibernateCalendarStore provides a hibernate implementation of the CalendarStore.

Author:
Jen Bourey

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
HibernateCalendarStore()
           
 
Method Summary
 void deleteCalendarConfiguration(CalendarConfiguration configuration)
          Remove a calendar configuration from the data store
 void deleteCalendarDefinition(CalendarDefinition definition)
          Remove a calendar definition from the data store.
 CalendarConfiguration getCalendarConfiguration(java.lang.Long id)
          Retrieve a calendar configuration.
 java.util.List<CalendarConfiguration> getCalendarConfigurations(java.lang.String subscribeId)
          Retrieve a list of calendar configurations for the specified portlet.
 CalendarDefinition getCalendarDefinition(java.lang.Long id)
          Retrieve a calendar definition.
 java.util.List<PredefinedCalendarDefinition> getHiddenPredefinedCalendarDefinitions(java.lang.String subscribeId, java.util.Set<java.lang.String> roles)
          Retrieve a list of hidden predefined calendars for this portlet subscription and role.
 java.util.List<PredefinedCalendarConfiguration> getPredefinedCalendarConfigurations()
          Retrieve a list of all pre-defined calendar configurations.
 java.util.List<PredefinedCalendarConfiguration> getPredefinedCalendarConfigurations(java.lang.String subscribeId, boolean visibleOnly)
          Retrieve a list of pre-defined calendar configurations for the specified portlet.
 PredefinedCalendarDefinition getPredefinedCalendarDefinition(java.lang.Long id)
          Retrieve a pre-defined calendar definition
 java.util.List<UserDefinedCalendarConfiguration> getUserDefinedCalendarConfigurations(java.lang.String subscribeId, boolean visibleOnly)
          Retrieve a list of user-defined calendar configurations for the specified portlet.
 java.util.List<java.lang.String> getUserRoles()
          Get a list of all user roles currently in use.
 void initCalendar(java.lang.String subscribeId, java.util.Set<java.lang.String> roles)
          Initialize calendar subscriptions for a given portlet subscription and role.
 void storeCalendarConfiguration(CalendarConfiguration configuration)
          Save or update a calendar configuration.
 void storeCalendarDefinition(CalendarDefinition listing)
          Save or update a calendar definition.
 
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
checkDaoConfig, 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

HibernateCalendarStore

public HibernateCalendarStore()
Method Detail

storeCalendarDefinition

public void storeCalendarDefinition(CalendarDefinition listing)
Description copied from interface: CalendarStore
Save or update a calendar definition.

Specified by:
storeCalendarDefinition in interface CalendarStore
Parameters:
listing - CalendarDefinition to be persisted

storeCalendarConfiguration

public void storeCalendarConfiguration(CalendarConfiguration configuration)
Description copied from interface: CalendarStore
Save or update a calendar configuration.

Specified by:
storeCalendarConfiguration in interface CalendarStore
Parameters:
configuration - CalendarConfiguration to be persisted

getCalendarConfigurations

public java.util.List<CalendarConfiguration> getCalendarConfigurations(java.lang.String subscribeId)
Description copied from interface: CalendarStore
Retrieve a list of calendar configurations for the specified portlet.

Specified by:
getCalendarConfigurations in interface CalendarStore
Parameters:
subscribeId - unique ID for this portlet subscription
Returns:

getUserDefinedCalendarConfigurations

public java.util.List<UserDefinedCalendarConfiguration> getUserDefinedCalendarConfigurations(java.lang.String subscribeId,
                                                                                             boolean visibleOnly)
Description copied from interface: CalendarStore
Retrieve a list of user-defined calendar configurations for the specified portlet.

Specified by:
getUserDefinedCalendarConfigurations in interface CalendarStore
Parameters:
subscribeId - unique ID for this portlet subscription
visibleOnly - true to retrieve only non-hidden calendar configurations, false otherwise
Returns:

getPredefinedCalendarConfigurations

public java.util.List<PredefinedCalendarConfiguration> getPredefinedCalendarConfigurations(java.lang.String subscribeId,
                                                                                           boolean visibleOnly)
Description copied from interface: CalendarStore
Retrieve a list of pre-defined calendar configurations for the specified portlet.

Specified by:
getPredefinedCalendarConfigurations in interface CalendarStore
Parameters:
subscribeId - unique ID for this portlet subscription
visibleOnly - true to retrieve only non-hidden calendar configurations, false otherwise
Returns:

getPredefinedCalendarConfigurations

public java.util.List<PredefinedCalendarConfiguration> getPredefinedCalendarConfigurations()
Description copied from interface: CalendarStore
Retrieve a list of all pre-defined calendar configurations.

Specified by:
getPredefinedCalendarConfigurations in interface CalendarStore
Returns:

getHiddenPredefinedCalendarDefinitions

public java.util.List<PredefinedCalendarDefinition> getHiddenPredefinedCalendarDefinitions(java.lang.String subscribeId,
                                                                                           java.util.Set<java.lang.String> roles)
Description copied from interface: CalendarStore
Retrieve a list of hidden predefined calendars for this portlet subscription and role.

Specified by:
getHiddenPredefinedCalendarDefinitions in interface CalendarStore
Parameters:
subscribeId - unique ID for this portlet subscription
roles - user role to use to find default calendars
Returns:

initCalendar

public void initCalendar(java.lang.String subscribeId,
                         java.util.Set<java.lang.String> roles)
Description copied from interface: CalendarStore
Initialize calendar subscriptions for a given portlet subscription and role.

Specified by:
initCalendar in interface CalendarStore
Parameters:
subscribeId - unique ID for this portlet subscription
roles - user roles to use to find default calendars

getPredefinedCalendarDefinition

public PredefinedCalendarDefinition getPredefinedCalendarDefinition(java.lang.Long id)
Description copied from interface: CalendarStore
Retrieve a pre-defined calendar definition

Specified by:
getPredefinedCalendarDefinition in interface CalendarStore
Parameters:
id - ID of the calendar definition to be retrieved
Returns:

getCalendarDefinition

public CalendarDefinition getCalendarDefinition(java.lang.Long id)
Description copied from interface: CalendarStore
Retrieve a calendar definition.

Specified by:
getCalendarDefinition in interface CalendarStore
Parameters:
id - ID of the calendar definition to be retrieved
Returns:

getCalendarConfiguration

public CalendarConfiguration getCalendarConfiguration(java.lang.Long id)
Description copied from interface: CalendarStore
Retrieve a calendar configuration.

Specified by:
getCalendarConfiguration in interface CalendarStore
Parameters:
id - ID of the calendar configuration to be retrieved
Returns:

deleteCalendarConfiguration

public void deleteCalendarConfiguration(CalendarConfiguration configuration)
Description copied from interface: CalendarStore
Remove a calendar configuration from the data store

Specified by:
deleteCalendarConfiguration in interface CalendarStore
Parameters:
configuration - configuration to be removed

deleteCalendarDefinition

public void deleteCalendarDefinition(CalendarDefinition definition)
Description copied from interface: CalendarStore
Remove a calendar definition from the data store.

Specified by:
deleteCalendarDefinition in interface CalendarStore
Parameters:
definition - definition to be removed

getUserRoles

public java.util.List<java.lang.String> getUserRoles()
Description copied from interface: CalendarStore
Get a list of all user roles currently in use.

Specified by:
getUserRoles in interface CalendarStore
Returns:


Copyright © 2009 Jasig. All Rights Reserved.