Class SdeWorkspaceFactoryClass
- Namespace
- ESRI.ArcGIS.DatasourcesGDB
- Assembly
- ESRI.Server.DatasourcesGDB.dll
[ClassInterface(ClassInterfaceType.None)]
[Guid("D9B4FA40-D6D9-11D1-AA81-00C04FA33A15")]
public class SdeWorkspaceFactoryClass : SdeWorkspaceFactory, IRemoteDatabaseWorkspaceFactory, IEnterpriseWorkspaceFactory, IWorkspaceFactory2, IWorkspaceFactory, ISupportErrorInfo, IWorkspaceFactorySchemaCache, IWorkspaceFactoryStatus, ISetDefaultConnectionInfo3, ISetDefaultConnectionInfo2, ISetDefaultConnectionInfo
- Inheritance
-
SdeWorkspaceFactoryClass
- Implements
- Inherited Members
Constructors
SdeWorkspaceFactoryClass()
public SdeWorkspaceFactoryClass()
Explicit Interface Implementations
ClearParameters(string, string)
Clears ArcSDE connection property parameters.
virtual void ClearParameters(string server, string instance)
Parameters
ClearParameters3(string, string, string)
Clears ArcSDE connection property parameters.
virtual void ClearParameters3(string server, string instance, string authenticationMode)
Parameters
Remarks
Clears parameters set by SetParameters3.
ContainsWorkspace(string, IFileNames)
Indicates if parentDirectory contains a valid workspace, or is a valid file-system workspace.
virtual bool ContainsWorkspace(string parentDirectory, IFileNames fileNames)
Parameters
parentDirectorystringfileNamesIFileNames
Returns
Remarks
Copy(IWorkspaceName, string, out IWorkspaceName)
Copies a workspace to the specified destination folder.
virtual bool Copy(IWorkspaceName WorkspaceName, string destinationFolder, out IWorkspaceName workspaceNameCopy)
Parameters
WorkspaceNameIWorkspaceNamedestinationFolderstringworkspaceNameCopyIWorkspaceName
Returns
Remarks
The Copy and Move methods can be used to copy or move workspaces or connection files between folders in the file system. The Boolean result indicates if the operation was successful. In the case of remote database workspaces, these operations work on the connection file representing the workspace.
Create(string, string, IPropertySet, int)
Creates a new workspace specified by the directory, file name, and connection properties.
virtual IWorkspaceName Create(string parentDirectory, string Name, IPropertySet ConnectionProperties, int hWnd)
Parameters
parentDirectorystringNamestringConnectionPropertiesIPropertySethWndint
Returns
Remarks
DeleteConnectionFile(string)
Deletes the remote database workspace connection file.
virtual void DeleteConnectionFile(string PathName)
Parameters
PathNamestring
DisableAllSchemaCaches()
Disable the schema caches of all open workspaces.
virtual void DisableAllSchemaCaches()
DisableSchemaCache(IWorkspace)
Disable the schema cache for a specific workspace.
virtual void DisableSchemaCache(IWorkspace Workspace)
Parameters
WorkspaceIWorkspace
DisableSchemaCaching()
All new workspaces handed out by the factory will not have schema caching enabled.
virtual void DisableSchemaCaching()
EditConnectionFile(string, int)
Edits the properties of a remote database workspace connection file.
virtual IWorkspaceName EditConnectionFile(string PathName, int hWnd)
Parameters
Returns
EnableAllSchemaCaches()
Enable the schema caches of all open workspaces.
virtual void EnableAllSchemaCaches()
EnableSchemaCache(IWorkspace)
Enable the schema cache for a specific workspace.
virtual void EnableSchemaCache(IWorkspace Workspace)
Parameters
WorkspaceIWorkspace
EnableSchemaCaching()
All new workspaces handed out by the factory will have schema caching enabled.
virtual void EnableSchemaCaching()
GetClassID()
The class ID of the WorkspaceFactory.
virtual UID GetClassID()
Returns
Remarks
GetClassID returns the unique identifier for the workspace factory. You can use this to distinguish different versions of the same type of factory, for example, whether you are working with an SDEWorkspace, FileGDBWorkspace or AccessWorkspace factory.
GetWorkspaceName(string, IFileNames)
Retrieves the workspace name of a workspace from the given list of file names.
virtual IWorkspaceName GetWorkspaceName(string parentDirectory, IFileNames fileNames)
Parameters
parentDirectorystringfileNamesIFileNames
Returns
Remarks
GetWorkspaceName is useful when browsing the file system for workspaces. It is handed in a parent directory and the list of file names in the directory to be examined. It returns a WorkspaceName object representing the first workspace it finds in the list of filenames and removes any filenames representing the workspace from the input list of filenames.
ISetDefaultConnectionInfo2_SetParameters(string, string, string, string, string)
virtual void ISetDefaultConnectionInfo2_SetParameters(string server, string instance, string User, string password, string versName)
Parameters
ISetDefaultConnectionInfo3_ClearParameters(string, string)
virtual void ISetDefaultConnectionInfo3_ClearParameters(string server, string instance)
Parameters
ISetDefaultConnectionInfo3_SetParameters(string, string, string, string, string)
virtual void ISetDefaultConnectionInfo3_SetParameters(string server, string instance, string User, string password, string versName)
Parameters
IWorkspaceFactory2_ContainsWorkspace(string, IFileNames)
virtual bool IWorkspaceFactory2_ContainsWorkspace(string parentDirectory, IFileNames fileNames)
Parameters
parentDirectorystringfileNamesIFileNames
Returns
IWorkspaceFactory2_Copy(IWorkspaceName, string, out IWorkspaceName)
virtual bool IWorkspaceFactory2_Copy(IWorkspaceName WorkspaceName, string destinationFolder, out IWorkspaceName workspaceNameCopy)
Parameters
WorkspaceNameIWorkspaceNamedestinationFolderstringworkspaceNameCopyIWorkspaceName
Returns
IWorkspaceFactory2_Create(string, string, IPropertySet, int)
virtual IWorkspaceName IWorkspaceFactory2_Create(string parentDirectory, string Name, IPropertySet ConnectionProperties, int hWnd)
Parameters
parentDirectorystringNamestringConnectionPropertiesIPropertySethWndint
Returns
IWorkspaceFactory2_GetClassID()
virtual UID IWorkspaceFactory2_GetClassID()
Returns
IWorkspaceFactory2_GetWorkspaceName(string, IFileNames)
virtual IWorkspaceName IWorkspaceFactory2_GetWorkspaceName(string parentDirectory, IFileNames fileNames)
Parameters
parentDirectorystringfileNamesIFileNames
Returns
IWorkspaceFactory2_IsWorkspace(string)
virtual bool IWorkspaceFactory2_IsWorkspace(string fileName)
Parameters
fileNamestring
Returns
IWorkspaceFactory2_Move(IWorkspaceName, string)
virtual bool IWorkspaceFactory2_Move(IWorkspaceName WorkspaceName, string destinationFolder)
Parameters
WorkspaceNameIWorkspaceNamedestinationFolderstring
Returns
IWorkspaceFactory2_Open(IPropertySet, int)
virtual IWorkspace IWorkspaceFactory2_Open(IPropertySet ConnectionProperties, int hWnd)
Parameters
ConnectionPropertiesIPropertySethWndint
Returns
IWorkspaceFactory2_OpenFromFile(string, int)
virtual IWorkspace IWorkspaceFactory2_OpenFromFile(string fileName, int hWnd)
Parameters
Returns
IWorkspaceFactory2_ReadConnectionPropertiesFromFile(string)
virtual IPropertySet IWorkspaceFactory2_ReadConnectionPropertiesFromFile(string fileName)
Parameters
fileNamestring
Returns
IWorkspaceFactory2_WorkspaceDescription[bool]
virtual string IWorkspaceFactory2_WorkspaceDescription[bool plural] { get; }
Parameters
pluralbool
Returns
IWorkspaceFactory2_WorkspaceType
virtual esriWorkspaceType IWorkspaceFactory2_WorkspaceType { get; }
Returns
InterfaceSupportsErrorInfo(ref Guid)
virtual void InterfaceSupportsErrorInfo(ref Guid riid)
Parameters
riidGuid
IsAnySchemaCacheStale()
Checks all current schema caches for staleness.
virtual bool IsAnySchemaCacheStale()
Returns
IsSchemaCacheStale(IWorkspace)
Checks a specific schema cache for staleness.
virtual bool IsSchemaCacheStale(IWorkspace Workspace)
Parameters
WorkspaceIWorkspace
Returns
IsWorkspace(string)
True if the specified file identifies a workspace supported by the workspace factory.
virtual bool IsWorkspace(string fileName)
Parameters
fileNamestring
Returns
Move(IWorkspaceName, string)
Moves a workspace to the specified destination folder.
virtual bool Move(IWorkspaceName WorkspaceName, string destinationFolder)
Parameters
WorkspaceNameIWorkspaceNamedestinationFolderstring
Returns
Remarks
The Copy and Move methods can be used to copy or move workspaces or connection files between folders in the file system. The Boolean result indicates if the operation was successful. In the case of remote database workspaces, these operations work on the connection file representing the workspace.
Open(IPropertySet, int)
Opens the workspace specified by the connection properties.
virtual IWorkspace Open(IPropertySet ConnectionProperties, int hWnd)
Parameters
ConnectionPropertiesIPropertySethWndint
Returns
Remarks
Open takes as input a property set of connection properties that specify the workspace to connect to. In the case of file system workspaces and local database workspaces, a single property named DATABASE, whose value is the pathname to the workspace, is usually all that is required. In the case of remote database workspaces accessed via ArcSDE the properties can include the USER, PASSWORD, DATABASE, SERVER, INSTANCE, VERSION, HISTORICAL_NAME, HISTORICAL_TIMESTAMP, and AUTHENTICATION_MODE properties of the database being connected to.
List of acceptable connection property names and a brief description of each
"SERVER" – SDE server name you are connecting to.
"INSTANCE" – Instance you are connection to.
"DATABASE" – Database connected to.
"USER" – Connected user.
"PASSWORD" – Connected password.
"AUTHENTICATION_MODE" – Credential authentication mode of the connection. Acceptable values are "OSA" and "DBMS".
"VERSION" – Transactional version to connect to. Acceptable value is a string that represents a transaction version name.
"HISTORICAL_NAME" – Historical version to connect to. Acceptable value is a string type that represents a historical marker name.
"HISTORICAL_TIMESTAMP" – Moment in history to establish an historical version connection. Acceptable value is a date time that represents a moment timestamp.
Notes:
-
The "DATABASE" property is optional and is required for ArcSDE instances that manage multiple databases (for example, SQL Server).
-
If “AUTHENTICATION_MODE” is “OSA” then “USER” and “PASSWORD” are not required. “OSA” represents operating system authentication and uses the operating system credentials to establish a connection with the database.
-
Since the workspace connection can only represent one version only 1 of the 3 version properties (“VERSION” or “HISTORICAL_NAME” or “HISTORICAL_TIMESTAMP”) should be used.
-
The "VERSION" property is case sensitive and the correct case must be used when entering the version property.
OpenAvailableWorkspace(IWorkspaceStatus)
Makes an attempt to open a new instance of a workspace that is esriWCSDown but has since become esriWCSAvailable.
virtual IWorkspace OpenAvailableWorkspace(IWorkspaceStatus wstatus)
Parameters
wstatusIWorkspaceStatus
Returns
OpenFromFile(string, int)
Opens the workspace specified by the given file name.
virtual IWorkspace OpenFromFile(string fileName, int hWnd)
Parameters
Returns
Remarks
OpenFromFile takes the pathname of a file or directory that represents either a FileSystemWorkspace or LocalDatabaseWorkspace, or a connection file to a RemoteDatabase workspace and returns an interface on the specified workspace. Clients of these methods can then proceed to open and access datasets in the workspace. If these methods are called with insufficient properties, then the user will be presented with a connection dialog that will prompt for the required properties.
The hWnd argument is the parent window or application's window. The hWnd will guarantee that the connection dialog, if presented to you because of insufficient properties, has the correct parent.
OpenFromString(string, int)
Opens the workspace specified by a connection string.
virtual IWorkspace OpenFromString(string connectStr, int hWnd)
Parameters
Returns
Remarks
The connect string is a collection of name value pairs separated by a semicolon (;).
OpenWithNewLicense(IPropertySet, int, string)
Open the enterprise database connection with new license file.
virtual IWorkspace OpenWithNewLicense(IPropertySet ConnectionProperties, int hWnd, string newLicensePath)
Parameters
ConnectionPropertiesIPropertySethWndintnewLicensePathstring
Returns
OpenWithNewPassword(IPropertySet, int, string)
Opens the workspace specified by the connection properties. Changes the connection password if it's expiring or expired.
virtual IWorkspace OpenWithNewPassword(IPropertySet ConnectionProperties, int hWnd, string newPassword)
Parameters
ConnectionPropertiesIPropertySethWndintnewPasswordstring
Returns
PingWorkspaceStatus(IWorkspace)
Checks if the status of an esriWCSDown workspace has changed.
virtual IWorkspaceStatus PingWorkspaceStatus(IWorkspace Workspace)
Parameters
WorkspaceIWorkspace
Returns
ReadConnectionPropertiesFromFile(string)
The connection properties from the specified file.
virtual IPropertySet ReadConnectionPropertiesFromFile(string fileName)
Parameters
fileNamestring
Returns
Remarks
The filename parameter represents the pathname of a file that contains the connection information to be placed into the IPropertySet variable.
RefreshAllSchemaCaches()
Refreshes all current schema caches.
virtual void RefreshAllSchemaCaches()
RefreshSchemaCache(IWorkspace)
Refreshes the schema cache for a specific workspace.
virtual void RefreshSchemaCache(IWorkspace Workspace)
Parameters
WorkspaceIWorkspace
RenameConnectionFile(string, string)
Renames the remote database workspace connection file.
virtual IWorkspaceName RenameConnectionFile(string oldPathName, string newName)
Parameters
Returns
Remarks
The oldPathName is the path and connection file name. the newName is the new file name without a path. An error is returned if newName has a fully qualified path.
SetParameters(string, string, string, string, string)
Sets ArcSDE connection property parameters.
virtual void SetParameters(string server, string instance, string User, string password, string versName)
Parameters
SetParameters3(string, string, string, string, string, string, object)
Sets ArcSDE connection property parameters.
virtual void SetParameters3(string server, string instance, string authenticationMode, string UserName, string password, string VersionName, object historicalInfo)
Parameters
serverstringinstancestringauthenticationModestringUserNamestringpasswordstringVersionNamestringhistoricalInfoobject
Remarks
The SetParameters3 method extends the functionality present in SetParameters by allowing the Authentication Mode and Historical Info to be included as default connection properties.
WorkspaceDescription[bool]
A singular or plural description of the type of workspace the workspace factory opens/creates.
virtual string WorkspaceDescription[bool plural] { get; }
Parameters
pluralbool
Returns
Remarks
WorkspaceStatus
Retrieve the workspace status information for all currently opened workspaces.
virtual IEnumWorkspaceStatus WorkspaceStatus { get; }
Returns
WorkspaceType
The type of workspace the workspace factory opens/creates.
virtual esriWorkspaceType WorkspaceType { get; }