Support to audit create/copy in the UI

Annotated missing method ... 

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3695 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2006-09-05 12:28:31 +00:00
parent 78462390bb
commit 65cc90d0d2
6 changed files with 35 additions and 12 deletions

View File

@@ -161,9 +161,21 @@
from
org.alfresco.repo.audit.hibernate.AuditFactImpl as audit_fact
where
audit_fact.storeProtocol = :protocol and
audit_fact.storeId = :store_id and
audit_fact.nodeUUID = :node_id
(audit_fact.storeProtocol = :protocol and
audit_fact.storeId = :store_id and
audit_fact.nodeUUID = :node_id)
or
arg1 like :nodeRef
or
arg2 like :nodeRef
or
arg3 like :nodeRef
or
arg4 like :nodeRef
or
arg5 like :nodeRef
or
returnValue like :nodeRef
order by
audit_fact.date asc
</query>

View File

@@ -590,6 +590,7 @@ public class AuditFactImpl implements AuditFact
query.setParameter(HibernateAuditDAO.QUERY_AUDIT_PROTOCOL, nodeRef.getStoreRef().getProtocol());
query.setParameter(HibernateAuditDAO.QUERY_AUDIT_STORE_ID, nodeRef.getStoreRef().getIdentifier());
query.setParameter(HibernateAuditDAO.QUERY_AUDIT_NODE_ID, nodeRef.getId());
query.setParameter(HibernateAuditDAO.QUERY_AUDIT_NODE_REF, "%"+nodeRef.toString()+"%");
return (List<AuditFact>) query.list();
}
}

View File

@@ -86,7 +86,14 @@ public class AuditInfoImpl implements AuditInfo
this.keyGUID = auditFact.getNodeUUID();
this.keyPropertiesAfter = null;
this.keyPropertiesBefore = null;
this.keyStore = new StoreRef(auditFact.getStoreProtocol(), auditFact.getStoreId());
if((auditFact.getStoreProtocol() != null) && (auditFact.getStoreId() != null))
{
this.keyStore = new StoreRef(auditFact.getStoreProtocol(), auditFact.getStoreId());
}
else
{
this.keyStore = null;
}
this.message = auditFact.getMessage();
this.methodArguments = null;
this.methodArgumentsAsStrings = new String[5];

View File

@@ -77,6 +77,8 @@ public class HibernateAuditDAO extends HibernateDaoSupport implements AuditDAO,
public static final String QUERY_AUDIT_STORE_ID = "store_id";
public static final String QUERY_AUDIT_NODE_ID = "node_id";
public static final String QUERY_AUDIT_NODE_REF = "nodeRef";
/** a uuid identifying this unique instance */
private String uuid;