public final class Common extends Object
Most of the options are designed to be used in conjunction with the DOORS Application model reader, as illustrated in the snippet below (see
DoorsReader
for a full snippet):
Map<String, Object> options = new HashMap<String, Object>(); options.put(Common.OPTION_IGNORE_CONNECTOR_UI, true); options.put(Common.OPTION_IGNORE_IMAGE, true); myModel.read("Application", "", options).
Options might also be set as a Java System property. For example, for an option named "xyz"
, setting a value as a Java Virtual Machine
argument is done this way:
-Dxyz=myValue
DoorsReader
Modifier and Type | Field and Description |
---|---|
static String |
DATE_FORMAT_PROPERTY
Specifies the date format transferred in the MDWorkbench model.
|
static String |
DATE_LOCALE_PROPERTY
Specifies the language identification used for the date for the model
transferred in MDWorkbench.
|
static String |
MODE_ADD
Clients are advised not to use this field.
|
static String |
MODE_REPLACE
Clients are advised not to use this field.
|
static String |
MODE_UPDATE
Clients are advised not to use this field.
|
static String |
OPTION_ATTACHMENT_RESOLVER
An instance of the interface
AttachmentResolver that
determines the physical location of OLE object files to be written in
DOORS, when using the DOORS Application model writer. |
static String |
OPTION_BATCH_CACHE
Determines whether the DOORS caching command line switch (
-k ) is to use
when starting a DOORS client in batch mode. |
static String |
OPTION_BATCH_TIMEOUT
Determines the number of milliseconds after which a DOORS client launched
in batch mode is shutdown if it is inactive, i.e.
|
static String |
OPTION_DOORS_APPLICATION
Determines the DOORS application instance to be used by the DOORS model reader
when executing DXL scripts.
|
static String |
OPTION_DOWNGRADE_MODULE
Determines whether an edited module should downgrade to read-only when
accessed by the connector.
|
static String |
OPTION_ENUMERATION_LITERAL_SEPARATOR
Determines the separator used when reading multi-valued enumerated
attributes.
|
static String |
OPTION_FILTER_DXL_ATTRIBUTE
This option should not be used by clients.
|
static String |
OPTION_FILTER_DXL_FOLDER
This option should not be used by clients.
|
static String |
OPTION_FILTER_DXL_FORMAL_MODULE
This option should not be used by clients.
|
static String |
OPTION_FILTER_DXL_LINK_MODULE
This option should not be used by clients.
|
static String |
OPTION_IGNORE_CONNECTOR_UI
Determines whether the connector selection dialog should be avoided.
|
static String |
OPTION_IGNORE_CONTROL_CHARACTERS
Determines whether control characters (from code 1 to 25 in ASCII table)
that may appear in DOORS Object texts are to be ignored.
|
static String |
OPTION_IGNORE_DELETED_OBJECTS
Determines whether deleted Objects are to be ignored (not retrieved when reading a module content).
|
static String |
OPTION_IGNORE_DISCUSSIONS
Determines whether Discussions and Comments are to be ignored.
|
static String |
OPTION_IGNORE_IMAGE
Determines whether Object image is to be ignored.
|
static String |
OPTION_IGNORE_NON_CURRENT_VIEW_COLUMNS
Determines whether columns of views other than the current one are to be ignored.
|
static String |
OPTION_IGNORE_OLE_OBJECTS
Determines whether OLE objects are to be ignored.
|
static String |
OPTION_IGNORE_OLE_PREVIEW_IMAGES
Determines whether preview images of OLE objects are to be ignored.
|
static String |
OPTION_IGNORE_RICH_TEXT
Determines whether Object Text and Heading formatting (bold, italic,
etc.) is to be ignored when reading data.
|
static String |
OPTION_IGNORE_SYSTEM_ATTRIBUTES
Determines whether System attribute definitions (e.g.
|
static String |
OPTION_IGNORE_SYSTEM_TEXT_ATTRIBUTE_VALUES
Determines whether Object system text attribute values are to be ignored.
|
static String |
OPTION_IGNORE_TABLE
Determines whether DOORS internal table objects (
Table and Row ) are to be ignored. |
static String |
OPTION_ONDEMAND_AUTO_CLOSE_MODULE_DELAY
Determines the number of milliseconds after which a module is closed in
the DOORS client if it is inactive, i.e.
|
static String |
OPTION_ONDEMAND_CONFIGURATION
The configuration that controls the on-demand behavior.
|
static String |
OPTION_PRECISE_LAST_MODIFIED_ON
Determines whether computing the
"Last Modified On" value for an object
should involve looking in object history. |
static String |
OPTION_RESOURCE_URL
Determines whether to read the Item or Object resource URL instead of the
DOORS legacy URL.
|
static String |
OPTION_RICH_TEXT_PROCESSOR
Controls the reading process of DOORS rich text values.
|
static String |
OPTION_RICH_TEXT_TYPE
Determines the format of rich text to use when reading Object Text
and Heading formatting (bold, italic, etc.).
|
static String |
OPTION_SCOPE
The scope of the model reader.
|
static String |
OPTION_SCOPE_DEFAULT_MODE
Determines the default mode for the model reader scope, i.e.
|
static String |
OPTION_ZIP_FILE_EXTENSIONS
Determines the file types which are embedded into a zip before being
inserted into a DOORS Object.
|
static String |
PREFERENCE_DOORS_IS_SILENT
Requests to connect to DOORS in batch mode, instead of requiring a DOORS
client to be open.
|
static String |
PREFERENCE_DOORS_PASSWORD
The password of the DOORS user to make the connection in batch mode.
|
static String |
PREFERENCE_DOORS_PATH
The full path of
doors.exe , used to launch a DOORS client in
batch mode. |
static String |
PREFERENCE_DOORS_PORTSERVER
The port and server name of the database to connect to in batch mode
(e.g.
|
static String |
PREFERENCE_DOORS_USER
The name of the DOORS user to make the connection in batch mode.
|
static String |
PREFERENCE_DOORS_WITH_MODULE_LINK
Deprecated.
Replaced with
ReaderScope.getItemScope(folderFullName).setMode(ItemScopeMode.COMPLETE) ; |
static String |
PREFERENCE_FILTER_OBJECTS
Deprecated.
Replaced with
OnDemandConfiguration.getBlockedTypes().add(DoorsPackage.Literals.OBJECT); |
static String |
PREFERENCE_FOLDER_FOR_MODULE_NAME
Deprecated.
Replaced with
ReaderScope.getItemScope(folderFullName).setMode(ItemScopeMode.COMPLETE) ; |
static String |
ROOT_FOLDER_PROPERTY
Deprecated.
Use
OPTION_SCOPE instead; |
Modifier and Type | Method and Description |
---|---|
static String |
getQualifiedPath(AggregatedElement self)
Deprecated.
Use
Item.getQualifiedName() instead. |
public static final String DATE_FORMAT_PROPERTY
"MM/dd/yyyy"
, which indicates month/day/year.public static final String DATE_LOCALE_PROPERTY
1033
, for
English (United States).@Deprecated public static final String ROOT_FOLDER_PROPERTY
OPTION_SCOPE
instead;OPTION_SCOPE
,
Constant Field Valuespublic static final String MODE_REPLACE
public static final String MODE_UPDATE
public static final String MODE_ADD
public static final String PREFERENCE_DOORS_PATH
doors.exe
, used to launch a DOORS client in
batch mode.PREFERENCE_DOORS_IS_SILENT
,
Constant Field Valuespublic static final String PREFERENCE_DOORS_PORTSERVER
36677@myServer
).PREFERENCE_DOORS_IS_SILENT
,
Constant Field Valuespublic static final String PREFERENCE_DOORS_USER
PREFERENCE_DOORS_IS_SILENT
,
Constant Field Valuespublic static final String PREFERENCE_DOORS_PASSWORD
PREFERENCE_DOORS_IS_SILENT
,
Constant Field Valuespublic static final String PREFERENCE_DOORS_IS_SILENT
true
, the following settings
must also be configured:
PREFERENCE_DOORS_PATH
- the full path of doors.exe
, used to launch DOORSPREFERENCE_DOORS_PORTSERVER
- the port and server name of the database to connect to (e.g. 36677@myServer
)PREFERENCE_DOORS_USER
- the name of the DOORS user to make the connectionPREFERENCE_DOORS_PASSWORD
- the password of the DOORS user to make the connectionOPTION_IGNORE_CONNECTOR_UI
should also be set true
in such use case.OPTION_DOORS_APPLICATION
instead.@Deprecated public static final String PREFERENCE_DOORS_WITH_MODULE_LINK
ReaderScope.getItemScope(folderFullName).setMode(ItemScopeMode.COMPLETE)
;ReaderScope
,
Constant Field Values@Deprecated public static final String PREFERENCE_FOLDER_FOR_MODULE_NAME
ReaderScope.getItemScope(folderFullName).setMode(ItemScopeMode.COMPLETE)
;ReaderScope
,
Constant Field Values@Deprecated public static final String PREFERENCE_FILTER_OBJECTS
OnDemandConfiguration.getBlockedTypes().add(DoorsPackage.Literals.OBJECT);
OnDemandConfiguration
,
Constant Field Valuespublic static final String OPTION_IGNORE_CONNECTOR_UI
true
. Default value is false
(meaning the
connector UI is displayed).public static final String OPTION_IGNORE_RICH_TEXT
false
(meaning rich text
formatting is read).
Note that setting OPTION_IGNORE_RICH_TEXT
has no effect if OPTION_RICH_TEXT_TYPE
is also used.
OPTION_RICH_TEXT_TYPE
,
Constant Field Valuespublic static final String OPTION_RICH_TEXT_TYPE
RichTextType.XHTML_LITERAL
.
This option is notably useful for use cases where RTF content is welcome (RichTextType.RTF_LITERAL
), as it avoids to convert DOORS
native RTF content to XHTML.
Note that setting OPTION_IGNORE_RICH_TEXT
has no effect if OPTION_RICH_TEXT_TYPE
is used.
RichTextType
,
Constant Field Valuespublic static final String OPTION_RICH_TEXT_PROCESSOR
This option value must be an instance of the RichTextProcessor
class.
The referenced processor is given the opportunity to customize the parsing of DOORS RTF content
and the conversion to XHTML format.
RichTextProcessor
,
Constant Field Valuespublic static final String OPTION_IGNORE_IMAGE
false
(meaning images are
read).
When OPTION_IGNORE_IMAGE
is false
, the method Object.getImage()
returns an image content if the DOORS
object is a picture object or if the Object Text contains at least one OLE object (the image will be the preview of the first OLE object).
If OPTION_IGNORE_OLE_PREVIEW_IMAGES
is set to false
as well, the method Object.getImage()
returns an
image content only if the DOORS object is a picture object. The method Object.getImage()
will not return an image content if the
Object Text contains an OLE object.
public static final String OPTION_IGNORE_OLE_OBJECTS
false
(meaning OLE
objects are read).
If OLE object preview images are also desired, the OPTION_IGNORE_OLE_PREVIEW_IMAGES
option must be set to false
.
public static final String OPTION_IGNORE_OLE_PREVIEW_IMAGES
true
(meaning OLE objects previews are not read).
When OPTION_IGNORE_IMAGE
is false
, the method Object.getImage()
returns an image content if the DOORS
object is a picture object or if the Object Text contains at least one OLE object (the image will be the preview of the first OLE object).
If OPTION_IGNORE_OLE_PREVIEW_IMAGES
is set to false
as well, the method Object.getImage()
returns an
image content only if the DOORS object is a picture object. The method Object.getImage()
will not return an image content if the
Object Text contains an OLE object.
When this option is set to false
, OLE object previews can be retrieved using the RichTextUtils.getAttachmentPreview()
method.
This option is valid only if OPTION_IGNORE_OLE_OBJECTS
is set to false
.
public static final String OPTION_IGNORE_TABLE
Table
and Row
) are to be ignored. These objects are usually not
used.
Note: Objects contained in table cells are always read and not affected
by this setting. Default value is true
(meaning table
structure is ignored).public static final String OPTION_IGNORE_CONTROL_CHARACTERS
true
(meaning control characters are ignored).public static final String OPTION_IGNORE_NON_CURRENT_VIEW_COLUMNS
false
(meaning columns of all views are computed).public static final String OPTION_IGNORE_SYSTEM_ATTRIBUTES
"Object Text"
) are to be ignored. DOORS System attributes
value are always mapped to the corresponding EMF value, regardless of
this setting. For instance the DOORS "Object Text"
value is
stored in the EMF value "Object.objectText"
. By default, no
EMF Attribute definition is created for the DOORS "Object Text"
. Turning on this setting will enable the
reading of System Attribute definitions. Default value is true
(meaning system attribute definitions are not read).public static final String OPTION_IGNORE_SYSTEM_TEXT_ATTRIBUTE_VALUES
false
(meaning text values are read).public static final String OPTION_IGNORE_DISCUSSIONS
true
(meaning
discussions are not read).public static final String OPTION_IGNORE_DELETED_OBJECTS
true
(meaning deleted objects are not read).public static final String OPTION_ZIP_FILE_EXTENSIONS
When a file (e.g. a Word Document) is to be inserted into a DOORS Object and is not already wrapped into an OLE container, the DXL API oleInsert() is used to perform this operation. This API launches the corresponding application (e.g. Word), using OLE Automation, to request the creation of the OLE container. Microsoft Office applications are known to not support this action when running in a non interactive mode (e.g. when launched from a Windows Service). This can lead to unpredictable behavior.
This option allows to declare a comma separated list of file extensions (e.g. doc,dox,ppt,pptx,xls,xlsx
). When a file matching one
of those extensions is to be imported, the file will be wrapped into a zip file before being inserted.
This option can be used when calling the model reader (see DoorsReader
). It can also be set as a Java System property to be taken
into account when running commands (see SetAttributeValueFragment
).
SetAttributeValueFragment
,
Constant Field Valuespublic static final String OPTION_SCOPE
ReaderScope
It may be used to configure which DOORS items
should be read.ReaderScope
,
Constant Field Valuespublic static final String OPTION_SCOPE_DEFAULT_MODE
ItemScopeMode.ONDEMAND
.OPTION_SCOPE
,
ItemScopeMode
,
Constant Field Valuespublic static final String OPTION_ONDEMAND_CONFIGURATION
OnDemandConfiguration
. It may be used to
change the type of content to read. Default value is an instance of OnDemandConfiguration.Default
OnDemandConfiguration
,
Constant Field Valuespublic static final String OPTION_ONDEMAND_AUTO_CLOSE_MODULE_DELAY
public static final String OPTION_DOWNGRADE_MODULE
edit
or share
mode.false
(meaning no downgrade occurs).public static final String OPTION_ATTACHMENT_RESOLVER
AttachmentResolver
that
determines the physical location of OLE object files to be written in
DOORS, when using the DOORS Application model writer. The API RichTextUtils.createAttachmentResolver(File)
provides a
default implementation.public static final String OPTION_RESOURCE_URL
http
protocol whereas the DOORS legacy URL uses a doors
protocol. Default value is false
(meaning
DOORS legacy URL are used). Note this option requires DOORS 9.3 or
higher.
Since MDAccess for DOORS 3.8.1, this option can also be set to "legacy"
. This shall be used when the DOORS redirector service is
activated on the server. In such case, the DOORS URL is neither a DOORS legacy URL nor a DOORS Web Access URL. Setting this option to
"legacy"
forces to compute a DOORS legacy URL.
public static final String OPTION_ENUMERATION_LITERAL_SEPARATOR
InstantiatedAttribute.value
. The
default value is a comma (","
), for historical reasons. As
this character might be used in an enumeration literal, it is recommended
to use another separator, like "\n"
or any other character
that cannot be used in a literal.public static final String OPTION_PRECISE_LAST_MODIFIED_ON
"Last Modified On"
value for an object
should involve looking in object history.
The default behavior (when this option is set to false
) is to read the attribute value as is (meaning as given by DOORS client).
This is fast to compute and does give the date as seen in the object properties, in the DOORS client. However it is known this modification
date is not updated in certain cases, for example when the object is moved below another parent.
When this option is set to true
, the model reader will additionally lookup the object history to check whether a more recent
modification can be found. This enables a more precise and reliable modification date, for use cases that need to determine the exact date at
which an object was changed. The drawback is that it is a more costly operation. The overhead highly depends on the number of objects to read
and the depth of each object history. It can be significantly enough to have the default value for this option set to false
, to
let each developer decide whether to activate it or not depending on the actual use case.
public static final String OPTION_DOORS_APPLICATION
When the model reader needs to use a DOORS batch client, the regular pattern is to configure the PREFERENCE_DOORS_IS_SILENT
option
so that the reader can create its own DOORS client, which is automatically shutdown when model.clear()
method is called.
There are use cases where the same DOORS batch client should be shared between a model reader and a DXL command to update DOORS data. This
option allows the programmer to instantiate a DOORS application on its own, to used it to both read and update DOORS data, and then to
dispose
the DOORS application.
Here is a snippet illustrating this case:
DoorsApplication application = null; Model model = null; try { // create a DOORS application application = DoorsUtils.createApplication(...); // read a DOORS model Map<String, Object> options = new HashMap<String, Object>(); options.put(Common.OPTION_IGNORE_CONNECTOR_UI, true); options.put(Common.OPTION_DOORS_APPLICATION, application); model = workbench.getMetamodelManager().getMetamodel(DoorsPackage.eINSTANCE).createModel(); model.read("Application", "", options); ... // execute a command CommandRunner runner = new CommandRunner(workbench, application); runner.run(myCommand); } finally { if (model != null) { model.clear(); } if (application != null) { // The DOORS application was instantiated in this code, which is then in charge to dispose it. application.dispose(); } }
public static final String OPTION_BATCH_TIMEOUT
public static final String OPTION_BATCH_CACHE
-k
) is to use
when starting a DOORS client in batch mode.
Turning this option on enables streaming for the transfer of data between the DOORS database server and the client.
It can improve data transfer performance over a WAN.
Caution: while data is loading, it is cached to the localdata area in the client machine, which might pose a security risk.
The data is cleared when loading is complete.
This option is to activate using a System property (e.g. -Ddoors.batch.cache=true
).
Default value is false.
public static final String OPTION_FILTER_DXL_FOLDER
public static final String OPTION_FILTER_DXL_FORMAL_MODULE
public static final String OPTION_FILTER_DXL_LINK_MODULE
public static final String OPTION_FILTER_DXL_ATTRIBUTE
@Deprecated public static String getQualifiedPath(AggregatedElement self)
Item.getQualifiedName()
instead.self
- the item for which a qualified name is to determineItem.getQualifiedName()