public final class DoorsUtils extends Object
createApplication(PropertySet)
Modifier and Type | Method and Description |
---|---|
static DoorsApplication |
createApplication(PropertySet properties)
Instantiates a
DoorsApplication to then be able to execute DXL scripts. |
static org.eclipse.core.runtime.IStatus |
validate(DoorsApplication application)
Validate the connection to the DOORS client.
|
public static DoorsApplication createApplication(PropertySet properties) throws org.eclipse.core.runtime.CoreException
DoorsApplication
to then be able to execute DXL scripts.
The specified properties enable to configure which DOORS client is to be used. An instance of PropertySet
can be created by
instantiating the class com.sodius.mdw.core.util.DefaultPropertySet
.
To create a DOORS batch client application, properties should include the following options:
If properties are not configured to use a DOORS batch client, this method will use the active DOORS client, in interactive mode. Using an active DOORS client goes through DOORS COM automation layer. An exception is thrown if no active DOORS client can be found.
In case a DOORS batch client is to be used, this method does not starts a DOORS client right away. The client will be started on-demand when a
model read or a command is executed on it. The validate(DoorsApplication)
method might be used on the returned DOORS application
to ensure the specified DOORS server is accessible and the credentials are correct (the validation will start the DOORS batch client for that
to happen).
properties
- options to configure which DOORS client shall be used.org.eclipse.core.runtime.CoreException
- if properties are not valid (e.g. no user name is set to create a DOORS batch client)Common.PREFERENCE_DOORS_IS_SILENT
,
validate(DoorsApplication)
public static org.eclipse.core.runtime.IStatus validate(DoorsApplication application)
application
- the DOORS application that must be validated.OK
, details on the validation error might be found
using the DoorsStatusCode
class on the status code.DoorsStatusCode