com.endeca.portal.data
Class MDEXState

java.lang.Object
  extended by com.endeca.portal.data.MDEXState
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class MDEXState
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Portlet developers should avoid this class. See DataSource instead. Note that with the exception of getQueryState() and setQueryState(QueryState) this class is not thread safe. All other getters and setters provided by this class are not synchronized.

See Also:
Serialized Form

Nested Class Summary
static class MDEXState.APIVersion
           
static class MDEXState.MDEXRecords
           
 
Field Summary
static java.lang.String API_VERSION_PROPERTY
           
static java.lang.String BASEFUNCTIONS_PROPERTY
           
static java.lang.String BASEQUERYOPTIONS_PROPERTY
           
static java.lang.String CURRENTFUNCTIONS_PROPERTY
           
static MDEXState.APIVersion DEFAULT_API_VERSION
           
static com.endeca.portal.data.MDEXState.EngineVersion DEFAULT_ENGINE_VERSION
           
static MDEXState.MDEXRecords DEFAULT_MDEX_RECORDS
           
static java.lang.String DESCRIPTION_PROPERTY
           
 com.endeca.portal.data.MDEXState.EngineVersion engineVersion
           
protected  java.lang.String id
           
static java.lang.String ID_PROPERTY
           
static java.lang.String MDEX_RECORDS_PROPERTY
           
protected  java.lang.String name
           
static java.lang.String NAME_PROPERTY
           
static java.lang.String PORT_PROPERTY
           
static java.lang.String SERVER_PROPERTY
           
static java.lang.String SSL_CONFIG_PROPERTY
           
protected  QueryState state
           
static java.lang.String UPDATE_PORT_PROPERTY
           
static java.lang.String UPDATE_SERVER_PROPERTY
           
static java.lang.String UPDATE_SSL_CONFIG_PROPERTY
           
 
Constructor Summary
MDEXState(org.json.JSONObject configuration)
           
 
Method Summary
 MDEXState clone()
           
 MDEXAttributeList getAttributes()
           
 AttributeSettings getAttributeSettings()
           
 com.endeca.mdex.config.services.config_ro._2010.ConfigReadOnlyPort getConfigServicePort()
           
 java.lang.String getConfigServiceURL()
          This method is only useful when the data source supports the discovery service.
 java.lang.String getDescription()
           
 java.lang.String getDiscoveryServiceURL()
          This method is only useful when the data source supports the discovery service.
 javax.xml.namespace.QName getEventName()
           
 java.lang.String getId()
           
 org.json.JSONObject getInitialConfiguration()
           
 QueryState getInitialQueryState()
          Returns the initial QueryState associated with this MDEXState, including any valid base functions present in the MDEXState's configuration.
 MDEXState.MDEXRecords getMdexRecords()
           
 java.lang.String getName()
           
 java.lang.String getPort()
           
 QueryState getQueryState()
           
 java.lang.String getServer()
           
 com.endeca.mdex.conversation.ConversationPort getServicePort()
           
 SSLConfig getSSLConfig()
           
 com.endeca.mdex.config.services.config._2010.ConfigPort getUpdatableConfigServicePort()
           
 java.lang.String getUpdatableConfigServiceURL()
          This method is only useful when the data source supports the discovery service.
 java.lang.String getUpdatePort()
           
 java.lang.String getUpdateServer()
           
 SSLConfig getUpdateSSLConfig()
           
 MDEXState.APIVersion getVersion()
           
 boolean isAvailable()
           
 boolean isSSLEnabled()
           
 boolean isUpdatable()
           
 boolean isUpdateSSLEnabled()
           
protected  void setAttributes(MDEXAttributeList mdexAttributes)
           
protected  void setAttributeSettings(AttributeSettings attributeSettings)
          This should only ever be used by the DataSource to store AttributeSettings for the purposes of caching.
 void setQueryState(QueryState dss)
          Deprecated. 
 boolean supportsConfigService()
           
 boolean supportsDiscoveryService()
           
 boolean supportsENEQuery()
           
 boolean supportsFeature(Feature f)
           
 org.json.JSONObject toJSON()
           
 java.lang.String toString()
           
 boolean updateStatus()
          Updates the status of this MDEXState.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected java.lang.String id

name

protected java.lang.String name

engineVersion

public com.endeca.portal.data.MDEXState.EngineVersion engineVersion

state

protected QueryState state

SERVER_PROPERTY

public static final java.lang.String SERVER_PROPERTY
See Also:
Constant Field Values

PORT_PROPERTY

public static final java.lang.String PORT_PROPERTY
See Also:
Constant Field Values

UPDATE_SERVER_PROPERTY

public static final java.lang.String UPDATE_SERVER_PROPERTY
See Also:
Constant Field Values

UPDATE_PORT_PROPERTY

public static final java.lang.String UPDATE_PORT_PROPERTY
See Also:
Constant Field Values

UPDATE_SSL_CONFIG_PROPERTY

public static final java.lang.String UPDATE_SSL_CONFIG_PROPERTY
See Also:
Constant Field Values

SSL_CONFIG_PROPERTY

public static final java.lang.String SSL_CONFIG_PROPERTY
See Also:
Constant Field Values

NAME_PROPERTY

public static final java.lang.String NAME_PROPERTY
See Also:
Constant Field Values

DESCRIPTION_PROPERTY

public static final java.lang.String DESCRIPTION_PROPERTY
See Also:
Constant Field Values

ID_PROPERTY

public static final java.lang.String ID_PROPERTY
See Also:
Constant Field Values

BASEQUERYOPTIONS_PROPERTY

public static final java.lang.String BASEQUERYOPTIONS_PROPERTY
See Also:
Constant Field Values

BASEFUNCTIONS_PROPERTY

public static final java.lang.String BASEFUNCTIONS_PROPERTY
See Also:
Constant Field Values

CURRENTFUNCTIONS_PROPERTY

public static final java.lang.String CURRENTFUNCTIONS_PROPERTY
See Also:
Constant Field Values

API_VERSION_PROPERTY

public static final java.lang.String API_VERSION_PROPERTY
See Also:
Constant Field Values

MDEX_RECORDS_PROPERTY

public static final java.lang.String MDEX_RECORDS_PROPERTY
See Also:
Constant Field Values

DEFAULT_API_VERSION

public static final MDEXState.APIVersion DEFAULT_API_VERSION

DEFAULT_ENGINE_VERSION

public static final com.endeca.portal.data.MDEXState.EngineVersion DEFAULT_ENGINE_VERSION

DEFAULT_MDEX_RECORDS

public static final MDEXState.MDEXRecords DEFAULT_MDEX_RECORDS
Constructor Detail

MDEXState

public MDEXState(org.json.JSONObject configuration)
          throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

getId

public java.lang.String getId()

getName

public java.lang.String getName()

getServer

public java.lang.String getServer()

getPort

public java.lang.String getPort()

getUpdatePort

public java.lang.String getUpdatePort()

getUpdateServer

public java.lang.String getUpdateServer()

getVersion

public MDEXState.APIVersion getVersion()

supportsENEQuery

public boolean supportsENEQuery()

supportsDiscoveryService

public boolean supportsDiscoveryService()

supportsConfigService

public boolean supportsConfigService()

supportsFeature

public boolean supportsFeature(Feature f)

getMdexRecords

public MDEXState.MDEXRecords getMdexRecords()

getUpdateSSLConfig

public SSLConfig getUpdateSSLConfig()

isUpdateSSLEnabled

public boolean isUpdateSSLEnabled()

getSSLConfig

public SSLConfig getSSLConfig()

isSSLEnabled

public boolean isSSLEnabled()

isAvailable

public boolean isAvailable()

isUpdatable

public boolean isUpdatable()

getDescription

public java.lang.String getDescription()

getEventName

public javax.xml.namespace.QName getEventName()

getInitialConfiguration

public org.json.JSONObject getInitialConfiguration()

getQueryState

public QueryState getQueryState()
Returns:
a copy of the QueryState object

setQueryState

@Deprecated
public void setQueryState(QueryState dss)
Deprecated. 

Set the QueryState. In general, this should *ONLY* be called from the DataSource facade, but may need to be accessible for things like reloading bookmarks from a stored state, etc. This method isn't really deprecated... the flag is used to force compile time warnings. TODO: This needs to be undeprecated and made protected. Because the Bookmarks Portlet legitimately needs this functionality, a wrapper for this method should probably be exposed by the DataSource

Parameters:
dss -

getInitialQueryState

public QueryState getInitialQueryState()
Returns the initial QueryState associated with this MDEXState, including any valid base functions present in the MDEXState's configuration.

Returns:
initial QueryState

setAttributes

protected void setAttributes(MDEXAttributeList mdexAttributes)

getAttributes

public MDEXAttributeList getAttributes()

setAttributeSettings

protected void setAttributeSettings(AttributeSettings attributeSettings)
This should only ever be used by the DataSource to store AttributeSettings for the purposes of caching. Modifying the stored AttributeSettings has no effect since it will not be persisted anywhere. Hence, even though attributeSettings has a setter, it is immutable in practice.

Parameters:
attributeSettings - the attributeSettings to set

getAttributeSettings

public AttributeSettings getAttributeSettings()
Returns:
the attributeSettings

getDiscoveryServiceURL

public java.lang.String getDiscoveryServiceURL()
This method is only useful when the data source supports the discovery service.

Returns:
the URL of the Conversation Service associated with this data source.

getConfigServiceURL

public java.lang.String getConfigServiceURL()
This method is only useful when the data source supports the discovery service.

Returns:
the URL of the Conversation Service associated with this data source.

getUpdatableConfigServiceURL

public java.lang.String getUpdatableConfigServiceURL()
                                              throws java.lang.UnsupportedOperationException
This method is only useful when the data source supports the discovery service.

Returns:
the URL of the Conversation Service associated with this data source.
Throws:
java.lang.UnsupportedOperationException

getServicePort

public com.endeca.mdex.conversation.ConversationPort getServicePort()

getConfigServicePort

public com.endeca.mdex.config.services.config_ro._2010.ConfigReadOnlyPort getConfigServicePort()

getUpdatableConfigServicePort

public com.endeca.mdex.config.services.config._2010.ConfigPort getUpdatableConfigServicePort()
                                                                                      throws java.lang.UnsupportedOperationException
Throws:
java.lang.UnsupportedOperationException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toJSON

public org.json.JSONObject toJSON()
                           throws org.json.JSONException
Throws:
org.json.JSONException

clone

public MDEXState clone()
Overrides:
clone in class java.lang.Object

updateStatus

public boolean updateStatus()
Updates the status of this MDEXState. Only the DataSourceConfigHelper has the global reference for MDEXStates. All other utilities get a clone. Obviously, updating the clone won't update the global reference.