Search in sources :

Example 11 with AuditApplication

use of org.alfresco.service.cmr.audit.AuditService.AuditApplication in project alfresco-remote-api by Alfresco.

the class AuditImpl method getAuditApp.

@Override
public AuditApp getAuditApp(String auditAppId, Parameters parameters) {
    checkEnabled();
    AuditService.AuditApplication auditApplication = findAuditAppByIdOr404(auditAppId);
    return new AuditApp(auditApplication.getKey().substring(1), auditApplication.getName(), auditApplication.isEnabled());
}
Also used : AuditApplication(org.alfresco.service.cmr.audit.AuditService.AuditApplication) AuditApp(org.alfresco.rest.api.model.AuditApp) AuditService(org.alfresco.service.cmr.audit.AuditService)

Example 12 with AuditApplication

use of org.alfresco.service.cmr.audit.AuditService.AuditApplication in project alfresco-remote-api by Alfresco.

the class AuditImpl method findAuditAppById.

private AuditService.AuditApplication findAuditAppById(String auditAppId) {
    AuditService.AuditApplication auditApp = null;
    Map<String, AuditService.AuditApplication> auditApplicationsByName = auditService.getAuditApplications();
    if (auditApplicationsByName != null) {
        for (AuditService.AuditApplication auditApplication : auditApplicationsByName.values()) {
            if (auditApplication.getKey().equals("/" + auditAppId)) {
                auditApp = auditApplication;
            }
        }
    }
    return auditApp;
}
Also used : AuditApplication(org.alfresco.service.cmr.audit.AuditService.AuditApplication) AuditApplication(org.alfresco.service.cmr.audit.AuditService.AuditApplication) AuditService(org.alfresco.service.cmr.audit.AuditService)

Aggregations

AuditApplication (org.alfresco.service.cmr.audit.AuditService.AuditApplication)12 AuditService (org.alfresco.service.cmr.audit.AuditService)7 ArrayList (java.util.ArrayList)4 HashMap (java.util.HashMap)4 AuditApp (org.alfresco.rest.api.model.AuditApp)3 WebScriptException (org.springframework.extensions.webscripts.WebScriptException)3 Date (java.util.Date)2 Map (java.util.Map)2 AuditEntry (org.alfresco.rest.api.model.AuditEntry)2 EntityNotFoundException (org.alfresco.rest.framework.core.exceptions.EntityNotFoundException)2 Query (org.alfresco.rest.framework.resource.parameters.where.Query)2 AuditQueryParameters (org.alfresco.service.cmr.audit.AuditQueryParameters)2 AuditQueryCallback (org.alfresco.service.cmr.audit.AuditService.AuditQueryCallback)2 Serializable (java.io.Serializable)1 TreeSet (java.util.TreeSet)1 AlfrescoRuntimeException (org.alfresco.error.AlfrescoRuntimeException)1 UserInfo (org.alfresco.rest.api.model.UserInfo)1 InvalidArgumentException (org.alfresco.rest.framework.core.exceptions.InvalidArgumentException)1 Paging (org.alfresco.rest.framework.resource.parameters.Paging)1 TypeConversionException (org.alfresco.service.cmr.repository.datatype.TypeConversionException)1