|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.endeca.portal.data.DataSource
public class DataSource
DataSource instances encapsulate a connection to an MDEX Engine, a current
QueryState on the connection, handles the logic of executing a
query on an MDEX to get results, and handles the logic of altering the
QueryState.
QueryState| Constructor Summary | |
|---|---|
DataSource(javax.portlet.PortletRequest request,
java.lang.String dataSourceId)
Construct a DataSource instance referring to a particular data source. |
|
| Method Summary | |
|---|---|
void |
clearCachedMDEX7AttributeGroups()
Clears any session-cached attribute groups from the underlying MDEXState. |
void |
clearCachedMDEXAttributes()
Clears any session-cached attributes from the underlying MDEXState. |
com.endeca.mdex.conversation.Request |
createDiscoveryServiceQuery(QueryState state)
Create a Discovery Service Request instance from a query state, using the current request state. |
com.endeca.navigation.ENEQuery |
createENEQuery()
Create an ENEQuery object from the data source's current state. |
com.endeca.navigation.ENEQuery |
createENEQuery(QueryState state)
Create an ENEQuery object based on the specified query state |
QueryResults |
execute()
Executes a query representing the data source's QueryState. |
com.endeca.navigation.ENEQueryResults |
execute(com.endeca.navigation.ENEQuery query)
Applies security filters as managed by the MDEX Security Manager and executes query |
QueryResults |
execute(QueryState queryState)
Executes a query representing the QueryState. |
com.endeca.mdex.conversation.Results |
execute(com.endeca.mdex.conversation.Request query)
Applies security and executes query against the current request's State. |
java.lang.String |
getDescription()
get the DataSource's description |
javax.xml.namespace.QName |
getEventName()
Retrieve the event name that gets fired/listened for when this data source changes. |
java.lang.String |
getId()
get the DataSource's ID |
QueryState |
getInitialQueryState()
Retrieve the initial QueryState on this data source, which is the QueryState defined in the data source's initial JSON configuration |
AttributeGroup |
getMDEX7AttributeGroup(java.lang.String key)
Convenience method to retrieve an attribute group from a discovery service data source |
AttributeGroupLinkedMap |
getMDEX7AttributeGroups()
Retrieves a list of attribute groups available in the MDEX engine, by performing a Discovery Service query and wrapping the results for convenience. |
AttributeGroupLinkedMap |
getMDEX7AttributeGroups(java.util.List<java.lang.String> keys)
Returns the specified groups from the data source. |
MDEXAttribute |
getMDEXAttribute(java.lang.String key)
Convenience method to retrieve an attribute of a data source |
MDEXAttributeList |
getMDEXAttributes()
Retrieves a list of attributes available in the MDEX engine, by performing a key properties query and wrapping the results for convenience. |
protected MDEXState |
getMDEXState()
|
java.lang.String |
getName()
get the DataSource's name |
int |
getNumCachedMDEX7AttributeGroups()
Returns the number of attribute groups currently cached in the MDEXState. |
int |
getNumCachedMDEXAttributes()
Returns the number of attributes currently cached in the MDEXState. |
QueryState |
getQueryState()
Retrieve the current query state on this data source. |
java.lang.String |
getServiceURL()
This method is only used when your data source and portlet support MDEX 7 and the Discovery Service API. |
protected UserSession |
getUserSession()
|
MDEXState.APIVersion |
getVersion()
Get what APIVersion this data source supports. |
boolean |
isAvailable()
|
void |
resetQueryState()
Reset the data source's query state to what it's initial state was. |
void |
setQueryState(QueryState newState)
Set the state of this data source. |
boolean |
supportsDiscoveryService()
|
boolean |
supportsENEQuery()
|
boolean |
supportsFeature(Feature f)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataSource(javax.portlet.PortletRequest request,
java.lang.String dataSourceId)
throws DataSourceException
EndecaPortlet.getDataSource(PortletRequest) inside your portlet
in most instances.
request - The current request objectdataSourceId - The id of the data source to represent
DataSourceException| Method Detail |
|---|
protected UserSession getUserSession()
throws UserSessionException
UserSessionExceptionprotected MDEXState getMDEXState()
public java.lang.String getName()
public java.lang.String getDescription()
public java.lang.String getId()
public javax.xml.namespace.QName getEventName()
public MDEXState.APIVersion getVersion()
supportsENEQuery() or supportsDiscoveryService()
instead of this method.
public boolean supportsENEQuery()
public boolean supportsDiscoveryService()
public java.lang.String getServiceURL()
public boolean isAvailable()
public boolean supportsFeature(Feature f)
public QueryState getQueryState()
throws DataSourceException
DataSourceException
public void setQueryState(QueryState newState)
throws DataSourceException
newState - The new state to "push"
DataSourceExceptionpublic QueryState getInitialQueryState()
public void resetQueryState()
throws DataSourceException
DataSourceException
public QueryResults execute()
throws DataSourceException
DataSourceException
public QueryResults execute(QueryState queryState)
throws DataSourceException
queryState -
DataSourceException
public MDEXAttributeList getMDEXAttributes()
throws DataSourceException
DataSourceExceptionpublic void clearCachedMDEXAttributes()
public int getNumCachedMDEXAttributes()
public MDEXAttribute getMDEXAttribute(java.lang.String key)
throws DataSourceException
key -
DataSourceException
public AttributeGroupLinkedMap getMDEX7AttributeGroups()
throws DataSourceException
DataSourceException
public AttributeGroupLinkedMap getMDEX7AttributeGroups(java.util.List<java.lang.String> keys)
throws DataSourceException
keys - the list of keys of the requested groups
DataSourceException
public AttributeGroup getMDEX7AttributeGroup(java.lang.String key)
throws DataSourceException
group - key
DataSourceExceptionpublic void clearCachedMDEX7AttributeGroups()
public int getNumCachedMDEX7AttributeGroups()
public com.endeca.navigation.ENEQuery createENEQuery()
throws DataSourceException
DataSourceExceptionQueryState,
createDiscoveryServiceQuery(QueryState)
public com.endeca.navigation.ENEQuery createENEQuery(QueryState state)
throws DataSourceException
state -
DataSourceExceptioncreateENEQuery(),
createDiscoveryServiceQuery(QueryState)
public com.endeca.navigation.ENEQueryResults execute(com.endeca.navigation.ENEQuery query)
throws DataSourceException
query - the query to execute.
DataSourceException
public com.endeca.mdex.conversation.Results execute(com.endeca.mdex.conversation.Request query)
throws DataSourceException
query - The query to execute
DataSourceException
public com.endeca.mdex.conversation.Request createDiscoveryServiceQuery(QueryState state)
throws DataSourceException
state -
DataSourceExceptioncreateENEQuery(QueryState)public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||