org.jasig.portal.channel.dao
Interface IChannelTypeDao

All Known Implementing Classes:
JpaChannelTypeDao

public interface IChannelTypeDao


Method Summary
 IChannelType createChannelType(String name, String clazz, String cpdUri)
          Creates, initializes and persists a new IChannelType based on the specified parameters
 void deleteChannelType(IChannelType type)
          Removes the specified IChannelType from the persistent store.
 IChannelType getChannelType(int id)
          Get a IChannelType for the specified id.
 IChannelType getChannelType(String name)
          Get a IChannelType for the specified name
 List<IChannelType> getChannelTypes()
           
 IChannelType updateChannelType(IChannelType type)
          Persists changes to a IChannelType.
 

Method Detail

createChannelType

IChannelType createChannelType(String name,
                               String clazz,
                               String cpdUri)
Creates, initializes and persists a new IChannelType based on the specified parameters

Parameters:
name - The name of the channel type
clazz - The Java Class the type represents
cpdUri - The URI to the CPD file used when publishing channels of this type
Returns:
A newly created, initialized and persisted IChannelType
Throws:
DataIntegrityViolationException - If a IChannelType already exists for the provide arguments
IllegalArgumentException - If any of the parameters are null

updateChannelType

IChannelType updateChannelType(IChannelType type)
Persists changes to a IChannelType.

Parameters:
type - The channel type to store the changes for
Throws:
IllegalArgumentException - if type is null.

deleteChannelType

void deleteChannelType(IChannelType type)
Removes the specified IChannelType from the persistent store.

Parameters:
type - The type to remove.
Throws:
IllegalArgumentException - if type is null.

getChannelType

IChannelType getChannelType(int id)
Get a IChannelType for the specified id.

Parameters:
id - The id to get the type for.
Returns:
The channel type for the id, null if no type exists for the id.

getChannelType

IChannelType getChannelType(String name)
Get a IChannelType for the specified name

Parameters:
name - The name to get the type for.
Returns:
The channel type for the name, null if no type exists for the fname.
Throws:
IllegalArgumentException - if name is null.

getChannelTypes

List<IChannelType> getChannelTypes()
Returns:
A List of all persisted IChannelTypes


Copyright © 2010 Jasig. All Rights Reserved.