queueRepositoryTask( localFile );
+ log.debug( "File '" + resource.getDisplayName() + ( exists ? "' modified " : "' created ") + "(current user '" + this.principal + "')" );
+
triggerAuditEvent( resource, exists ? AuditEvent.MODIFY_FILE : AuditEvent.CREATE_FILE );
}
else if ( !inputContext.hasStream() && isCollection() ) // New directory
{
localFile.mkdir();
+ log.debug( "Directory '" + resource.getDisplayName() + "' (current user '" + this.principal + "')" );
+
triggerAuditEvent( resource, AuditEvent.CREATE_DIR );
}
else
DavResourceLocator resourceLocator =
locator.getFactory().createResourceLocator( locator.getPrefix(), path );
DavResource resource = factory.createResource( resourceLocator, session );
+
if ( resource != null )
{
list.add( resource );
}
+ log.debug( "Resource '" + item + "' retrieved by '" + this.principal + "'" );
}
}
catch ( DavException e )
triggerAuditEvent( member, AuditEvent.REMOVE_FILE );
}
+ log.debug( ( resource.isDirectory() ? "Directory '" : "File '" ) + member.getDisplayName() + "' removed (current user '" + this.principal + "')" );
}
catch ( IOException e )
{
triggerAuditEvent( remoteAddr, locator.getRepositoryId(), logicalResource, AuditEvent.MOVE_FILE );
}
+
+ log.debug( ( isCollection() ? "Directory '" : "File '" ) + getLocalResource().getName() + "' moved to '" +
+ destination + "' (current user '" + this.principal + "')" );
}
catch ( IOException e )
{
triggerAuditEvent( remoteAddr, locator.getRepositoryId(), logicalResource, AuditEvent.COPY_FILE );
}
+ log.debug( ( isCollection() ? "Directory '" : "File '" ) + getLocalResource().getName() + "' copied to '" +
+ destination + "' (current user '" + this.principal + "')" );
}
catch ( IOException e )
{
throw new DavException( HttpServletResponse.SC_METHOD_NOT_ALLOWED,
"Write method not allowed for repository groups." );
}
+
+ log.debug( "Repository group '" + repoGroupConfig.getId() + "' accessed by '" + activePrincipal + "'" );
// handle browse requests for virtual repos
if ( RepositoryPathUtil.getLogicalResource( archivaLocator.getOrigResourcePath() ).endsWith( "/" ) )
throw new DavException( HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e );
}
+ log.debug( "Managed repository '" + managedRepository.getId() + "' accessed by '" + activePrincipal + "'" );
+
resource = processRepository( request, archivaLocator, activePrincipal, managedRepository );
String logicalResource = RepositoryPathUtil.getLogicalResource( locator.getResourcePath() );
if ( !resource.isCollection() )
{
boolean previouslyExisted = resourceFile.exists();
-
+
// Attempt to fetch the resource from any defined proxy.
boolean fromProxy = fetchContentFromProxies( managedRepository, request, logicalResource );
String event =
( previouslyExisted ? AuditEvent.MODIFY_FILE : AuditEvent.CREATE_FILE )
+ PROXIED_SUFFIX;
+
+ log.debug( "Proxied artifact '" + resourceFile.getName() + "' in repository '" +
+ managedRepository.getId() + "' (current user '" + activePrincipal + "')" );
+
triggerAuditEvent( request.getRemoteAddr(), archivaLocator.getRepositoryId(),
logicalResource.getPath(), event, activePrincipal );
}
{
destDir.mkdirs();
String relPath = PathUtil.getRelative( rootDirectory.getAbsolutePath(), destDir );
+
+ log.debug( "Creating destination directory '" + destDir.getName() + "' (current user '" + activePrincipal + "')" );
+
triggerAuditEvent( request.getRemoteAddr(), logicalResource.getPath(), relPath,
AuditEvent.CREATE_DIR, activePrincipal );
}
File proxiedFile = connectors.fetchFromProxies( managedRepository, artifact );
resource.setPath( managedRepository.toPath( artifact ) );
+
+ log.debug( "Proxied artifact '" + artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getVersion() + "'" );
return ( proxiedFile != null );
}
if ( isAuthorized( request, repository ) )
{
mergedRepositoryContents.add( resourceFile );
+ log.debug( "Repository '" + repository + "' accessed by '" + activePrincipal + "'" );
}
}
catch ( DavException e )
WebdavMethodUtil.getMethodPermission( request.getMethod() ) ) )
{
mergedRepositoryContents.add( resourceFile );
+ log.debug( "Repository '" + repository + "' accessed by '" + activePrincipal + "'" );
}
}
catch ( UnauthorizedException e )