EarthSoft.EDP.EddCustomHandler.ShowUpdateMode

<< Click to Display Table of Contents >>

EQuIS 7  >>  Configuration > ST_CONFIG Entries > EarthSoft.EDP >

EarthSoft.EDP.EddCustomHandler.ShowUpdateMode

Limits the commit type in EDP Professional for a given format (may be user-specific). For more information on commit type limits, see Limit Commit Types in EDP further down in this article.

 

EQuIS Version: 7

 

Namespace: EarthSoft.EDPEddCustomHandler

 

Products Affected:

oEDP

 

 

Requires Module:

oProfessional

 

ST_CONFIG

VALUE

REMARK

VALID VALUES

CONFIG_SECTION

EarthSoft.EDP.EddCustomHandler.ShowUpdateMode

 

someuser\EarthSoft.EDP.EddCustomHandler.ShowUpdateMode

There are two alternate forms of this section. One is the string literal, the other prepends that with a user name as found in st_user.


CONFIG_KEY

<format name>

 

Required

The name of the format file with filename extension

OBJECT_TYPE

CommitMode

 

Required


OBJECT_VALUE

None

Merge

Update

Replace

Format

Choose One


STRING_VALUE

True

False

Choose One

True = Show Option

False = Hide Option

 

Remarks:

 

Commit Mode or Update Mode defines how EDP should handle a row from an EDD Package when a record matching it's unique constraint exists in the EQuIS Data

None = Insert Only

Merge = Insert & Merge

Update = Insert & Update

Replace = Insert & Replace

Format = Format Specific (controlled by the custom handler)

 

Typically, this setting is accomplished with several records, one for each Update Mode. For example, The following would restrict all users except john_doe to "Insert Only" and 'Insert & Merge" when committing EDDs using the EQEDD format.

 

config_section

config_key

object_type

object_value

string_value

EarthSoft.EDP.EddCustomHandler.ShowUpdateMode

EQEDD

CommitMode

None

True

EarthSoft.EDP.EddCustomHandler.ShowUpdateMode

EQEDD

CommitMode

Merge

True

EarthSoft.EDP.EddCustomHandler.ShowUpdateMode

EQEDD

CommitMode

Update

False

EarthSoft.EDP.EddCustomHandler.ShowUpdateMode

EQEDD

CommitMode

Replace

False

EarthSoft.EDP.EddCustomHandler.ShowUpdateMode

EQEDD

CommitMode

Format

False

john_doe\EarthSoft.EDP.EddCustomHandler.ShowUpdateMode

EQEDD

CommitMode

None

True

john_doe\EarthSoft.EDP.EddCustomHandler.ShowUpdateMode

EQEDD

CommitMode

Merge

True

john_doe\EarthSoft.EDP.EddCustomHandler.ShowUpdateMode

EQEDD

CommitMode

Update

True

john_doe\EarthSoft.EDP.EddCustomHandler.ShowUpdateMode

EQEDD

CommitMode

Replace

True

john_doe\EarthSoft.EDP.EddCustomHandler.ShowUpdateMode

EQEDD

CommitMode

Format

True

 

Control of a specified format's Commit types as well as the Commit type's name can also be implemented via a format's custom handler (e.g. *.vb file). To control which commit types are available, the format's custom handler must override method ShowUpdateMode. Controlling the commit types from a format will void any commit types declared in ST_CONFIG.

 

The following example would only allow commit type "Insert Only", except for the user, Bob. Bob would have commit types "Insert Only" and "Insert and Merge".

 

   Public Overrides Function ShowUpdateMode(mode As EarthSoft.Common.Data.Connection.UpdateModes, _

   formatName As String, cn As EarthSoft.Common.Data.ConnectionAs Boolean
     Select Case mode
       Case EarthSoft.Common.Data.Connection.UpdateModes.None
         Return True
       Case EarthSoft.Common.Data.Connection.UpdateModes.Merge
         If cn.User.Name = "Bob" Then
           Return True
         Else
           Return False
         End If
       Case Else
         Return False
     End Select
   End Function