fmewebservices.FMENamedConnectionManager

Inheritance diagram of fmewebservices.FMENamedConnectionManager
FMENamedConnectionManager.getConnectionFromFormatSettings(...) Returns a named connection object based on the input reader settings.
FMENamedConnectionManager.getDefaultOwner() Retrieves the default owner.
FMENamedConnectionManager.getNamedConnection(...) Obtain a named connection which does not block access on the DB to that given named connection.
FMENamedConnectionManager.getNamedConnectionStorageLocation() Returns the location currently being used as the Named Connection source.
FMENamedConnectionManager.getNamedConnectionStorageType() Retrieves the named connection storage type.
FMENamedConnectionManager.getWebService(...) Return the associated Web Service, which contains a general description of the type of Web Service as well as other details.
FMENamedConnectionManager.setDefaultOwner(...) Sets the default owner.
FMENamedConnectionManager.updateNamedConnection(...) Updates the database with the information contained in the named connection class.
class FMENamedConnectionManager

Bases: object

FME Named Connection Manager class.

init()

Create an instance of a named connection manager object.

__init__

Initialize self. See help(type(self)) for accurate signature.

getConnectionFromFormatSettings(webServiceName, readerSettings)

Returns a named connection object based on the input reader settings.

If the input readerParameters contain a connection name (found by looking for *_CONNECTION keyword), that is returned.

If the specified connection is not found, then NULL is returned.

If the input readerParameters does NOT contain a connection name, then a temporary (in memory) connection is created based on the input web service and the input parameters.

If the input web service is not found, NULL is returned.

Parameters:
  • webServiceName (str) – The web service name.
  • readerSettings (list[str]) – Reader settings for this format.
Return type:

Terminal subclass of FMENamedConnection or None

Raises:

FMEWSException – An exception is raised if an error occurred.

getDefaultOwner()

Retrieves the default owner.

Return type:str
Returns:The default owner.
getNamedConnection(connectionName, ownerName)

Obtain a named connection which does not block access on the DB to that given named connection. Will return None if the connection name doesn’t exist.

Parameters:
  • connectionName (str) – The name of the connection.
  • ownerName (str) – (Optional) The owner of the connection.
Return type:

Terminal subclass of FMENamedConnection or None

Returns:

The specified named connection.

getNamedConnectionStorageLocation()

Returns the location currently being used as the Named Connection source.

Return type:str
Returns:The location.
getNamedConnectionStorageType()

Retrieves the named connection storage type. Can be one of FME_NAMEDCONNECTION_SQLITE, FME_NAMEDCONNECTION_JDBC, FME_NAMEDCONNECTION_FMESERVER_DIRECT, or FME_NAMEDCONNECTION_FMESERVER_REST

Return type:int
Returns:The named connection storage type.
getWebService(webServiceName)

Return the associated Web Service, which contains a general description of the type of Web Service as well as other details. If the named web service does not exist, or the parsing of the web service fails, None may be returned.

Parameters:webServiceName (str) – The web service name.
Return type:Terminal subclass of FMEWebService or None
Returns:The web service.
setDefaultOwner(ownerName)

Sets the default owner.

Parameters:ownerName (str) – The default owner.
Return type:None
Raises:FMEWSException – An exception is raised if an error occurred.
updateNamedConnection(updatedConnection)

Updates the database with the information contained in the named connection class. The named connection includes its owner so no user name is input.

Parameters:updatedConnection (FMENamedConnection) – The updated named connection.
Return type:None
Raises:FMEWSException – An exception is raised if an error occurred.