Package org.apache.archiva.metadata.repository

Examples of org.apache.archiva.metadata.repository.RepositorySession.save()


            throw new ArchivaRestServiceException( "RepositoryAdmin exception: " + e.getMessage(), 500, e );
        }
        finally
        {

            repositorySession.save();

            repositorySession.close();
        }
        return Boolean.TRUE;
    }
View Full Code Here


        {
            MetadataRepository metadataRepository = repositorySession.getRepository();

            metadataRepository.updateProjectVersion( repositoryId, groupId, artifactId, projectVersionMetadata );

            repositorySession.save();
        }
        catch ( MetadataRepositoryException e )
        {
            log.error( e.getMessage(), e );
            throw new ArchivaRestServiceException( e.getMessage(),
View Full Code Here

        {
            MetadataRepository metadataRepository = repositorySession.getRepository();

            metadataRepository.updateProjectVersion( repositoryId, groupId, artifactId, projectVersionMetadata );

            repositorySession.save();
        }
        catch ( MetadataRepositoryException e )
        {
            log.error( e.getMessage(), e );
            throw new ArchivaRestServiceException( e.getMessage(),
View Full Code Here

            {
                MetadataRepository metadataRepository = repositorySession.getRepository();
                metadataRepository.removeRepository( repository.getId() );
                log.debug( "call repositoryStatisticsManager.deleteStatistics" );
                getRepositoryStatisticsManager().deleteStatistics( metadataRepository, repository.getId() );
                repositorySession.save();
            }
            catch ( MetadataRepositoryException e )
            {
                //throw new RepositoryAdminException( e.getMessage(), e );
                log.warn( "skip error during removing repository from MetadatRepository:{}", e.getMessage(), e );
View Full Code Here

            if ( resetStats )
            {
                log.debug( "call repositoryStatisticsManager.deleteStatistics" );
                getRepositoryStatisticsManager().deleteStatistics( repositorySession.getRepository(),
                                                                   managedRepositoryConfiguration.getId() );
                repositorySession.save();
            }

        }
        catch ( MetadataRepositoryException e )
        {
View Full Code Here

                    repositoryStatisticsManager.addStatisticsAfterScan( metadataRepository, repoId,
                                                                        stats.getWhenGathered(), endTime,
                                                                        stats.getTotalFileCount(),
                                                                        stats.getTotalFileCount() - previousFileCount );
                    repositorySession.save();
                }
                catch ( MetadataRepositoryException e )
                {
                    throw new TaskExecutionException( "Unable to store updated statistics: " + e.getMessage(), e );
                }
View Full Code Here

        {
            RepositorySession repositorySession = repositorySessionFactory.createSession();
            try
            {
                auditManager.addAuditEvent( repositorySession.getRepository(), event );
                repositorySession.save();
            }
            catch ( MetadataRepositoryException e )
            {
                log.warn( "Unable to write audit event to repository: {}", e.getMessage(), e );
            }
View Full Code Here

            genericMetadata.put( propertyName, propertyValue );

            try
            {
                updateProjectMetadata( projectMetadata, metadataRepository );
                repositorySession.save();
            }
            catch ( MetadataRepositoryException e )
            {
                log.warn( "Unable to persist modified project metadata after adding entry: " + e.getMessage(), e );
                addActionError(
View Full Code Here

                    genericMetadata.remove( deleteItem );

                    try
                    {
                        updateProjectMetadata( projectMetadata, metadataRepository );
                        repositorySession.save();
                    }
                    catch ( MetadataRepositoryException e )
                    {
                        log.warn( "Unable to persist modified project metadata after removing entry: " + e.getMessage(),
                                  e );
View Full Code Here

                    }

                    triggerAuditEvent( repositoryId, path, AuditEvent.REMOVE_FILE );
                }
            }
            repositorySession.save();
        }
        catch ( ContentNotFoundException e )
        {
            addActionError( "Artifact does not exist: " + e.getMessage() );
            return ERROR;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.