-
Notifications
You must be signed in to change notification settings - Fork 10
OR Loader Configuration
This a DRAFT document describing a technical spike implementation of OR Loader Configuration. Please send questions and comments to the openregistry-dev@jasig.org mailing list.
The overall syntax consists of key-value pairs:
key "value"
key2 "value2"
When a key needs a group of values, {...} is used:
key {
key2 "value2"
key3 "value3"
}
key4 "value4"
The grouping notation ({...}) can also denote a function (written in groovy) where
appropriate:
key {
converter { value -> value.toUpperCase() }
}
Configuration of the loader is made from the perspective of Open Registry (OR) and the Loader rather than the source
system, roughly following the object model in OR for org.openregistry.core.domain.sor.SorPerson. The configuration is
structurally hierarchical. Each configuration section will have either an id field (in the instance of
configuration) or a keyField that denotes each distinct property. Because of the hierarchy, the keys are cumulative
(e.g. for a name, the keyFields for both the names element and person element identify a name.
Fields (leaves in configuration) can either be configured with a string denoting the column or a fieldConfiguration
group. A fieldConfiguration can have two fields (from three possible):
- value: String: name of the column from which to get the value
- staticValue: String: a static value
- converter: function: if not using a staticValue, the final value is the value returned from the function. The value
from the table cell is passed as an argument to the function. ex:
{ value -> value.toUpperCase() }
Only one of value and staticValue can be used. converter is only used if value is used.
- id (required): String: id for the SOR
- person (required): group: person configuration
- keyField (required): field: key field distinguishing each distinct person.
- names (required): group: names configuration
- roles: group: roles configuration
- localAttribute: group: configuration for a localAttribute. There may be multiple of these in a person
- keyField (required): field: key field distinguishing each distinct name. Should be the type of the name.
- given (required): field: given name
- middle: field: middle name or initial
- family: field: family name
- prefix: field: name prefix
- suffix: field: name suffix
- keyField (required): field: key field to distinguish each distinct role
- affiliation (required): field: affiliation type
- sorId (required): field: ID of the role in the SOR
- start (required): field: start date of the role
- end: field: end date of the role
- title (required): field: role title
- organizationalUnit (required): field: organizational unit for the role
- sponsorId (required): field: the id of the person responsible for this users role (supervisor)
- sponsorType (required): field: type of sponsor
- personStatus (required): field: status of the role (eg 'Active', 'Inactive')
- keyField (required): field: key field distinguishing the attribute. Should be the key of the
localAttributeset on the person. - value (required): field: value for the
configuration {
id "HR"
person {
keyField "empl_id"
names {
keyField {
staticValue "Formal"
}
given "first_name"
middle "middle_name"
family "last_name"
}
localAttribute {
keyField {
staticValue "SSNLAST5"
}
value "ssn_last5_no"
}
roles {
keyField "home_dept_cd"
affiliation {
staticValue "Staff"
}
start "appt_begin_dt"
end "termination_dt"
title {
staticValue "king"
}
organizationalUnit "home_dept_cd"
sponsorId {
staticValue 1l
}
sponsorType {
staticValue "Person"
}
personStatus {
value "termination_dt"
converter { value -> value ? 'Inactive' : 'Active' }
}
sorId {
value "home_dept_cd"
converter { value -> UUID.randomUUID().toString() }
}
}
}
}