use of org.mifos.framework.components.audit.business.service.AuditBusinessService in project head by mifos.
the class CenterServiceFacadeWebTier method retrieveChangeLogs.
@Override
public List<AuditLogDto> retrieveChangeLogs(Integer centerId) {
try {
List<AuditLogDto> auditLogs = new ArrayList<AuditLogDto>();
Short entityType = EntityType.CENTER.getValue();
AuditBusinessService auditBusinessService = new AuditBusinessService();
List<AuditLogView> centerAuditLogs = auditBusinessService.getAuditLogRecords(entityType, centerId);
for (AuditLogView auditLogView : centerAuditLogs) {
auditLogs.add(auditLogView.toDto());
}
return auditLogs;
} catch (ServiceException e) {
throw new MifosRuntimeException(e);
}
}
use of org.mifos.framework.components.audit.business.service.AuditBusinessService in project head by mifos.
the class BaseAction method loadChangeLog.
@TransactionDemarcate(joinToken = true)
public ActionForward loadChangeLog(ActionMapping mapping, @SuppressWarnings("unused") ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
Short entityType = EntityType.getEntityValue(request.getParameter(AuditConstants.ENTITY_TYPE).toUpperCase());
Integer entityId = Integer.valueOf(request.getParameter(AuditConstants.ENTITY_ID));
// FIXME - keithw - when replacing BaseActions loadChangeLog functionality for given entity when doing spring/ftl
// see CenterServiceFacade.retrieveChangeLogs for example.
AuditBusinessService auditBusinessService = new AuditBusinessService();
request.getSession().setAttribute(AuditConstants.AUDITLOGRECORDS, auditBusinessService.getAuditLogRecords(entityType, entityId));
return mapping.findForward(AuditConstants.VIEW + request.getParameter(AuditConstants.ENTITY_TYPE) + AuditConstants.CHANGE_LOG);
}
use of org.mifos.framework.components.audit.business.service.AuditBusinessService in project head by mifos.
the class AdminServiceFacadeWebTier method retrieveLoanProductAuditLogs.
@Override
public List<AuditLogDto> retrieveLoanProductAuditLogs(Integer productId) {
List<AuditLogDto> auditLogDtos = new ArrayList<AuditLogDto>();
AuditBusinessService auditBusinessService = new AuditBusinessService();
try {
List<AuditLogView> auditLogs = auditBusinessService.getAuditLogRecords(EntityType.LOANPRODUCT.getValue(), productId);
for (AuditLogView auditLogView : auditLogs) {
auditLogDtos.add(auditLogView.toDto());
}
return auditLogDtos;
} catch (ServiceException e) {
throw new MifosRuntimeException(e);
}
}
use of org.mifos.framework.components.audit.business.service.AuditBusinessService in project head by mifos.
the class AdminServiceFacadeWebTier method retrieveSavingsProductAuditLogs.
@Override
public List<AuditLogDto> retrieveSavingsProductAuditLogs(Integer productId) {
List<AuditLogDto> auditLogDtos = new ArrayList<AuditLogDto>();
AuditBusinessService auditBusinessService = new AuditBusinessService();
try {
List<AuditLogView> auditLogs = auditBusinessService.getAuditLogRecords(EntityType.SAVINGSPRODUCT.getValue(), productId);
for (AuditLogView auditLogView : auditLogs) {
auditLogDtos.add(auditLogView.toDto());
}
return auditLogDtos;
} catch (ServiceException e) {
throw new MifosRuntimeException(e);
}
}
use of org.mifos.framework.components.audit.business.service.AuditBusinessService in project head by mifos.
the class SavingsServiceFacadeWebTier method retrieveSavingsAccountAuditLogs.
@Override
public List<AuditLogDto> retrieveSavingsAccountAuditLogs(Long savingsId) {
List<AuditLogDto> auditLogDtos = new ArrayList<AuditLogDto>();
AuditBusinessService auditBusinessService = new AuditBusinessService();
try {
List<AuditLogView> auditLogs = auditBusinessService.getAuditLogRecords(EntityType.SAVINGS.getValue(), savingsId.intValue());
for (AuditLogView auditLogView : auditLogs) {
auditLogDtos.add(auditLogView.toDto());
}
return auditLogDtos;
} catch (ServiceException e) {
throw new MifosRuntimeException(e);
}
}
Aggregations