@Override public void encrypt(PersistableBusinessObject businessObject, Set<String> attributeNames) { for (String attributeName : attributeNames) { try { PropertyUtils.setProperty(businessObject, attributeName, encryptionService.encrypt(PropertyUtils .getProperty(businessObject, attributeName))); } catch (Exception e) { throw new RuntimeException(new StringBuffer( "PostDataLoadEncryptionServiceImpl caught exception while attempting to encrypt attribute ").append( attributeName).append(" of Class ").append(businessObject.getClass()).toString(), e); } } legacyDataAdapter.save(businessObject); }
sessionDocument.setLastUpdatedDate(currentTime); legacyDataAdapter.save(sessionDocument); } catch (Exception e) { final String className = form != null ? form.getClass().getName() : "null";
/** * this needs to happen after the document itself is saved, to preserve consistency of the ver_nbr and in the case * of initial save, because this can't be saved until the document is saved initially * * @see org.kuali.rice.krad.document.DocumentBase#postProcessSave(org.kuali.rice.krad.rules.rule.event.DocumentEvent) */ @Override public void postProcessSave(DocumentEvent event) { Object bo = getNewMaintainableObject().getDataObject(); if (bo instanceof GlobalBusinessObject) { bo = KRADServiceLocatorWeb.getLegacyDataAdapter().save(bo); // KRAD/JPA - have to change the handle to object to that just saved getNewMaintainableObject().setDataObject(bo); } //currently only global documents could change the list of what they're affecting during routing, //so could restrict this to only happening with them, but who knows if that will change, so safest //to always do the delete and re-add...seems a bit inefficient though if nothing has changed, which is //most of the time...could also try to only add/update/delete what's changed, but this is easier if (!(event instanceof SaveDocumentEvent)) { //don't lock until they route getMaintenanceDocumentService().deleteLocks(MaintenanceDocumentBase.this.getDocumentNumber()); getMaintenanceDocumentService().storeLocks(MaintenanceDocumentBase.this.getNewMaintainableObject().generateMaintenanceLocks()); } }