Package lumis.doui.source
Class SourceContainer
- java.lang.Object
-
- lumis.doui.source.SourceContainer
-
@StableMinor(version="16.1", sinceVersion="4.0") public class SourceContainer extends java.lang.Object
Class responsible for hold and initialize doui sources- Since:
- 4.0.0
- Version:
- $Revision: 26157 $ $Date: 2024-01-13 11:35:03 -0300 (Sat, 13 Jan 2024) $
-
-
Field Summary
Fields Modifier and Type Field Description protected Source
defaultSource
protected DouiContext
douiContext
static java.lang.String
NO_SOURCE
protected SourceContext
sourceContext
protected org.w3c.dom.Node[]
sourceDefinitionNodes
protected java.util.Map<java.lang.String,Source>
sourcesById
protected java.util.ArrayList<java.lang.String>
sourcesIdArray
-
Constructor Summary
Constructors Constructor Description SourceContainer(DouiContext douiContext)
Constructor that receives a DouiContext objectSourceContainer(org.w3c.dom.Node[] sourceDefinitionNodes)
Constructor that receives xml definition nodes of sources
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSource(Source source)
<S extends Source>
SgetDefaultSource()
DouiContext
getDouiContext()
<S extends Source>
SgetSourceById(java.lang.String id)
SourceContext
getSourceContext()
java.util.Map<java.lang.String,Source>
getSourcesMap()
Returns the map with the sources in this source container.void
init()
void
loadSources()
protected void
loadSourcesRecursively()
-
-
-
Field Detail
-
NO_SOURCE
public static final java.lang.String NO_SOURCE
- See Also:
- Constant Field Values
-
douiContext
protected final DouiContext douiContext
-
sourceContext
protected final SourceContext sourceContext
-
sourcesById
protected final java.util.Map<java.lang.String,Source> sourcesById
-
sourcesIdArray
protected final java.util.ArrayList<java.lang.String> sourcesIdArray
-
defaultSource
protected Source defaultSource
-
sourceDefinitionNodes
protected org.w3c.dom.Node[] sourceDefinitionNodes
-
-
Constructor Detail
-
SourceContainer
public SourceContainer(org.w3c.dom.Node[] sourceDefinitionNodes)
Constructor that receives xml definition nodes of sources- Since:
- 4.0.6
-
SourceContainer
public SourceContainer(DouiContext douiContext)
Constructor that receives a DouiContext object- Since:
- 4.0.0
-
-
Method Detail
-
init
public void init() throws PortalException
- Throws:
PortalException
-
addSource
public void addSource(Source source) throws PortalException
- Throws:
PortalException
-
getSourceById
public <S extends Source> S getSourceById(java.lang.String id)
-
getDefaultSource
public <S extends Source> S getDefaultSource()
-
getSourceContext
public SourceContext getSourceContext()
-
getDouiContext
public DouiContext getDouiContext()
-
loadSources
public void loadSources() throws PortalException
- Throws:
PortalException
-
loadSourcesRecursively
protected void loadSourcesRecursively() throws PortalException
- Throws:
PortalException
-
getSourcesMap
public java.util.Map<java.lang.String,Source> getSourcesMap()
Returns the map with the sources in this source container. The key of the map is the id of the source, and the value is the source instance.- Returns:
- the map with the sources in this source container.
-
-