public interface IPortletTypeDao {
/**
* Creates, initializes and persists a new {@link IPortletType} based on the specified parameters
*
* @param name The name of the channel type
* @param cpdUri The URI to the CPD file used when publishing channels of this type
*
* @return A newly created, initialized and persisted {@link IPortletType}
* @throws org.springframework.dao.DataIntegrityViolationException If a IChannelType already exists for the provide arguments
* @throws IllegalArgumentException If any of the parameters are null
*/
public IPortletType createPortletType(String name, String cpdUri);
/**
* Persists changes to a {@link IPortletType}.
*
* @param type The channel type to store the changes for
* @throws IllegalArgumentException if type is null.
*/
public IPortletType updatePortletType(IPortletType type);
/**
* Removes the specified {@link IPortletType} from the persistent store.
*
* @param type The type to remove.
* @throws IllegalArgumentException if type is null.
*/
public void deletePortletType(IPortletType type);
/**
* Get a {@link IPortletType} for the specified id.
*
* @param id The id to get the type for.
* @return The channel type for the id, null if no type exists for the id.
*/
public IPortletType getPortletType(int id);
/**
* Get a {@link IPortletType} for the specified name
*
* @param name The name to get the type for.
* @return The channel type for the name, null if no type exists for the fname.
* @throws IllegalArgumentException if name is null.
*/
public IPortletType getPortletType(String name);
/**
* @return A {@link List} of all persisted {@link IPortletType}s
*/
public List<IPortletType> getPortletTypes();
}
|