com.gentics.api.lib.datasource
Interface MultichannellingDatasource

All Superinterfaces:
java.lang.Cloneable, Datasource
All Known Subinterfaces:
WritableMultichannellingDatasource

public interface MultichannellingDatasource
extends Datasource

Interface for a multichannelling aware Datasource


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.gentics.api.lib.datasource.Datasource
Datasource.Sorting
 
Field Summary
 
Fields inherited from interface com.gentics.api.lib.datasource.Datasource
SORTORDER_ASC, SORTORDER_DESC, SORTORDER_NONE
 
Method Summary
 java.util.List<java.util.List<DatasourceChannel>> getChannelPaths()
          Get the list of paths to the currently selected channels.
 java.util.List<DatasourceChannel> getChannels()
          Get the currently used channels (one for each separate channel structure).
 ChannelTree getChannelStructure()
          Get the whole structure of nodes and channels currently contained in the datasource
 DatasourceChannel setChannel(int channelId)
          Set the channel to be used.
 
Methods inherited from interface com.gentics.api.lib.datasource.Datasource
clone, createDatasourceFilter, getCount, getCount, getCount, getCount2, getHandlePool, getId, getResult, getResult, getResult, getResult, getResult, getResult, getResult, hasChanged, hasChanged, isValidAttribute, setAttributeNames, setRuleTree
 

Method Detail

setChannel

DatasourceChannel setChannel(int channelId)
                             throws DatasourceException
Set the channel to be used. When the channel with given id cannot be set, an exception is thrown and the previous selection will remain.

Parameters:
channelId - id of the channel
Returns:
channel object (never null)
Throws:
DatasourceException - when the channel id cannot be set

getChannels

java.util.List<DatasourceChannel> getChannels()
                                              throws DatasourceException
Get the currently used channels (one for each separate channel structure). This list will be null if no channel is contained in the mccr

Returns:
list of channel objects
Throws:
DatasourceException

getChannelPaths

java.util.List<java.util.List<DatasourceChannel>> getChannelPaths()
                                                                  throws DatasourceException
Get the list of paths to the currently selected channels. In every path. the first entry will be the master node, the last entry the currently used channel.

Returns:
paths to the currently selected channels
Throws:
DatasourceException

getChannelStructure

ChannelTree getChannelStructure()
                                throws DatasourceException
Get the whole structure of nodes and channels currently contained in the datasource

Returns:
root node (containing the whole node structure)
Throws:
DatasourceException


Copyright © 2013 Gentics Software GmbH. All Rights Reserved.