mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
AuditComponent work for new auditing
- Pulled old AuditDAO methods into new AuditDAO interface - Combined AuditDAO implementations - First cut of high-level AuditSession creation - TODO: AuditSession data generation according to path git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15864 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -28,7 +28,7 @@ import org.alfresco.repo.audit.model._3.Application;
|
||||
import org.alfresco.util.ParameterCheck;
|
||||
|
||||
/**
|
||||
* Entity bean for <b>alf_audit_session</b> table.
|
||||
* Bean to hold session information for repeated use.
|
||||
*
|
||||
* @author Derek Hulley
|
||||
* @since 3.2
|
||||
@@ -37,14 +37,22 @@ public class AuditSession
|
||||
{
|
||||
private final Application application;
|
||||
private final String rootPath;
|
||||
private final Long sessionId;
|
||||
|
||||
public AuditSession(Application application, String rootPath)
|
||||
/**
|
||||
* @param application the audit application config being used
|
||||
* @param rootPath the root path being used for the session
|
||||
* @param sessionId the ID produced for the persisted session
|
||||
*/
|
||||
public AuditSession(Application application, String rootPath, Long sessionId)
|
||||
{
|
||||
ParameterCheck.mandatory("application", application);
|
||||
ParameterCheck.mandatoryString("rootPath", rootPath);
|
||||
ParameterCheck.mandatory("sessionId", sessionId);
|
||||
|
||||
this.application = application;
|
||||
this.rootPath = rootPath;
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -79,6 +87,7 @@ public class AuditSession
|
||||
sb.append("AuditSession")
|
||||
.append("[ application=").append(application.getName())
|
||||
.append(", rootPath=").append(rootPath)
|
||||
.append(", sessionId=").append(sessionId)
|
||||
.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
@@ -92,4 +101,9 @@ public class AuditSession
|
||||
{
|
||||
return rootPath;
|
||||
}
|
||||
|
||||
public Long getSessionId()
|
||||
{
|
||||
return sessionId;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user