lumis.portal.channel
Class ChannelDaoJdbc

Package class diagram package ChannelDaoJdbc
java.lang.Object
  extended by lumis.portal.channel.ChannelDaoJdbc
All Implemented Interfaces:
IChannelDao

public class ChannelDaoJdbc
extends Object
implements IChannelDao

Dao implementation for channels, based on JDBC.

Since:
4.0.0

Constructor Summary
ChannelDaoJdbc()
           
 
Method Summary
 void add(ChannelConfig channelConfig, ITransaction transaction)
          Add the channel.
 void addCss(String channelId, String cssId, int position, ITransaction transaction)
          Add the CSS of the channel.
 boolean checkForChannelPrefix(ChannelConfig channelConfig, ITransaction transaction)
          Returns if the channel prefix for local groups is already in use.
 void delete(String channelId, ITransaction transaction)
          Delete the channel.
 void deleteCss(String channelId, String cssId, ITransaction transaction)
          Delete the CSS of the channel.
 String generateRandomChannelPrefix(ITransaction transaction)
          Generates a new random channel prefix, that is not already in use.
 ChannelConfig get(String channelId, ITransaction transaction)
          Returns the channel with the specified channelId.
 int getChannelTreeCount(String rootChannelId, ITransaction transaction)
           
 List<String> getChannelTreeIds(String rootChannelId, ITransaction transaction)
           
 List<String> getCssIds(String channelId, ITransaction transaction)
          Get the ids of the channel's CSS.
 String getIdByChannelPrefix(ChannelConfig channelConfig, ITransaction transaction)
           
 Collection<String> getIdsByPageTemplateId(String pageTemplateId, ITransaction transaction)
          Get the Ids of all channels that have the specified page template as the default page template
 List<String> getIdsByParentTemplateId(String parentTemplateId, ITransaction transaction)
          Get the Ids of all channels associated with the specified template id.
 List<String> getSubChannelIds(String channelId, ITransaction transaction)
          Get a list with ids of the sub channels.
 void update(ChannelConfig channelConfig, ITransaction transaction)
          Update the channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelDaoJdbc

public ChannelDaoJdbc()
Method Detail

get

public ChannelConfig get(String channelId,
                         ITransaction transaction)
                  throws DaoException,
                         PortalException
Description copied from interface: IChannelDao
Returns the channel with the specified channelId.

Specified by:
get in interface IChannelDao
Parameters:
channelId - the channelId.
transaction - the transaction for persistence access.
Returns:
the channel.
Throws:
PortalObjectNotFoundException - if the channel was not found.
DaoException
PortalException

add

public void add(ChannelConfig channelConfig,
                ITransaction transaction)
         throws DaoException,
                PortalException
Description copied from interface: IChannelDao
Add the channel.

Specified by:
add in interface IChannelDao
Throws:
DaoException
PortalException

update

public void update(ChannelConfig channelConfig,
                   ITransaction transaction)
            throws DaoException,
                   PortalException
Description copied from interface: IChannelDao
Update the channel.

Specified by:
update in interface IChannelDao
Throws:
DaoException
PortalException

getSubChannelIds

public List<String> getSubChannelIds(String channelId,
                                     ITransaction transaction)
                              throws DaoException,
                                     PortalException
Description copied from interface: IChannelDao
Get a list with ids of the sub channels.

Specified by:
getSubChannelIds in interface IChannelDao
Returns:
an array of Strings.
Throws:
DaoException
PortalException

getChannelTreeCount

public int getChannelTreeCount(String rootChannelId,
                               ITransaction transaction)
                        throws DaoException,
                               PortalException
Specified by:
getChannelTreeCount in interface IChannelDao
Throws:
DaoException
PortalException

getChannelTreeIds

public List<String> getChannelTreeIds(String rootChannelId,
                                      ITransaction transaction)
                               throws DaoException,
                                      PortalException
Specified by:
getChannelTreeIds in interface IChannelDao
Throws:
DaoException
PortalException

delete

public void delete(String channelId,
                   ITransaction transaction)
            throws DaoException,
                   PortalException
Description copied from interface: IChannelDao
Delete the channel.

Specified by:
delete in interface IChannelDao
Throws:
DaoException
PortalException

addCss

public void addCss(String channelId,
                   String cssId,
                   int position,
                   ITransaction transaction)
            throws DaoException,
                   PortalException
Description copied from interface: IChannelDao
Add the CSS of the channel.

Specified by:
addCss in interface IChannelDao
Throws:
DaoException
PortalException

deleteCss

public void deleteCss(String channelId,
                      String cssId,
                      ITransaction transaction)
               throws DaoException,
                      PortalException
Description copied from interface: IChannelDao
Delete the CSS of the channel.

Specified by:
deleteCss in interface IChannelDao
Throws:
DaoException
PortalException

getCssIds

public List<String> getCssIds(String channelId,
                              ITransaction transaction)
                       throws DaoException,
                              PortalException
Description copied from interface: IChannelDao
Get the ids of the channel's CSS.

Specified by:
getCssIds in interface IChannelDao
Returns:
an array of Strings.
Throws:
DaoException
PortalException

checkForChannelPrefix

public boolean checkForChannelPrefix(ChannelConfig channelConfig,
                                     ITransaction transaction)
                              throws DaoException,
                                     PortalException
Description copied from interface: IChannelDao
Returns if the channel prefix for local groups is already in use. If channel does not have local groups prefix specified, returns false.

Specified by:
checkForChannelPrefix in interface IChannelDao
Returns:
Throws:
PortalException
UnexpectedException
DaoException

getIdByChannelPrefix

public String getIdByChannelPrefix(ChannelConfig channelConfig,
                                   ITransaction transaction)
                            throws DaoException,
                                   PortalException
Specified by:
getIdByChannelPrefix in interface IChannelDao
Throws:
DaoException
PortalException

getIdsByParentTemplateId

public List<String> getIdsByParentTemplateId(String parentTemplateId,
                                             ITransaction transaction)
                                      throws DaoException,
                                             PortalException
Description copied from interface: IChannelDao
Get the Ids of all channels associated with the specified template id.

Specified by:
getIdsByParentTemplateId in interface IChannelDao
Returns:
Throws:
DaoException
PortalException

getIdsByPageTemplateId

public Collection<String> getIdsByPageTemplateId(String pageTemplateId,
                                                 ITransaction transaction)
                                          throws DaoException,
                                                 PortalException
Description copied from interface: IChannelDao
Get the Ids of all channels that have the specified page template as the default page template

Specified by:
getIdsByPageTemplateId in interface IChannelDao
Returns:
Throws:
DaoException
PortalException

generateRandomChannelPrefix

public String generateRandomChannelPrefix(ITransaction transaction)
                                   throws PortalException
Description copied from interface: IChannelDao
Generates a new random channel prefix, that is not already in use.

Specified by:
generateRandomChannelPrefix in interface IChannelDao
Parameters:
transaction - the transaction for persistence access.
Returns:
the generated channel prefix.
Throws:
PortalException


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.