private Registry registry;
protected void triggerAuditEvent( String repositoryId, String resource, String action,
AuditInformation auditInformation )
{
User user = auditInformation == null ? null : auditInformation.getUser();
AuditEvent event = new AuditEvent( repositoryId, user == null ? "null" : user.getUsername(), resource, action );
event.setRemoteIP( auditInformation == null ? "null" : auditInformation.getRemoteAddr() );
for ( AuditListener listener : getAuditListeners() )
{
listener.auditEvent( event );