MaintenanceDocumentForm form = (MaintenanceDocumentForm)model;
if (form.getDocument() != null && form.getDocument().getNewMaintainableObject() != null
&& form.getDocument().getNewMaintainableObject().getDataObject() != null) {
Object dataObject = form.getDocument().getNewMaintainableObject().getDataObject();
if (dataObject instanceof MatterExtensionHelper) {
MatterExtensionHelper helper = (MatterExtensionHelper)dataObject;
if (helper.getMatterId() != null) {
qualifiedMatterClassName = retrieveQualifiedMatterClassName(qualifiedMatterClassName, helper.getMatterId());
}
// works for court case, matter, conveyance, contract maintenance
} else if (dataObject instanceof Matter) {
qualifiedMatterClassName = dataObject.getClass().getCanonicalName();
}