|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable lumis.doui.source.Source<F> lumis.doui.source.TabularSource<F>
F
- the source field class for this source.@StableMinor(version="5.5", sinceVersion="4.0") public class TabularSource<F extends ITabularSourceField>
A source that has its data in a tabular format.
Field Summary | |
---|---|
protected F |
primaryKeySourceField
|
protected List<F> |
searchableSourceFields
|
protected TabularData |
tabularData
|
Fields inherited from class lumis.doui.source.Source |
---|
administrationInterfaceId, connectionId, fields, fieldsMap, id, introductionSourceField, keywordsSourceField, load, metaDataSourceId, parameters, primaryNameSourceField, readData, SOURCE_READ_DATA_ALWAYS, SOURCE_READ_DATA_NEVER, SOURCE_READ_DATA_ON_DEMAND, sourceContext, sourceDefinitionNode |
Constructor Summary | |
---|---|
TabularSource(Node sourceDefinitionNode,
ISourceContext sourceContext)
Creates a tabular source. |
Method Summary | |
---|---|
void |
applyPostLoadFilters()
Apply the filters specified in this source to its data. |
void |
applyPostLoadPagination()
Adjusts the data of this source for pagination. |
int |
compare(ISourceData row1,
ISourceData row2)
Compares two rows based on the DouiContext.DOUI_ORDER_BY_FIELD parameter value. |
protected int |
compareField(ISourceData row1,
ISourceData row2,
String fieldId,
String direction)
Returns an integer that represents the comparason between the same field value of two different rows. |
protected void |
convertDataToDefinedDataTypes()
Converts the data in this source to the values that should be used according to its fields definitions. |
protected TabularData |
convertDataToDefinedDataTypes(TabularData originalData)
Converts the given data to another data with the values that should be used according to this source's fields definitions. |
protected F |
createSourceField(Node fieldNode)
Factory method for creating a source field instance that corresponds to the field node given. |
TabularData |
getData()
Returns this source's data. |
protected String |
getDefaultProviderClass()
Returns data provider class for the source. |
protected String |
getDefaultSourceSearchContentFillerClassName()
Returns the default source search content search filler class name. |
DouiHyperlinkItemParameterField |
getDouiHyperlinkItemParameterField()
Returns the information about the field that is associated with the item id page parameter. |
Class |
getFieldClass(String fieldId)
Returns the class object of the field. |
String |
getFieldId(String fieldCriteria)
Deprecated. This method may be removed in the future, because it is public and references field xml definition. |
Set<String> |
getFieldIds(String fieldCriteria)
Deprecated. This method may be removed in the future, because it is public and references field xml definition. |
String |
getFieldName(String fieldId)
Returns the field name given a field id. |
Node |
getFieldsDefinitionNode()
Returs the fields node of the source. |
Collection<String> |
getHyperlinkDefaultParameters()
Returns the default parameters that should be used when creating a hyperlink url from this source. |
String |
getIndexerEngineId()
Returns the identifier of the indexing engine for this source |
String |
getIndexerId()
Returns the identifier of the indexer for this source. |
int |
getMaxRows()
Returns the maximum rows that data of this source shold contain. |
F |
getPrimaryKeyField()
Returns the field id of the primary key field. |
String |
getReindexerTabularDataProcessorClassName()
Returns the class name of the reindexer for this source |
List<F> |
getSearchableFields()
Returns a collection of fields that are searchable |
String |
getSearcherEngineId()
Returns the searcher engine for this source |
String |
getSearcherId()
Returns the identifier of the searcher for this source. |
SortedSet<String> |
getSortedFieldIds(String fieldCriteria)
Deprecated. This method may be removed in the future, because it is public and references field xml definition. |
String |
getSourceSearchContentFillerClassName()
Returns the defined search filler class name |
int |
getStartAt()
Returns the row start position the data of this source shold be read from. |
boolean |
hasField(String fieldCriteria)
Deprecated. This method may be removed in the future, because it is public and references field xml definition. |
boolean |
isSearchEnabled()
Returns whether search is enabled for this source or not. |
protected void |
readFieldsIntoFieldsMap()
Reads this source's fields into the Source.fieldsMap . |
void |
reindex(boolean localServerOnly)
Deprecated. |
void |
setData(TabularData tabularData)
Sets the data in this source. |
void |
setMaxRows(int maxRows)
Sets the maximum rows that data of this source shold contain. |
void |
setStartAt(int startAt)
Sets the row start position the data of this source shold be read from. |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Field Detail |
---|
protected TabularData tabularData
protected F extends ITabularSourceField primaryKeySourceField
protected List<F extends ITabularSourceField> searchableSourceFields
Constructor Detail |
---|
public TabularSource(Node sourceDefinitionNode, ISourceContext sourceContext) throws PortalException
sourceDefinitionNode
- the source definition node.sourceContext
- the source context.
PortalException
Method Detail |
---|
protected F createSourceField(Node fieldNode) throws PortalException
Source
createSourceField
in class Source<F extends ITabularSourceField>
fieldNode
- the field node.
PortalException
Source.createCustomSourceField(Node)
protected void readFieldsIntoFieldsMap() throws PortalException
Source
Source.fieldsMap
.
The order the source fields are put in the map will define the
order the fields will be in the Source.fields
list. This
order may affect some field processing.
readFieldsIntoFieldsMap
in class Source<F extends ITabularSourceField>
PortalException
- if an error was found while reading the
source's fields into the Source.fields
map.public F getPrimaryKeyField()
public String getIndexerEngineId() throws PortalException
PortalException
public String getSearcherEngineId() throws PortalException
PortalException
public String getIndexerId() throws PortalException
PortalException
public String getSearcherId() throws PortalException
PortalException
public boolean isSearchEnabled()
public List<F> getSearchableFields()
public DouiHyperlinkItemParameterField getDouiHyperlinkItemParameterField()
Source
getDouiHyperlinkItemParameterField
in class Source<F extends ITabularSourceField>
PageConfig.PAGE_PARAMETER_ITEMID
,
DouiHyperlinkItemParameterField
public Collection<String> getHyperlinkDefaultParameters()
Source
getHyperlinkDefaultParameters
in class Source<F extends ITabularSourceField>
public Node getFieldsDefinitionNode() throws PortalException
PortalException
public Class getFieldClass(String fieldId) throws PortalException
fieldId
-
PortalException
public TabularData getData() throws PortalException
Source
getData
in class Source<F extends ITabularSourceField>
PortalException
protected void convertDataToDefinedDataTypes() throws PortalException
Source
convertDataToDefinedDataTypes
in class Source<F extends ITabularSourceField>
PortalException
protected TabularData convertDataToDefinedDataTypes(TabularData originalData) throws PortalException
originalData
- the data to be converted.
PortalException
public void setData(TabularData tabularData) throws PortalException
tabularData
- the data to set in this source.
PortalException
protected int compareField(ISourceData row1, ISourceData row2, String fieldId, String direction)
0 signifies equality 1 signifies the first row is greater -1 signifies the second row is greater
If the direction is QuerySortOrder.DESCENDING
, the results are inverted.
row1
- row2
- fieldId
- direction
- QuerySortOrder.ASCENDING
or QuerySortOrder.DESCENDING
public int compare(ISourceData row1, ISourceData row2)
DouiContext.DOUI_ORDER_BY_FIELD
parameter value.
0 signifies equality 1 signifies the first row is greater -1 signifies the second row is greater
compare
in interface Comparator<ISourceData>
public String getFieldName(String fieldId) throws PortalException
fieldId
-
PortalException
public SortedSet<String> getSortedFieldIds(String fieldCriteria) throws PortalException
fieldCriteria
-
PortalException
public Set<String> getFieldIds(String fieldCriteria) throws PortalException
fieldCriteria
-
PortalException
public String getFieldId(String fieldCriteria) throws PortalException
fieldCriteria
-
PortalException
public boolean hasField(String fieldCriteria) throws PortalException
fieldCriteria
-
PortalException
public void applyPostLoadFilters() throws PortalException
Data providers that may provide significant quantity of data should implement its own filtering during load instead of using this method, to prevent unnecessary use of server's memory and cpu.
Currently this implementation supports only simple filters, without grouping and of operator 'like'.
applyPostLoadFilters
in class Source<F extends ITabularSourceField>
PortalException
IDataProvider#loadData(lumis.portal.SessionConfig, Source, lumis.util.ITransaction)
public void applyPostLoadPagination()
The total rows of this data is set to its size, and then its rows are
trimmed, according to the
getStartAt()
and getMaxRows()
values.
For correct behavior, the rows presence or ordering may not be changed after this processing.
public void setStartAt(int startAt)
startAt
- public int getStartAt()
public void setMaxRows(int maxRows)
maxRows
- public int getMaxRows()
protected String getDefaultSourceSearchContentFillerClassName()
The default value defined in this class is lumis.doui.search.DouiTabularSourceSearchContentFiller.
public String getSourceSearchContentFillerClassName()
public String getReindexerTabularDataProcessorClassName()
protected String getDefaultProviderClass() throws PortalException
getDefaultProviderClass
in class Source<F extends ITabularSourceField>
PortalException
@Deprecated public void reindex(boolean localServerOnly) throws PortalException
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |