mirror of https://github.com/apache/archiva.git
[MRM-1664] Validation error message not visible to user when adding Remote Repository.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1384840 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e51fb8b970
commit
82b12feae9
|
@ -53,13 +53,15 @@ public class DefaultRemoteRepositoriesService
|
|||
}
|
||||
catch ( RepositoryAdminException e )
|
||||
{
|
||||
throw new ArchivaRestServiceException( e.getMessage(), e );
|
||||
log.error( e.getMessage(), e );
|
||||
throw new ArchivaRestServiceException( e.getMessage(), e.getFieldName(), e );
|
||||
}
|
||||
}
|
||||
|
||||
public RemoteRepository getRemoteRepository( String repositoryId )
|
||||
throws ArchivaRestServiceException
|
||||
{
|
||||
|
||||
List<RemoteRepository> remoteRepositories = getRemoteRepositories();
|
||||
for ( RemoteRepository repository : remoteRepositories )
|
||||
{
|
||||
|
@ -73,21 +75,45 @@ public class DefaultRemoteRepositoriesService
|
|||
|
||||
public Boolean deleteRemoteRepository( String repositoryId )
|
||||
throws Exception
|
||||
{
|
||||
try
|
||||
{
|
||||
return remoteRepositoryAdmin.deleteRemoteRepository( repositoryId, getAuditInformation() );
|
||||
}
|
||||
catch ( RepositoryAdminException e )
|
||||
{
|
||||
log.error( e.getMessage(), e );
|
||||
throw new ArchivaRestServiceException( e.getMessage(), e.getFieldName(), e );
|
||||
}
|
||||
}
|
||||
|
||||
public Boolean addRemoteRepository( RemoteRepository remoteRepository )
|
||||
throws Exception
|
||||
{
|
||||
try
|
||||
{
|
||||
return remoteRepositoryAdmin.addRemoteRepository( remoteRepository, getAuditInformation() );
|
||||
}
|
||||
catch ( RepositoryAdminException e )
|
||||
{
|
||||
log.error( e.getMessage(), e );
|
||||
throw new ArchivaRestServiceException( e.getMessage(), e.getFieldName(), e );
|
||||
}
|
||||
}
|
||||
|
||||
public Boolean updateRemoteRepository( RemoteRepository remoteRepository )
|
||||
throws Exception
|
||||
{
|
||||
try
|
||||
{
|
||||
return remoteRepositoryAdmin.updateRemoteRepository( remoteRepository, getAuditInformation() );
|
||||
}
|
||||
catch ( RepositoryAdminException e )
|
||||
{
|
||||
log.error( e.getMessage(), e );
|
||||
throw new ArchivaRestServiceException( e.getMessage(), e.getFieldName(), e );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue