|
|||||||||
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
Field Summary | |
---|---|
static java.lang.String |
OMIT_SYSTEM_RECORDS_FILTER
|
static java.lang.String |
OMIT_SYSTEM_RECORDS_NAME
|
static java.lang.String |
ONLY_PROPERTY_RECORDS_FILTER
|
static java.lang.String |
ONLY_PROPERTY_RECORDS_NAME
|
Constructor Summary | |
---|---|
DataSource(javax.portlet.PortletRequest request,
java.lang.String dataSourceId)
Construct a DataSource instance referring to a particular data source. |
Method Summary | |
---|---|
void |
clearCachedGlobalAttributeSettings()
Only for use with Discovery Service enabled datasources Clears any session-cached Global UAM settings 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()
Deprecated. |
com.endeca.navigation.ENEQuery |
createENEQuery(QueryState state)
Deprecated. |
void |
createOrUpdateAttributeGroup(Group uamGroup)
Only for use with Discovery Service enabled datasources |
QueryResults |
execute()
Executes a query representing the data source's QueryState. |
com.endeca.navigation.ENEQueryResults |
execute(com.endeca.navigation.ENEQuery query)
Deprecated. |
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. |
com.endeca.mdex.config.services.types.Results |
executeConfigServiceReadOperation(com.endeca.mdex.config.services.types.ReadOnlyConfigTransaction transaction)
Applies security and executes read only Config Service transactions |
com.endeca.mdex.config.services.types.Results |
executeConfigServiceUpdateOperation(com.endeca.mdex.config.services.types.ConfigTransaction transaction)
Applies security and executes read only and update config cervice transactions |
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. |
AttributeSettings |
getGlobalAttributeSettings()
Gets the Global Unified Attribute Model for this datasource. |
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 |
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. |
MDEXState.MDEXRecords |
getMdexRecords()
|
protected MDEXState |
getMDEXState()
|
java.lang.String |
getName()
get the DataSource's name |
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()
|
boolean |
isUpdatable()
|
void |
removeAttributeGroup(java.lang.String groupKey)
Only for use with Discovery Service enabled datasources |
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()
Deprecated. |
boolean |
supportsFeature(Feature f)
|
java.lang.String |
toString()
|
void |
updateAttribute(Attribute uamAttribute)
Only for use with Discovery Service enabled datasources Updates the specified attribute in the MDEX Note that this method is significantly different from createOrUpdateAttributeGroup(Group) in
that it needs to first query the Config Service to obtain the complete record for the specified
attribute, then modify it, and resubmit the updated PDR back to the Config Service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ONLY_PROPERTY_RECORDS_NAME
public static final java.lang.String ONLY_PROPERTY_RECORDS_FILTER
public static final java.lang.String OMIT_SYSTEM_RECORDS_NAME
public static final java.lang.String OMIT_SYSTEM_RECORDS_FILTER
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
UserSessionException
protected 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.
@Deprecated public boolean supportsENEQuery()
public boolean supportsDiscoveryService()
public java.lang.String getServiceURL()
public boolean isAvailable()
public boolean isUpdatable()
public boolean supportsFeature(Feature f)
public QueryState getQueryState() throws DataSourceException
DataSourceException
public void setQueryState(QueryState newState) throws DataSourceException
newState
- The new state to "push"
DataSourceException
public QueryState getInitialQueryState() throws DataSourceException
DataSourceException
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
DataSourceException
public void clearCachedMDEXAttributes()
public int getNumCachedMDEXAttributes()
public MDEXAttribute getMDEXAttribute(java.lang.String key) throws DataSourceException
key
-
DataSourceException
public AttributeSettings getGlobalAttributeSettings() throws DataSourceException
DataSourceException
public void clearCachedGlobalAttributeSettings()
public void createOrUpdateAttributeGroup(Group uamGroup) throws DataSourceException
uamGroup
-
DataSourceException
public void removeAttributeGroup(java.lang.String groupKey) throws DataSourceException
uamGroup
-
DataSourceException
public void updateAttribute(Attribute uamAttribute) throws DataSourceException, javax.xml.parsers.ParserConfigurationException, java.lang.UnsupportedOperationException
createOrUpdateAttributeGroup(Group)
in
that it needs to first query the Config Service to obtain the complete record for the specified
attribute, then modify it, and resubmit the updated PDR back to the Config Service. This has to be done
because the Config Service requires a number of additional redundant properties to be set on the PDR
record before it can be saved. It is not practical to store all of these properties for an Attribute in
the UAM for large attribute sets.
uamAttribute
- - Partially constructed UAM Attribute object. Has to contain the key and any
properties that should be updated.
DataSourceException
javax.xml.parsers.ParserConfigurationException
java.lang.UnsupportedOperationException
@Deprecated public com.endeca.navigation.ENEQuery createENEQuery() throws DataSourceException
DataSourceException
QueryState
,
createDiscoveryServiceQuery(QueryState)
@Deprecated public com.endeca.navigation.ENEQuery createENEQuery(QueryState state) throws DataSourceException
state
-
DataSourceException
createENEQuery()
,
createDiscoveryServiceQuery(QueryState)
@Deprecated 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.config.services.types.Results executeConfigServiceReadOperation(com.endeca.mdex.config.services.types.ReadOnlyConfigTransaction transaction) throws DataSourceException
query
- The query to execute
DataSourceException
public com.endeca.mdex.config.services.types.Results executeConfigServiceUpdateOperation(com.endeca.mdex.config.services.types.ConfigTransaction transaction) throws DataSourceException
query
- The query to execute
DataSourceException
public MDEXState.MDEXRecords getMdexRecords()
public com.endeca.mdex.conversation.Request createDiscoveryServiceQuery(QueryState state) throws DataSourceException
state
-
DataSourceException
createENEQuery(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 |