-
Notifications
You must be signed in to change notification settings - Fork 26
add custom properties values
forumbyr edited this page Mar 17, 2015
·
4 revisions
This will show how to add your custom properties(key-value) to query response.
All models, such as domain, are extending from BaseModel class.
The BaseModel has an MAP type field ‘customProperties’, which is used for custom key-value.
For example, you want to add custom ‘createTime’ key-value to Domain model, you can :
- add your own RDAP conformance entry to spring-initData-rdapConformance.xml, which will show in 'rdapConformance' in query JSON response.
- modify java code: after query value from RDAP database, add ‘createTime’ key-value to Domain instance such as 'domain', by calling domain.addCustomProperty("createTime",value) method.
- modify 'customPropertyPrefix' configuration in rdap.properties, which is the prefix for custom columns, you can modify it to your own nic name.
WARN: custom property's name SHOULD conform to: ALPHA *( ALPHA / DIGIT / "_" )