com.aspose.cells
Class ExternalConnection

java.lang.Object
    extended by com.aspose.cells.ExternalConnection
Direct Known Subclasses:
DBConnection, WebQueryConnection

public abstract class ExternalConnection 
extends java.lang.Object

Specifies an external data connection

Property Getters/Setters Summary
booleangetBackgroundRefresh()
voidsetBackgroundRefresh(boolean value)
           Indicates whether the connection can be refreshed in the background (asynchronously). true if preferred usage of the connection is to refresh asynchronously in the background; false if preferred usage of the connection is to refresh synchronously in the foreground.
java.lang.StringgetConnectionDescription()
voidsetConnectionDescription(java.lang.String value)
           Specifies the user description for this connection
intgetConnectionId()
           Specifies The unique identifier of this connection.
intgetCredentials()
voidsetCredentials(int value)
           Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.
intgetId()
           Gets the id of the connection.
booleanisDeleted()
voidsetDeleted(boolean value)
           Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.
booleanisNew()
voidsetNew(boolean value)
           True if the connection has not been refreshed for the first time; otherwise, false. This state can happen when the user saves the file before a query has finished returning.
booleangetKeepAlive()
voidsetKeepAlive(boolean value)
           True when the spreadsheet application should make efforts to keep the connection open. When false, the application should close the connection after retrieving the information.
java.lang.StringgetName()
voidsetName(java.lang.String value)
           Specifies the name of the connection. Each connection must have a unique name.
java.lang.StringgetOdcFile()
voidsetOdcFile(java.lang.String value)
           Specifies the full path to external connection file from which this connection was created. If a connection fails during an attempt to refresh data, and reconnectionMethod=1, then the spreadsheet application will try again using information from the external connection file instead of the connection object embedded within the workbook.
booleangetOnlyUseConnectionFile()
voidsetOnlyUseConnectionFile(boolean value)
           Indicates whether the spreadsheet application should always and only use the connection information in the external connection file indicated by the odcFile attribute when the connection is refreshed. If false, then the spreadsheet application should follow the procedure indicated by the reconnectionMethod attribute
ConnectionParameterCollectiongetParameters()
           Gets ConnectionParameterCollection for an ODBC or web query.
intgetReConnectionMethod()
voidsetReConnectionMethod(int value)
           Specifies what the spreadsheet application should do when a connection fails.The default value is ReConnectionMethodType.Required. The value of the property is ReConnectionMethodType integer constant.
intgetRefreshInternal()
voidsetRefreshInternal(int value)
           Specifies the number of minutes between automatic refreshes of the connection.
booleangetRefreshOnLoad()
           True if this connection should be refreshed when opening the file; otherwise, false.
booleangetSaveData()
voidsetSaveData(boolean value)
           True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.
booleangetSavePassword()
voidsetSavePassword(boolean value)
           True if the password is to be saved as part of the connection string; otherwise, False.
java.lang.StringgetSourceFile()
voidsetSourceFile(java.lang.String value)
           Used when the external data source is file-based. When a connection to such a data source fails, the spreadsheet application attempts to connect directly to this file. May be expressed in URI or system-specific file path notation.
java.lang.StringgetSSOId()
voidsetSSOId(java.lang.String value)
           Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.
intgetType()
voidsetType(int value)
           Gets or Sets the external connection DataSource type. The value of the property is ConnectionDataSourceType integer constant.
 

Property Getters/Setters Detail

getId

public int getId()
Gets the id of the connection.

getType/setType

public int getType() / public void setType(int value)
Gets or Sets the external connection DataSource type. The value of the property is ConnectionDataSourceType integer constant.

getSourceFile/setSourceFile

public java.lang.String getSourceFile() / public void setSourceFile(java.lang.String value)
Used when the external data source is file-based. When a connection to such a data source fails, the spreadsheet application attempts to connect directly to this file. May be expressed in URI or system-specific file path notation.

getSSOId/setSSOId

public java.lang.String getSSOId() / public void setSSOId(java.lang.String value)
Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.

getSavePassword/setSavePassword

public boolean getSavePassword() / public void setSavePassword(boolean value)
True if the password is to be saved as part of the connection string; otherwise, False.

getSaveData/setSaveData

public boolean getSaveData() / public void setSaveData(boolean value)
True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.

getRefreshOnLoad

public boolean getRefreshOnLoad()
True if this connection should be refreshed when opening the file; otherwise, false.

getReConnectionMethod/setReConnectionMethod

public int getReConnectionMethod() / public void setReConnectionMethod(int value)
Specifies what the spreadsheet application should do when a connection fails.The default value is ReConnectionMethodType.Required. The value of the property is ReConnectionMethodType integer constant.

getOnlyUseConnectionFile/setOnlyUseConnectionFile

public boolean getOnlyUseConnectionFile() / public void setOnlyUseConnectionFile(boolean value)
Indicates whether the spreadsheet application should always and only use the connection information in the external connection file indicated by the odcFile attribute when the connection is refreshed. If false, then the spreadsheet application should follow the procedure indicated by the reconnectionMethod attribute

getOdcFile/setOdcFile

public java.lang.String getOdcFile() / public void setOdcFile(java.lang.String value)
Specifies the full path to external connection file from which this connection was created. If a connection fails during an attempt to refresh data, and reconnectionMethod=1, then the spreadsheet application will try again using information from the external connection file instead of the connection object embedded within the workbook.

isNew/setNew

public boolean isNew() / public void setNew(boolean value)
True if the connection has not been refreshed for the first time; otherwise, false. This state can happen when the user saves the file before a query has finished returning.

getName/setName

public java.lang.String getName() / public void setName(java.lang.String value)
Specifies the name of the connection. Each connection must have a unique name.

getKeepAlive/setKeepAlive

public boolean getKeepAlive() / public void setKeepAlive(boolean value)
True when the spreadsheet application should make efforts to keep the connection open. When false, the application should close the connection after retrieving the information.

getRefreshInternal/setRefreshInternal

public int getRefreshInternal() / public void setRefreshInternal(int value)
Specifies the number of minutes between automatic refreshes of the connection.

getConnectionId

public int getConnectionId()
Specifies The unique identifier of this connection.

getConnectionDescription/setConnectionDescription

public java.lang.String getConnectionDescription() / public void setConnectionDescription(java.lang.String value)
Specifies the user description for this connection

isDeleted/setDeleted

public boolean isDeleted() / public void setDeleted(boolean value)
Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.

getCredentials/setCredentials

public int getCredentials() / public void setCredentials(int value)
Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.

getBackgroundRefresh/setBackgroundRefresh

public boolean getBackgroundRefresh() / public void setBackgroundRefresh(boolean value)
Indicates whether the connection can be refreshed in the background (asynchronously). true if preferred usage of the connection is to refresh asynchronously in the background; false if preferred usage of the connection is to refresh synchronously in the foreground.

getParameters

public ConnectionParameterCollection getParameters()
Gets ConnectionParameterCollection for an ODBC or web query.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.