The ITranslateSectionAssociation interface is used to translate LIS Section Association Requests into a D2L IPSIS Section Association Object.
The interface implementation is D2L.IM.IPSIS.LIS.CMS.ITranslateSectionAssociation.
The following configuration list provides a starting point for any LIS implementation:
Template, IPSIS
- SectionAssociationRequestBaseTranslator (Sort Order = 10)
- sectionAssociationRequestNameTitleOptionalTranslator (Sort Order = 20)
- SectionAssociationRequestSectionIdRequiredTranslator (Sort Order = 30)
- SectionAssociationRequestStatusOptionalTranslator (Sort Order = 40)
SectionAssociationRequestBaseTranslator
The SectionAssociationRequestBaseTranslator requires and maps the Section Association Identifier.
Implementation
D2L.IM.IPSIS.LIS.RequestAdapters.CMS.Default.SectionAssociationRequestBaseTranslator
Expected behavior
The translator performs the following tasks:
- Sets the OrgUnitCode and OrgUnitName to the value provided in the sourcedGUID.sourcedid.
- Processing continues to the next translator.
Property
|
Translation Result Object
|
LIS Request Mapping
|
Section Association Code
|
result.Entity.Code
|
sectionAssociationRecord.sourcedGUID.sourcedId
|
Section Association Name
|
result.Entity.Name
|
sectionAssociationRecord.sourcedGUID.sourcedId
|
Error behavior
If there is a problem during processing, an IncompleteRequestException is thrown. This results in:
- Suspension of all further processing.
- An LIS response header containing:
- CodeMajor = failure.
- Severity = status.
- CodeMinor = invaliddata.
Configuration note
This translator (or an alternative Base translator) must be configured first in the list of translators.
SectionAssociationRequestNameTitleOptionalTranslator
The SectionAssociationRequestNameTitleOptionalTranslator maps the name to the title.
Implementation
D2L.IM.IPSIS.LIS.RequestAdapters.CMS.Default.SectionAssocationRequestNameTitleOptionalTranslator
Expected behavior
The translator performs the following tasks:
- Updates the OrgUnitName to contain the value from the title string in the request.
- Processing continues to the next translator.
Property
|
Translation Result Object
|
LIS Request Mapping
|
Section Association Name
|
result.Entity.Name
|
sectionAssociationRecord.sectionAssociation.title.textString
|
Error behavior
If there is a problem during processing, an IncompleteRequestException is thrown. This results in:
- The suspension of all further processing.
- A LIS response header containing:
- CodeMajor = failure.
- Severity = status.
- CodeMinor = invaliddata.
Configuration note
This translator can be positioned anywhere after the Base translator.
SectionAssociationRequestStatusOptionalTranslator
The SectionAssociationRequestStatusOptionalTranslator sets the section status if it's provided.
Implementation
D2L.IM.IPSIS.LIS.RequestAdapters.CMS.Default.SectionAssociationRequestStatusOptionalTranslator
Expected behavior
The translator performs the following tasks:
- Adds the Status based on Active = True, Inactive = False, anything else being null.
- Processing continues to the next translator.
Property
|
Translation Result Object
|
LIS Request Mapping
|
Status
|
result.Entity.IsActive
|
sectionAssociationRecord.sectionAssociation.status
|
Error behavior
If there is a problem during processing, an IncompleteRequestException is thrown. This results in:
- The suspension of all further processing.
- A LIS response header containing:
- CodeMajor = failure.
- Severity = status.
- CodeMinor = invaliddata.
Configuration note
This translator can be positioned anywhere after the Base translator.
SectionAssociationRequestTruncateOrgUnitCodeTranslator
This translator truncates the org unit code of the result object if the code is longer than 50 characters. The truncated code is set at 50 characters.
Implementation
D2L.IM.IPSIS.LIS.RequestAdapters.CMS.Default.SectionAssociationRequestTruncateOrgUnitCodeTranslator
Expected behavior
The translator performs the following tasks:
- Checks to see if the result.Entity.Code is longer than 50 characters. If so, the code is truncated to 50 characters.
- Processing continues to the next translator.
Configuration note
This translator can be positioned anywhere after the Base translator.