Expose audit service as public service and in freemarker.

Tests


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3683 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2006-09-04 19:12:55 +00:00
parent 6777f68fa5
commit e244f2c93c
19 changed files with 753 additions and 53 deletions

View File

@@ -57,7 +57,7 @@ public interface AuditInfo
*
* @return - the client address - may be null.
*/
public InetAddress getClientAddress();
public String getClientAddress();
/**
* The timestamp for the audit entry.
@@ -85,7 +85,7 @@ public interface AuditInfo
*
* @return
*/
public InetAddress getHostAddress();
public String getHostAddress();
/**
* Get the ID of the key node.

View File

@@ -54,7 +54,7 @@ public interface NodeService
* @return Returns a reference to the store
* @throws StoreExistsException
*/
@Auditable(parameters = {"protocol", "identifier"})
@Auditable(key = Auditable.Key.RETURN, parameters = {"protocol", "identifier"})
public StoreRef createStore(String protocol, String identifier) throws StoreExistsException;
/**

View File

@@ -34,6 +34,7 @@ import org.alfresco.repo.template.NodeSearchResultsMap;
import org.alfresco.repo.template.SavedSearchResultsMap;
import org.alfresco.repo.template.XPathResultsMap;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.audit.AuditInfo;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.lock.LockStatus;
import org.alfresco.service.cmr.security.AccessPermission;
@@ -660,6 +661,14 @@ public final class TemplateNode implements Serializable
}
// Audit API
public List<AuditInfo> getAuditTrail()
{
return this.services.getAuditService().getAuditTrail(this.nodeRef);
}
// ------------------------------------------------------------------------------
// Misc helpers