Knowledge Partner
Knowledge Partner
100 views

Q: Get sizing information from schema

I got interesting business case when I have to validate and "chop" data according to the size of the attribute defined in the schema.

For example, Custom attribute defined as "Case Ignore String", [0-9].

Source system doesn't have a strict size definition on own end and we got situations when "long" string supposed to go to attribute with size definition [0-3].

I did a "temporary" solution by storing this info in the mapping table, but it required extra manual maintenance of this info.

We already have this info in the schema definition (book of record).

I would like to get information about the attribute "size" from schema directly from the policy.

One of the ways, that I can see: read schema thru LDAP and parse it.

May somebody already did a similar task and have "ready-to-use" code? 

Labels (1)
0 Likes
2 Replies
pdeneu Super Contributor.
Super Contributor.

Re: Q: Get sizing information from schema

Hey,

i have not "ready-use" code, but i would prefer to create a ldap-connector with basedn cn=schmea, which queries for attribute-type attribute. With this information you could fill up a mapping table dynamicly.

Parsing the attribute-type attribute gives us the whole stuff like X-NDS_UPPER_BOUND which is your limitation:

 

( 2.5.4.12 NAME 'title' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{64} X-NDS_NAME 'Title' X-NDS_LOWER_BOUND '1' X-NDS_UPPER_BOUND '64' X-NDS_NONREMOVABLE '1' )

 

i had this problem also in the past, but it just reflected to a small set of attributes where i was able to handle it manualy.


--
https://www.lanworks.de
0 Likes
Knowledge Partner
Knowledge Partner

Re: Q: Get sizing information from schema

Yes, this is a way to go, if no other options available. 🙂

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.