org.jasig.portlet.calendar.dao
Class HibernateCalendarStore

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by org.jasig.portlet.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
protected  org.apache.commons.logging.Log log
           
 
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(Long id)
          Retrieve a calendar configuration.
 List<UserDefinedCalendarConfiguration> getCalendarConfigurations(String subscribeId)
          Retrieve a list of calendar configurations for the specified portlet.
 CalendarDefinition getCalendarDefinition(Long id)
          Retrieve a calendar definition.
 CalendarDefinition getCalendarDefinition(String fname)
           
 List<PredefinedCalendarDefinition> getHiddenPredefinedCalendarDefinitions(String subscribeId, Set<String> roles)
          Retrieve a list of hidden predefined calendars for this portlet subscription and role.
 PredefinedCalendarConfiguration getPredefinedCalendarConfiguration(String subscribeId, String name)
          Retrieve a PredefinedCalendarConfiguration for the specified subscribeId and name.
 List<PredefinedCalendarConfiguration> getPredefinedCalendarConfigurations()
          Retrieve a list of all pre-defined calendar configurations.
 List<PredefinedCalendarConfiguration> getPredefinedCalendarConfigurations(String subscribeId, boolean visibleOnly)
          Retrieve a list of pre-defined calendar configurations for the specified portlet.
 PredefinedCalendarDefinition getPredefinedCalendarDefinition(Long id)
          Retrieve a pre-defined calendar definition
 PredefinedCalendarDefinition getPredefinedCalendarDefinitionByName(String name)
          Retrieve a pre-defined calendar definition based on the name field.
 List<PredefinedCalendarDefinition> getPredefinedCalendarDefinitions()
          Retrieves all pre-defined calendar definition
 UserDefinedCalendarConfiguration getUserDefinedCalendarConfiguration(String subscribeId, String name)
          Retrieve a list of all user-defined calendar configurations.
 List<UserDefinedCalendarConfiguration> getUserDefinedCalendarConfigurations()
          Retrieve a list of all user-defined calendar configurations.
 List<UserDefinedCalendarConfiguration> getUserDefinedCalendarConfigurations(String subscribeId, boolean visibleOnly)
          Retrieve a list of user-defined calendar configurations for the specified portlet.
 List<String> getUserRoles()
          Get a list of all user roles currently in use.
 void initCalendar(String subscribeId, Set<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
 

Field Detail

log

protected final org.apache.commons.logging.Log log
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 List<UserDefinedCalendarConfiguration> getCalendarConfigurations(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:

getUserDefinedCalendarConfiguration

public UserDefinedCalendarConfiguration getUserDefinedCalendarConfiguration(String subscribeId,
                                                                            String name)
Description copied from interface: CalendarStore
Retrieve a list of all user-defined calendar configurations.

Specified by:
getUserDefinedCalendarConfiguration in interface CalendarStore
Parameters:
subscribeId - Unique ID for this portlet subscription
name - Name of the desired calendar
Returns:

getUserDefinedCalendarConfigurations

public List<UserDefinedCalendarConfiguration> getUserDefinedCalendarConfigurations()
Description copied from interface: CalendarStore
Retrieve a list of all user-defined calendar configurations.

Specified by:
getUserDefinedCalendarConfigurations in interface CalendarStore
Returns:

getUserDefinedCalendarConfigurations

public List<UserDefinedCalendarConfiguration> getUserDefinedCalendarConfigurations(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:

getPredefinedCalendarConfiguration

public PredefinedCalendarConfiguration getPredefinedCalendarConfiguration(String subscribeId,
                                                                          String name)
Description copied from interface: CalendarStore
Retrieve a PredefinedCalendarConfiguration for the specified subscribeId and name.

Specified by:
getPredefinedCalendarConfiguration in interface CalendarStore
Parameters:
subscribeId - unique ID for this portlet subscription
name - Name of the corresponding PredefinedCalendarDefinition
Returns:

getPredefinedCalendarConfigurations

public List<PredefinedCalendarConfiguration> getPredefinedCalendarConfigurations(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 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 List<PredefinedCalendarDefinition> getHiddenPredefinedCalendarDefinitions(String subscribeId,
                                                                                 Set<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(String subscribeId,
                         Set<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

getPredefinedCalendarDefinitions

public List<PredefinedCalendarDefinition> getPredefinedCalendarDefinitions()
Description copied from interface: CalendarStore
Retrieves all pre-defined calendar definition

Specified by:
getPredefinedCalendarDefinitions in interface CalendarStore
Returns:

getPredefinedCalendarDefinitionByName

public PredefinedCalendarDefinition getPredefinedCalendarDefinitionByName(String name)
Description copied from interface: CalendarStore
Retrieve a pre-defined calendar definition based on the name field.

Specified by:
getPredefinedCalendarDefinitionByName in interface CalendarStore
Parameters:
name - Name of the calendar definition to be retrieved
Returns:

getPredefinedCalendarDefinition

public PredefinedCalendarDefinition getPredefinedCalendarDefinition(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(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:

getCalendarDefinition

public CalendarDefinition getCalendarDefinition(String fname)
Specified by:
getCalendarDefinition in interface CalendarStore

getCalendarConfiguration

public CalendarConfiguration getCalendarConfiguration(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 List<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 © 2012 Jasig. All Rights Reserved.