private String fieldName;
- public ArchivaRestServiceException( String message )
+ public ArchivaRestServiceException( String message, Throwable t )
{
- super( message );
+ super( message, t );
}
- public ArchivaRestServiceException( String message, String fieldName )
+ public ArchivaRestServiceException( String message, String fieldName, Throwable t )
{
- this( message );
+ this( message, t );
this.fieldName = fieldName;
}
- public ArchivaRestServiceException( String s, int httpErrorCode )
+ public ArchivaRestServiceException( String s, int httpErrorCode, Throwable t )
{
- super( s );
+ super( s, t );
this.httpErrorCode = httpErrorCode;
}
- public ArchivaRestServiceException( String s, int httpErrorCode, String fieldName )
+ public ArchivaRestServiceException( String s, int httpErrorCode, String fieldName, Throwable t )
{
- this( s, httpErrorCode );
+ this( s, httpErrorCode, t );
this.fieldName = fieldName;
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
{
throw new ArchivaRestServiceException(
"artifact path reference '" + legacyArtifactPath.getPath() + "' does not match the initial path: '"
- + path + "'", Response.Status.BAD_REQUEST.getStatusCode() );
+ + path + "'", Response.Status.BAD_REQUEST.getStatusCode(), null );
}
try
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( MetadataResolutionException e )
{
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
finally
{
catch ( MetadataResolutionException e )
{
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
finally
{
catch ( MetadataResolutionException e )
{
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
}
catch ( MetadataResolutionException e )
{
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
finally
{
catch ( DependencyTreeBuilderException e )
{
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
return treeEntries;
}
catch ( ArchivaSecurityException e )
{
throw new ArchivaRestServiceException( "repositories.read.observable.error",
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
}
catch ( MetadataResolutionException e )
{
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
finally
{
{
log.error( e.getMessage(), e );
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
finally
{
{
log.error( e.getMessage(), e );
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
finally
{
{
log.error( e.getMessage(), e );
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
catch ( RepositoryNotFoundException e )
{
log.error( e.getMessage(), e );
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
catch ( RepositoryException e )
{
log.error( e.getMessage(), e );
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
return Collections.emptyList();
}
if ( !selectedRepos.contains( repositoryId ) )
{
throw new ArchivaRestServiceException( "browse.root.groups.repositoy.denied",
- Response.Status.FORBIDDEN.getStatusCode() );
+ Response.Status.FORBIDDEN.getStatusCode(), null );
}
selectedRepos = Collections.singletonList( repositoryId );
}
return selectedRepos;
}
- private List<String> getSortedList( Set<String> set )
- {
- List<String> list = new ArrayList<String>( set );
- Collections.sort( list );
- return list;
- }
private String collapseNamespaces( RepositorySession repositorySession, MetadataResolver metadataResolver,
Collection<String> repoIds, String n )
* under the License.
*/
+import org.apache.archiva.redback.components.scheduler.CronExpressionValidator;
+import org.apache.archiva.redback.rest.api.services.RedbackServiceException;
+import org.apache.archiva.redback.rest.api.services.UtilServices;
import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
import org.apache.archiva.rest.api.services.CommonServices;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
-import org.apache.archiva.redback.components.scheduler.CronExpressionValidator;
-import org.apache.archiva.redback.rest.api.services.RedbackServiceException;
-import org.apache.archiva.redback.rest.api.services.UtilServices;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
catch ( IOException e )
{
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
catch ( RedbackServiceException e )
{
- throw new ArchivaRestServiceException( e.getMessage(), e.getHttpErrorCode() );
+ throw new ArchivaRestServiceException( e.getMessage(), e.getHttpErrorCode(), e );
}
}
catch ( IOException e )
{
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
finally
{
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
catch ( RepositoryAdminException e )
{
log.error( e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage(), e.getFieldName() );
+ throw new ArchivaRestServiceException( e.getMessage(), e.getFieldName(), e );
}
}
{
return getManagedRepository( managedRepository.getId() );
}
- throw new ArchivaRestServiceException( "fail to created managed Repository" );
+ throw new ArchivaRestServiceException( "fail to created managed Repository", null );
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage(), e.getFieldName() );
+ throw new ArchivaRestServiceException( e.getMessage(), e.getFieldName(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage(), e.getFieldName() );
+ throw new ArchivaRestServiceException( e.getMessage(), e.getFieldName(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
{
throw new ArchivaRestServiceException(
"proxyConnector with sourceRepoId:" + sourceRepoId + " and targetRepoId:" + targetRepoId
- + " not exists" );
+ + " not exists", null );
}
return deleteProxyConnector( proxyConnector );
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
import org.apache.archiva.model.ArchivaRepositoryMetadata;
import org.apache.archiva.model.ArtifactReference;
import org.apache.archiva.model.VersionedReference;
+import org.apache.archiva.redback.authentication.AuthenticationResult;
+import org.apache.archiva.redback.authorization.AuthorizationException;
+import org.apache.archiva.redback.components.taskqueue.TaskQueueException;
+import org.apache.archiva.redback.system.DefaultSecuritySession;
+import org.apache.archiva.redback.system.SecuritySession;
+import org.apache.archiva.redback.system.SecuritySystem;
import org.apache.archiva.redback.users.User;
import org.apache.archiva.redback.users.UserNotFoundException;
import org.apache.archiva.repository.ContentNotFoundException;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.index.context.IndexingContext;
-import org.apache.archiva.redback.authentication.AuthenticationResult;
-import org.apache.archiva.redback.authorization.AuthorizationException;
-import org.apache.archiva.redback.system.DefaultSecuritySession;
-import org.apache.archiva.redback.system.SecuritySession;
-import org.apache.archiva.redback.system.SecuritySystem;
-import org.apache.archiva.redback.components.taskqueue.TaskQueueException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
catch ( Exception e )
{
log.error( e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
catch ( DownloadRemoteIndexException e )
{
log.error( e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
return Boolean.TRUE;
}
String userName = getAuditInformation().getUser().getUsername();
if ( StringUtils.isBlank( userName ) )
{
- throw new ArchivaRestServiceException( "copyArtifact call: userName not found" );
+ throw new ArchivaRestServiceException( "copyArtifact call: userName not found", null );
}
if ( StringUtils.isBlank( artifactTransferRequest.getRepositoryId() ) )
{
- throw new ArchivaRestServiceException( "copyArtifact call: sourceRepositoryId cannot be null" );
+ throw new ArchivaRestServiceException( "copyArtifact call: sourceRepositoryId cannot be null", null );
}
if ( StringUtils.isBlank( artifactTransferRequest.getTargetRepositoryId() ) )
{
- throw new ArchivaRestServiceException( "copyArtifact call: targetRepositoryId cannot be null" );
+ throw new ArchivaRestServiceException( "copyArtifact call: targetRepositoryId cannot be null", null );
}
ManagedRepository source = null;
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
if ( source == null )
{
throw new ArchivaRestServiceException(
- "cannot find repository with id " + artifactTransferRequest.getRepositoryId() );
+ "cannot find repository with id " + artifactTransferRequest.getRepositoryId(), null );
}
ManagedRepository target = null;
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
if ( target == null )
{
throw new ArchivaRestServiceException(
- "cannot find repository with id " + artifactTransferRequest.getTargetRepositoryId() );
+ "cannot find repository with id " + artifactTransferRequest.getTargetRepositoryId(), null );
}
if ( StringUtils.isBlank( artifactTransferRequest.getGroupId() ) )
{
- throw new ArchivaRestServiceException( "groupId is mandatory" );
+ throw new ArchivaRestServiceException( "groupId is mandatory", null );
}
if ( StringUtils.isBlank( artifactTransferRequest.getArtifactId() ) )
{
- throw new ArchivaRestServiceException( "artifactId is mandatory" );
+ throw new ArchivaRestServiceException( "artifactId is mandatory", null );
}
if ( StringUtils.isBlank( artifactTransferRequest.getVersion() ) )
{
- throw new ArchivaRestServiceException( "version is mandatory" );
+ throw new ArchivaRestServiceException( "version is mandatory", null );
}
if ( VersionUtil.isSnapshot( artifactTransferRequest.getVersion() ) )
{
- throw new ArchivaRestServiceException( "copy of SNAPSHOT not supported" );
+ throw new ArchivaRestServiceException( "copy of SNAPSHOT not supported", null );
}
// end check parameters
}
catch ( UserNotFoundException e )
{
- throw new ArchivaRestServiceException( "user " + userName + " not found" );
+ throw new ArchivaRestServiceException( "user " + userName + " not found", null );
}
// check karma on source : read
if ( !authz )
{
throw new ArchivaRestServiceException(
- "not authorized to access repo:" + artifactTransferRequest.getRepositoryId() );
+ "not authorized to access repo:" + artifactTransferRequest.getRepositoryId(), null );
}
}
catch ( AuthorizationException e )
{
log.error( "error reading permission: " + e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
// check karma on target: write
if ( !authz )
{
throw new ArchivaRestServiceException(
- "not authorized to write to repo:" + artifactTransferRequest.getTargetRepositoryId() );
+ "not authorized to write to repo:" + artifactTransferRequest.getTargetRepositoryId(), null );
}
}
catch ( AuthorizationException e )
{
log.error( "error reading permission: " + e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
// sounds good we can continue !
if ( StringUtils.isEmpty( artifactSourcePath ) )
{
log.error( "cannot find artifact " + artifactTransferRequest.toString() );
- throw new ArchivaRestServiceException( "cannot find artifact " + artifactTransferRequest.toString() );
+ throw new ArchivaRestServiceException( "cannot find artifact " + artifactTransferRequest.toString(),
+ null );
}
File artifactFile = new File( source.getLocation(), artifactSourcePath );
if ( !artifactFile.exists() )
{
log.error( "cannot find artifact " + artifactTransferRequest.toString() );
- throw new ArchivaRestServiceException( "cannot find artifact " + artifactTransferRequest.toString() );
+ throw new ArchivaRestServiceException( "cannot find artifact " + artifactTransferRequest.toString(),
+ null );
}
ManagedRepositoryContent targetRepository =
{
throw new ArchivaRestServiceException(
"artifact already exists in target repo: " + artifactTransferRequest.getTargetRepositoryId()
- + " and redeployment blocked" );
+ + " and redeployment blocked", null );
}
else
{
catch ( RepositoryException e )
{
log.error( "RepositoryException: " + e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
catch ( RepositoryAdminException e )
{
log.error( "RepositoryAdminException: " + e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
catch ( IOException e )
{
log.error( "IOException: " + e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
return true;
}
if ( StringUtils.isEmpty( repositoryId ) )
{
- throw new ArchivaRestServiceException( "repositoryId cannot be null", 400 );
+ throw new ArchivaRestServiceException( "repositoryId cannot be null", 400, null );
}
if ( !isAuthorizedToDeleteArtifacts( repositoryId ) )
{
- throw new ArchivaRestServiceException( "not authorized to delete artifacts", 403 );
+ throw new ArchivaRestServiceException( "not authorized to delete artifacts", 403, null );
}
if ( artifact == null )
{
- throw new ArchivaRestServiceException( "artifact cannot be null", 400 );
+ throw new ArchivaRestServiceException( "artifact cannot be null", 400, null );
}
if ( StringUtils.isEmpty( artifact.getGroupId() ) )
{
- throw new ArchivaRestServiceException( "artifact.groupId cannot be null", 400 );
+ throw new ArchivaRestServiceException( "artifact.groupId cannot be null", 400, null );
}
if ( StringUtils.isEmpty( artifact.getArtifactId() ) )
{
- throw new ArchivaRestServiceException( "artifact.artifactId cannot be null", 400 );
+ throw new ArchivaRestServiceException( "artifact.artifactId cannot be null", 400, null );
}
// TODO more control on artifact fields
if ( StringUtils.isBlank( artifact.getPackaging() ) )
{
throw new ArchivaRestServiceException( "You must configure a type/packaging when using classifier",
- 400 );
+ 400, null );
}
ArtifactReference artifactReference = new ArtifactReference();
artifactReference.setArtifactId( artifact.getArtifactId() );
catch ( ContentNotFoundException e )
{
- throw new ArchivaRestServiceException( "Artifact does not exist: " + e.getMessage(), 400 );
+ throw new ArchivaRestServiceException( "Artifact does not exist: " + e.getMessage(), 400, e );
}
catch ( RepositoryNotFoundException e )
{
- throw new ArchivaRestServiceException( "Target repository cannot be found: " + e.getMessage(), 400 );
+ throw new ArchivaRestServiceException( "Target repository cannot be found: " + e.getMessage(), 400, e );
}
catch ( RepositoryException e )
{
- throw new ArchivaRestServiceException( "Repository exception: " + e.getMessage(), 500 );
+ throw new ArchivaRestServiceException( "Repository exception: " + e.getMessage(), 500, e );
}
catch ( MetadataResolutionException e )
{
- throw new ArchivaRestServiceException( "Repository exception: " + e.getMessage(), 500 );
+ throw new ArchivaRestServiceException( "Repository exception: " + e.getMessage(), 500, e );
}
catch ( MetadataRepositoryException e )
{
- throw new ArchivaRestServiceException( "Repository exception: " + e.getMessage(), 500 );
+ throw new ArchivaRestServiceException( "Repository exception: " + e.getMessage(), 500, e );
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( "RepositoryAdmin exception: " + e.getMessage(), 500 );
+ throw new ArchivaRestServiceException( "RepositoryAdmin exception: " + e.getMessage(), 500, e );
}
finally
catch ( ArchivaSecurityException e )
{
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
}
catch ( RepositoryScannerException e )
{
log.error( e.getMessage(), e );
- throw new ArchivaRestServiceException( "RepositoryScannerException exception: " + e.getMessage(), 500 );
+ throw new ArchivaRestServiceException( "RepositoryScannerException exception: " + e.getMessage(), 500, e );
}
catch ( RepositoryAdminException e )
{
log.error( e.getMessage(), e );
- throw new ArchivaRestServiceException( "RepositoryScannerException exception: " + e.getMessage(), 500 );
+ throw new ArchivaRestServiceException( "RepositoryScannerException exception: " + e.getMessage(), 500, e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositoryAdminException e )
{
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
}
catch ( RepositorySearchException e )
{
log.error( e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
catch ( RepositorySearchException e )
{
log.error( e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
catch ( RepositorySearchException e )
{
log.error( e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
catch ( RepositorySearchException e )
{
log.error( e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
catch ( RepositorySearchException e )
{
log.error( e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage() );
+ throw new ArchivaRestServiceException( e.getMessage(), e );
}
}
*/
import org.apache.archiva.redback.components.cache.Cache;
+import org.apache.archiva.redback.components.cache.CacheStatistics;
+import org.apache.archiva.redback.components.taskqueue.TaskQueue;
+import org.apache.archiva.redback.components.taskqueue.TaskQueueException;
import org.apache.archiva.repository.scanner.RepositoryScanner;
import org.apache.archiva.repository.scanner.RepositoryScannerInstance;
import org.apache.archiva.rest.api.model.CacheEntry;
import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
import org.apache.archiva.rest.api.services.SystemStatusService;
import org.apache.archiva.rest.services.utils.ConsumerScanningStatisticsComparator;
-import org.apache.archiva.redback.components.cache.CacheStatistics;
-import org.apache.archiva.redback.components.taskqueue.TaskQueue;
-import org.apache.archiva.redback.components.taskqueue.TaskQueueException;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
{
log.error( e.getMessage(), e );
throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode() );
+ Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
}
if ( cache == null )
{
throw new ArchivaRestServiceException( "no cache for key: " + cacheKey,
- Response.Status.BAD_REQUEST.getStatusCode() );
+ Response.Status.BAD_REQUEST.getStatusCode(), null );
}
cache.clear();