ExternalConnection

Inheritance: java.lang.Object

public abstract class ExternalConnection

Specifies an external data connection

Methods

MethodDescription
equals(Object arg0)
getBackgroundRefresh()Indicates whether the connection can be refreshed in the background (asynchronously).
getClass()
getConnectionDescription()Specifies the user description for this connection
getConnectionId()Specifies The unique identifier of this connection.
getCredentials()Specifies the authentication method to be used when establishing (or re-establishing) the connection.
getCredentialsMethodType()Specifies the authentication method to be used when establishing (or re-establishing) the connection.
getId()Gets the id of the connection.
getKeepAlive()True when the spreadsheet application should make efforts to keep the connection open.
getName()Specifies the name of the connection.
getOdcFile()Specifies the full path to external connection file from which this connection was created.
getOnlyUseConnectionFile()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.
getParameters()Gets ConnectionParameterCollection for an ODBC or web query.
getPowerQueryFormula()Gets the definition of power query formula.
getReconnectionMethod()Specifies what the spreadsheet application should do when a connection fails.
getReconnectionMethodType()Specifies what the spreadsheet application should do when a connection fails.
getRefreshInternal()Specifies the number of minutes between automatic refreshes of the connection.
getRefreshOnLoad()True if this connection should be refreshed when opening the file; otherwise, false.
getSSOId()Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.
getSaveData()True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.
getSavePassword()True if the password is to be saved as part of the connection string; otherwise, False.
getSourceFile()Used when the external data source is file-based.
getType()Gets the external connection DataSource type.
hashCode()
isDeleted()Indicates whether the associated workbook connection has been deleted.
isNew()True if the connection has not been refreshed for the first time; otherwise, false.
notify()
notifyAll()
setBackgroundRefresh(boolean value)Indicates whether the connection can be refreshed in the background (asynchronously).
setConnectionDescription(String value)Specifies the user description for this connection
setCredentials(int value)Specifies the authentication method to be used when establishing (or re-establishing) the connection.
setCredentialsMethodType(int value)Specifies the authentication method to be used when establishing (or re-establishing) the connection.
setDeleted(boolean value)Indicates whether the associated workbook connection has been deleted.
setKeepAlive(boolean value)True when the spreadsheet application should make efforts to keep the connection open.
setName(String value)Specifies the name of the connection.
setNew(boolean value)True if the connection has not been refreshed for the first time; otherwise, false.
setOdcFile(String value)Specifies the full path to external connection file from which this connection was created.
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.
setReconnectionMethod(int value)Specifies what the spreadsheet application should do when a connection fails.
setReconnectionMethodType(int value)Specifies what the spreadsheet application should do when a connection fails.
setRefreshInternal(int value)Specifies the number of minutes between automatic refreshes of the connection.
setRefreshOnLoad(boolean value)True if this connection should be refreshed when opening the file; otherwise, false.
setSSOId(String value)Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.
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.
setSavePassword(boolean value)True if the password is to be saved as part of the connection string; otherwise, False.
setSourceFile(String value)Used when the external data source is file-based.
setType(int value)Sets the external connection DataSource type.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getBackgroundRefresh()

public boolean getBackgroundRefresh()

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.

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getConnectionDescription()

public String getConnectionDescription()

Specifies the user description for this connection

Returns: java.lang.String

getConnectionId()

public int getConnectionId()

Specifies The unique identifier of this connection.

Returns: int

getCredentials()

public int getCredentials()

Specifies the authentication method to be used when establishing (or re-establishing) the connection.

See CredentialsMethodType.

Remarks

NOTE: This property is now obsolete. Instead, please use ExternalConnection.CredentialsMethodType property. This property will be removed 12 months later since October 2017. Aspose apologizes for any inconvenience you may have experienced.

Returns: int

getCredentialsMethodType()

public int getCredentialsMethodType()

Specifies the authentication method to be used when establishing (or re-establishing) the connection.

See CredentialsMethodType.

Returns: int

getId()

public int getId()

Gets the id of the connection.

Returns: int

getKeepAlive()

public boolean getKeepAlive()

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.

Returns: boolean

getName()

public String getName()

Specifies the name of the connection. Each connection must have a unique name.

Returns: java.lang.String

getOdcFile()

public String getOdcFile()

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.

Returns: java.lang.String

getOnlyUseConnectionFile()

public boolean getOnlyUseConnectionFile()

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

Returns: boolean

getParameters()

public ConnectionParameterCollection getParameters()

Gets ConnectionParameterCollection for an ODBC or web query.

Returns: ConnectionParameterCollection

getPowerQueryFormula()

public PowerQueryFormula getPowerQueryFormula()

Gets the definition of power query formula.

Returns: PowerQueryFormula

getReconnectionMethod()

public int getReconnectionMethod()

Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required.

See ReConnectionMethodType.

Remarks

NOTE: This property is now obsolete. Instead, please use ExternalConnection.ReconnectionMethodType property. This property will be removed 12 months later since October 2017. Aspose apologizes for any inconvenience you may have experienced.

Returns: int

getReconnectionMethodType()

public int getReconnectionMethodType()

Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required.

See ReConnectionMethodType.

Returns: int

getRefreshInternal()

public int getRefreshInternal()

Specifies the number of minutes between automatic refreshes of the connection.

Returns: int

getRefreshOnLoad()

public boolean getRefreshOnLoad()

True if this connection should be refreshed when opening the file; otherwise, false.

Returns: boolean

getSSOId()

public String getSSOId()

Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.

Returns: java.lang.String

getSaveData()

public boolean getSaveData()

True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.

Returns: boolean

getSavePassword()

public boolean getSavePassword()

True if the password is to be saved as part of the connection string; otherwise, False.

Returns: boolean

getSourceFile()

public String getSourceFile()

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.

Returns: java.lang.String

getType()

public int getType()

Gets the external connection DataSource type.

See ConnectionDataSourceType.

Returns: int

hashCode()

public native int hashCode()

Returns: int

isDeleted()

public boolean isDeleted()

Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.

Returns: boolean

isNew()

public boolean isNew()

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.

Returns: boolean

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setBackgroundRefresh(boolean value)

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.

Parameters:

ParameterTypeDescription
valueboolean

setConnectionDescription(String value)

public void setConnectionDescription(String value)

Specifies the user description for this connection

Parameters:

ParameterTypeDescription
valuejava.lang.String

setCredentials(int value)

public void setCredentials(int value)

Specifies the authentication method to be used when establishing (or re-establishing) the connection.

See CredentialsMethodType.

Remarks

NOTE: This property is now obsolete. Instead, please use ExternalConnection.CredentialsMethodType property. This property will be removed 12 months later since October 2017. Aspose apologizes for any inconvenience you may have experienced.

Parameters:

ParameterTypeDescription
valueint

setCredentialsMethodType(int value)

public void setCredentialsMethodType(int value)

Specifies the authentication method to be used when establishing (or re-establishing) the connection.

See CredentialsMethodType.

Parameters:

ParameterTypeDescription
valueint

setDeleted(boolean value)

public void setDeleted(boolean value)

Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.

Parameters:

ParameterTypeDescription
valueboolean

setKeepAlive(boolean value)

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.

Parameters:

ParameterTypeDescription
valueboolean

setName(String value)

public void setName(String value)

Specifies the name of the connection. Each connection must have a unique name.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setNew(boolean value)

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.

Parameters:

ParameterTypeDescription
valueboolean

setOdcFile(String value)

public void setOdcFile(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.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setOnlyUseConnectionFile(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setReconnectionMethod(int value)

public void setReconnectionMethod(int value)

Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required.

See ReConnectionMethodType.

Remarks

NOTE: This property is now obsolete. Instead, please use ExternalConnection.ReconnectionMethodType property. This property will be removed 12 months later since October 2017. Aspose apologizes for any inconvenience you may have experienced.

Parameters:

ParameterTypeDescription
valueint

setReconnectionMethodType(int value)

public void setReconnectionMethodType(int value)

Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required.

See ReConnectionMethodType.

Parameters:

ParameterTypeDescription
valueint

setRefreshInternal(int value)

public void setRefreshInternal(int value)

Specifies the number of minutes between automatic refreshes of the connection.

Parameters:

ParameterTypeDescription
valueint

setRefreshOnLoad(boolean value)

public void setRefreshOnLoad(boolean value)

True if this connection should be refreshed when opening the file; otherwise, false.

Parameters:

ParameterTypeDescription
valueboolean

setSSOId(String value)

public void setSSOId(String value)

Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setSaveData(boolean value)

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.

Parameters:

ParameterTypeDescription
valueboolean

setSavePassword(boolean value)

public void setSavePassword(boolean value)

True if the password is to be saved as part of the connection string; otherwise, False.

Parameters:

ParameterTypeDescription
valueboolean

setSourceFile(String value)

public void setSourceFile(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.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setType(int value)

public void setType(int value)

Sets the external connection DataSource type.

See ConnectionDataSourceType.

Parameters:

ParameterTypeDescription
valueint

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int