use of org.kuali.kfs.datadictionary.legacy.DocumentDictionaryService in project cu-kfs by CU-CommunityApps.
the class CUFinancialSystemDocumentServiceImpl method getDocumentAuthorizer.
protected FinancialSystemTransactionalDocumentAuthorizerBase getDocumentAuthorizer(Document doc) {
DocumentDictionaryService documentDictionaryService = SpringContext.getBean(DocumentDictionaryService.class);
Class<? extends DocumentAuthorizer> documentAuthorizerClass = (Class<? extends DocumentAuthorizer>) documentDictionaryService.getDocumentEntryByClass(doc.getClass()).getDocumentAuthorizerClass();
FinancialSystemTransactionalDocumentAuthorizerBase documentAuthorizer = null;
try {
documentAuthorizer = (FinancialSystemTransactionalDocumentAuthorizerBase) documentAuthorizerClass.newInstance();
} catch (InstantiationException ie) {
throw new RuntimeException("Could not construct document authorizer: " + documentAuthorizerClass.getName(), ie);
} catch (IllegalAccessException iae) {
throw new RuntimeException("Could not construct document authorizer: " + documentAuthorizerClass.getName(), iae);
}
return documentAuthorizer;
}
Aggregations