<constructor-arg ref="nexusSearch"/>
</bean>
+ <alias name="repositoryStatisticsManager#default" alias="repositoryStatisticsManager"/>
+ <!-- TODO olamy need to find a more dynamic way if using jcr impl -->
+ <alias name="repositorySessionFactory#file" alias="repositorySessionFactory"/>
<!-- Web Services : Administration Service -->
<bean name="administrationService" lazy-init="true" scope="singleton"
class="org.apache.archiva.web.xmlrpc.services.AdministrationServiceImpl">
<constructor-arg ref="archivaConfiguration"/>
<constructor-arg ref="repositoryContentConsumers"/>
- <constructor-arg ref="repositoryContentFactory"/>
+ <constructor-arg ref="repositoryContentFactory#default"/>
<constructor-arg ref="repositorySessionFactory"/>
<constructor-arg ref="archivaTaskScheduler#repository"/>
<constructor-arg>
<constructor-arg ref="repositoryStatisticsManager"/>
<constructor-arg ref="repositoryMerger#maven2"/>
<constructor-arg ref="auditListener#logging"/>
- <constructor-arg ref="registry#commons-configuration"/>
+ <constructor-arg ref="commons-configuration"/>
</bean>
import org.apache.archiva.metadata.model.MetadataFacet;
import org.apache.archiva.metadata.model.MetadataFacetFactory;
+import org.springframework.stereotype.Service;
/**
- * @plexus.component role="org.apache.archiva.metadata.model.MetadataFacetFactory" role-hint="org.apache.archiva.audit"
+ * plexus.component role="org.apache.archiva.metadata.model.MetadataFacetFactory" role-hint="org.apache.archiva.audit"
*/
+@Service("metadataFacetFactory#org.apache.archiva.audit")
public class AuditEventFactory
implements MetadataFacetFactory
{
*
* @param event the event details.
*/
- public void auditEvent( AuditEvent event );
+ void auditEvent( AuditEvent event );
}
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
/**
* AuditLog - Audit Log.
* @version $Id$
* @plexus.component role="org.apache.archiva.audit.AuditListener" role-hint="logging"
*/
+@Service("auditListener#logging")
public class AuditLog
implements AuditListener
{
*/
public void auditEvent( AuditEvent event )
{
- StringBuffer msg = new StringBuffer();
+ StringBuilder msg = new StringBuilder();
msg.append( checkNull( event.getRepositoryId() ) ).append( DELIM );
msg.append( event.getUserId() ).append( DELIM );
msg.append( checkNull( event.getRemoteIP() ) ).append( DELIM );
*
* @param the listener to add.
*/
- public void addAuditListener( AuditListener auditListener );
+ void addAuditListener( AuditListener auditListener );
/**
* Remove an AuditListener.
*
* @param the listener to remove.
*/
- public void removeAuditListener( AuditListener auditListener );
+ void removeAuditListener( AuditListener auditListener );
/**
* Remove all registered {@link AuditListener} objects.
*/
- public void clearAuditListeners();
+ void clearAuditListeners();
}
import org.apache.archiva.metadata.repository.MetadataRepositoryException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
import java.text.ParseException;
import java.text.SimpleDateFormat;
/**
* @plexus.component role="org.apache.archiva.audit.AuditManager"
*/
+@Service("auditManager#default")
public class DefaultAuditManager
implements AuditManager
{
import org.apache.archiva.metadata.repository.RepositorySessionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import javax.inject.Inject;
/**
- * @plexus.component role="org.apache.archiva.audit.AuditListener" role-hint="metadata"
+ * plexus.component role="org.apache.archiva.audit.AuditListener" role-hint="metadata"
*/
+@Service("uuditListener#metadata")
public class MetadataAuditListener
implements AuditListener
{
private static final Logger log = LoggerFactory.getLogger( MetadataAuditListener.class );
/**
- * @plexus.requirement
+ * plexus.requirement
*/
+ @Inject
private AuditManager auditManager;
/**
* FIXME: this could be multiple implementations and needs to be configured. It also starts a separate session to
* the originator of the audit event that we may rather want to pass through.
*
- * @plexus.requirement
+ * plexus.requirement
*/
+ @Inject
private RepositorySessionFactory repositorySessionFactory;
public void auditEvent( AuditEvent event )
implements RepositorySessionFactory
{
/**
- * @plexus.requirement role="org.apache.archiva.metadata.model.MetadataFacetFactory"
+ * plexus.requirement role="org.apache.archiva.metadata.model.MetadataFacetFactory"
*/
private Map<String, MetadataFacetFactory> metadataFacetFactories;