com.gentics.api.lib.datasource
Interface MultichannellingDatasource

All Superinterfaces:
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
 DatasourceChannel getChannel()
          Get the currently used channel.
 List<DatasourceChannel> getChannelPath()
          Get the path to the current channel (if one is set).
 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

getChannel

DatasourceChannel getChannel()
Get the currently used channel.

Returns:
channel object (null if none selected)

getChannelPath

List<DatasourceChannel> getChannelPath()
Get the path to the current channel (if one is set). The first entry will be the master node, the last entry the currently used channel.

Returns:
path to the current channel or null if no channel was set.

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.