Understanding Softcoding Records

Softcoding records are used at runtime. They have a multipart key of user/role, environment, and softcoding key. Including environment in the key ensures that production and development entries are not used out of context. Including user/role in the key ensures that softcoding entries can be as specific as necessary. The softcoding key is the part that the business service passes to the getSoftCodingRecord method. The remainder of the information is provided by the context and is used in a hierarchical fashion so that the most specific records are used if available.

At runtime, when the business service passes J34A0010 as the softcoding key, the method looks for the following records in order and stops as soon as one is found, and returns the XML document.

In this example user KB123 has signed in with the role employee to environment PROD:

Sequence

User/Role

Environment

Softcoding Key

Softcoding Value

1

KB123

PROD

J34A0010

XML document segment

2

employee

PROD

J34A0010

XML document segment

3

*PUBLIC

PROD

J34A0010

XML document segment