|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.datasourcesGDB.SdeWorkspaceFactory
public class SdeWorkspaceFactory
Esri SDE Workspace Factory.
Constructor Summary | |
---|---|
SdeWorkspaceFactory()
Constructs a SdeWorkspaceFactory using ArcGIS Engine. |
|
SdeWorkspaceFactory(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. SdeWorkspaceFactory theSdeWorkspaceFactory = (SdeWorkspaceFactory) obj; |
Method Summary | |
---|---|
void |
clearParameters(String server,
String instance)
Clears ArcSDE connection property parameters. |
void |
clearParameters3(String server,
String instance,
String authenticationMode)
Clears ArcSDE connection property parameters. |
boolean |
containsWorkspace(String parentDirectory,
IFileNames fileNames)
Indicates if parentDirectory contains a valid workspace, or is a valid file-system workspace. |
boolean |
copy(IWorkspaceName workspaceName,
String destinationFolder,
IWorkspaceName[] workspaceNameCopy)
Copies a workspace to the specified destination folder. |
IWorkspaceName |
create(String parentDirectory,
String name,
IPropertySet connectionProperties,
int hWnd)
Creates a new workspace specified by the directory, file name, and connection properties. |
void |
deleteConnectionFile(String pathName)
Deletes the remote database workspace connection file. |
void |
disableAllSchemaCaches()
Disable the schema caches of all open workspaces. |
void |
disableSchemaCache(IWorkspace workspace)
Disable the schema cache for a specific workspace. |
void |
disableSchemaCaching()
All new workspaces handed out by the factory will not have schema caching enabled. |
IWorkspaceName |
editConnectionFile(String pathName,
int hWnd)
Edits the properties of a remote database workspace connection file. |
void |
enableAllSchemaCaches()
Enable the schema caches of all open workspaces. |
void |
enableSchemaCache(IWorkspace workspace)
Enable the schema cache for a specific workspace. |
void |
enableSchemaCaching()
All new workspaces handed out by the factory will have schema caching enabled. |
boolean |
equals(Object o)
Compare this object with another |
IUID |
getClassID()
The class ID of the WorkspaceFactory. |
static String |
getClsid()
getClsid. |
String |
getWorkspaceDescription(boolean plural)
A singular or plural description of the type of workspace the workspace factory opens/creates. |
IWorkspaceName |
getWorkspaceName(String parentDirectory,
IFileNames fileNames)
Retrieves the workspace name of a workspace from the given list of file names. |
IEnumWorkspaceStatus |
getWorkspaceStatus()
Retrieve the workspace status information for all currently opened workspaces. |
int |
getWorkspaceType()
The type of workspace the workspace factory opens/creates. |
int |
hashCode()
the hashcode for this object |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
boolean |
isAnySchemaCacheStale()
Checks all current schema caches for staleness. |
boolean |
isSchemaCacheStale(IWorkspace workspace)
Checks a specific schema cache for staleness. |
boolean |
isWorkspace(String fileName)
True if the specified file identifies a workspace supported by the workspace factory. |
boolean |
move(IWorkspaceName workspaceName,
String destinationFolder)
Moves a workspace to the specified destination folder. |
IWorkspace |
open(IPropertySet connectionProperties,
int hWnd)
Opens the workspace specified by the connection properties. |
IWorkspace |
openAvailableWorkspace(IWorkspaceStatus wstatus)
Makes an attempt to open a new instance of a workspace that is esriWCSDown but has since become esriWCSAvailable. |
IWorkspace |
openFromFile(String fileName,
int hWnd)
Opens the workspace specified by the given file name. |
IWorkspace |
openFromString(String connectStr,
int hWnd)
Opens the workspace specified by a connection string. |
IWorkspace |
openWithNewLicense(IPropertySet pConnectionProperties,
int hWnd,
String newLicensePath)
Open the enterprise database connection with new license file. |
IWorkspace |
openWithNewPassword(IPropertySet connectionProperties,
int hWnd,
String newPassword)
Opens the workspace specified by the connection properties. |
IWorkspaceStatus |
pingWorkspaceStatus(IWorkspace workspace)
Checks if the status of an esriWCSDown workspace has changed. |
IPropertySet |
readConnectionPropertiesFromFile(String fileName)
The connection properties from the specified file. |
void |
refreshAllSchemaCaches()
Refreshes all current schema caches. |
void |
refreshSchemaCache(IWorkspace workspace)
Refreshes the schema cache for a specific workspace. |
IWorkspaceName |
renameConnectionFile(String oldPathName,
String newName)
Renames the remote database workspace connection file. |
void |
setParameters(String server,
String instance,
String user,
String password,
String versName)
Sets ArcSDE connection property parameters. |
void |
setParameters3(String server,
String instance,
String authenticationMode,
String userName,
String password,
String versionName,
Object historicalInfo)
Sets ArcSDE connection property parameters. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public SdeWorkspaceFactory() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic SdeWorkspaceFactory(Object obj) throws IOException
SdeWorkspaceFactory theSdeWorkspaceFactory = (SdeWorkspaceFactory) obj;
obj
to SdeWorkspaceFactory
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public IWorkspace open(IPropertySet connectionProperties, int hWnd) throws IOException, AutomationException
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:
open
in interface IWorkspaceFactory
connectionProperties
- A reference to a com.esri.arcgis.system.IPropertySet (in)hWnd
- The hWnd (A COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IWorkspace openFromFile(String fileName, int hWnd) throws IOException, AutomationException
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.
openFromFile
in interface IWorkspaceFactory
fileName
- The fileName (in)hWnd
- The hWnd (A COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IWorkspaceName create(String parentDirectory, String name, IPropertySet connectionProperties, int hWnd) throws IOException, AutomationException
create
in interface IWorkspaceFactory
parentDirectory
- The parentDirectory (in)name
- The name (in)connectionProperties
- A reference to a com.esri.arcgis.system.IPropertySet (in)hWnd
- The hWnd (A COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean containsWorkspace(String parentDirectory, IFileNames fileNames) throws IOException, AutomationException
containsWorkspace
in interface IWorkspaceFactory
parentDirectory
- The parentDirectory (in)fileNames
- A reference to a com.esri.arcgis.system.IFileNames (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IWorkspaceName getWorkspaceName(String parentDirectory, IFileNames fileNames) throws IOException, AutomationException
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.
getWorkspaceName
in interface IWorkspaceFactory
parentDirectory
- The parentDirectory (in)fileNames
- A reference to a com.esri.arcgis.system.IFileNames (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IUID getClassID() throws IOException, AutomationException
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.
getClassID
in interface IWorkspaceFactory
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isWorkspace(String fileName) throws IOException, AutomationException
isWorkspace
in interface IWorkspaceFactory
fileName
- The fileName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPropertySet readConnectionPropertiesFromFile(String fileName) throws IOException, AutomationException
The filename parameter represents the pathname of a file that contains the connection information to be placed into the IPropertySet variable.
readConnectionPropertiesFromFile
in interface IWorkspaceFactory
fileName
- The fileName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getWorkspaceDescription(boolean plural) throws IOException, AutomationException
getWorkspaceDescription
in interface IWorkspaceFactory
plural
- The plural (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getWorkspaceType() throws IOException, AutomationException
getWorkspaceType
in interface IWorkspaceFactory
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean copy(IWorkspaceName workspaceName, String destinationFolder, IWorkspaceName[] workspaceNameCopy) throws IOException, AutomationException
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.
copy
in interface IWorkspaceFactory
workspaceName
- A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)destinationFolder
- The destinationFolder (in)workspaceNameCopy
- A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean move(IWorkspaceName workspaceName, String destinationFolder) throws IOException, AutomationException
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.
move
in interface IWorkspaceFactory
workspaceName
- A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)destinationFolder
- The destinationFolder (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteConnectionFile(String pathName) throws IOException, AutomationException
deleteConnectionFile
in interface IRemoteDatabaseWorkspaceFactory
pathName
- The pathName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IWorkspaceName renameConnectionFile(String oldPathName, String newName) throws IOException, AutomationException
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.
renameConnectionFile
in interface IRemoteDatabaseWorkspaceFactory
oldPathName
- The oldPathName (in)newName
- The newName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IWorkspaceName editConnectionFile(String pathName, int hWnd) throws IOException, AutomationException
editConnectionFile
in interface IRemoteDatabaseWorkspaceFactory
pathName
- The pathName (in)hWnd
- The hWnd (A COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IWorkspace openWithNewPassword(IPropertySet connectionProperties, int hWnd, String newPassword) throws IOException, AutomationException
openWithNewPassword
in interface IEnterpriseWorkspaceFactory
connectionProperties
- A reference to a com.esri.arcgis.system.IPropertySet (in)hWnd
- The hWnd (A COM typedef) (in)newPassword
- The newPassword (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IWorkspace openWithNewLicense(IPropertySet pConnectionProperties, int hWnd, String newLicensePath) throws IOException, AutomationException
openWithNewLicense
in interface IEnterpriseWorkspaceFactory
pConnectionProperties
- A reference to a com.esri.arcgis.system.IPropertySet (in)hWnd
- The hWnd (A COM typedef) (in)newLicensePath
- The newLicensePath (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setParameters(String server, String instance, String user, String password, String versName) throws IOException, AutomationException
setParameters
in interface ISetDefaultConnectionInfo
server
- The server (in)instance
- The instance (in)user
- The user (in)password
- The password (in)versName
- The versName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IWorkspace openFromString(String connectStr, int hWnd) throws IOException, AutomationException
The connect string is a collection of name value pairs separated by a semicolon (;).
openFromString
in interface IWorkspaceFactory2
connectStr
- The connectStr (in)hWnd
- The hWnd (A COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void clearParameters(String server, String instance) throws IOException, AutomationException
clearParameters
in interface ISetDefaultConnectionInfo2
server
- The server (in)instance
- The instance (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void enableSchemaCaching() throws IOException, AutomationException
This method will enable chaching on any IWorkspace passed out by the workspace factory.
enableSchemaCaching
in interface IWorkspaceFactorySchemaCache
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void disableSchemaCaching() throws IOException, AutomationException
This method disables schema caching on the workspace factory.
disableSchemaCaching
in interface IWorkspaceFactorySchemaCache
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void enableSchemaCache(IWorkspace workspace) throws IOException, AutomationException
The EnableSchemaCache method will enable the schema cache for one workspace.
enableSchemaCache
in interface IWorkspaceFactorySchemaCache
workspace
- A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void enableAllSchemaCaches() throws IOException, AutomationException
enableAllSchemaCaches
in interface IWorkspaceFactorySchemaCache
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void disableSchemaCache(IWorkspace workspace) throws IOException, AutomationException
disableSchemaCache
in interface IWorkspaceFactorySchemaCache
workspace
- A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void disableAllSchemaCaches() throws IOException, AutomationException
disableAllSchemaCaches
in interface IWorkspaceFactorySchemaCache
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isSchemaCacheStale(IWorkspace workspace) throws IOException, AutomationException
isSchemaCacheStale
in interface IWorkspaceFactorySchemaCache
workspace
- A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isAnySchemaCacheStale() throws IOException, AutomationException
isAnySchemaCacheStale
in interface IWorkspaceFactorySchemaCache
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void refreshSchemaCache(IWorkspace workspace) throws IOException, AutomationException
refreshSchemaCache
in interface IWorkspaceFactorySchemaCache
workspace
- A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void refreshAllSchemaCaches() throws IOException, AutomationException
refreshAllSchemaCaches
in interface IWorkspaceFactorySchemaCache
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumWorkspaceStatus getWorkspaceStatus() throws IOException, AutomationException
getWorkspaceStatus
in interface IWorkspaceFactoryStatus
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IWorkspaceStatus pingWorkspaceStatus(IWorkspace workspace) throws IOException, AutomationException
pingWorkspaceStatus
in interface IWorkspaceFactoryStatus
workspace
- A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IWorkspace openAvailableWorkspace(IWorkspaceStatus wstatus) throws IOException, AutomationException
openAvailableWorkspace
in interface IWorkspaceFactoryStatus
wstatus
- A reference to a com.esri.arcgis.geodatabase.IWorkspaceStatus (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setParameters3(String server, String instance, String authenticationMode, String userName, String password, String versionName, Object historicalInfo) throws IOException, AutomationException
The SetParameters3 method extends the functionality present in SetParameters by allowing the Authentication Mode and Historical Info to be included as default connection properties.
setParameters3
in interface ISetDefaultConnectionInfo3
server
- The server (in)instance
- The instance (in)authenticationMode
- The authenticationMode (in)userName
- The userName (in)password
- The password (in)versionName
- The versionName (in)historicalInfo
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void clearParameters3(String server, String instance, String authenticationMode) throws IOException, AutomationException
Clears parameters set by SetParameters3.
clearParameters3
in interface ISetDefaultConnectionInfo3
server
- The server (in)instance
- The instance (in)authenticationMode
- The authenticationMode (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |