public StorageFileItem retrieveArtifact( ArtifactStoreRequest gavRequest ) throws IllegalOperationException, ItemNotFoundException, StorageException, AccessDeniedException { checkRequest( gavRequest ); Gav gav = resolveArtifact( gavRequest ); gavRequest.setRequestPath( repository.getGavCalculator().gavToPath( gav ) ); StorageItem item = repository.retrieveItem( gavRequest ); if ( StorageFileItem.class.isAssignableFrom( item.getClass() ) ) { return (StorageFileItem) item; } else { throw new LocalStorageException( "The Artifact retrieval returned non-file, path:" + item.getRepositoryItemUid().toString() ); } }
public ArtifactStoreHelper getArtifactStoreHelper() { if ( artifactStoreHelper == null ) { artifactStoreHelper = new ArtifactStoreHelper( this ); } return artifactStoreHelper; }
final Gav resolvedGav = helper.resolveArtifact(gavRequest); resolvedFile = helper.retrieveArtifact(gavRequest);
helper.storeArtifactPom( gavRequest, is, null ); helper.storeArtifact( gavRequest, is, null ); helper.storeArtifactWithGeneratedPom( gavRequest, packaging, is, null );
public StorageFileItem retrieveArtifactPom( ArtifactStoreRequest gavRequest ) throws IllegalOperationException, ItemNotFoundException, StorageException, AccessDeniedException { Gav pomGav = new Gav( gavRequest.getGav().getGroupId(), gavRequest.getGav().getArtifactId(), gavRequest.getGav().getVersion(), null, // gavRequest.getGav().getClassifier(), "pom", // gavRequest.getGav().getExtension(), gavRequest.getGav().getSnapshotBuildNumber(), gavRequest.getGav().getSnapshotTimeStamp(), gavRequest.getGav().getName(), gavRequest.getGav().isHash(), gavRequest.getGav().getHashType(), gavRequest.getGav().isSignature(), gavRequest.getGav().getSignatureType() ); ArtifactStoreRequest pomRequest = new ArtifactStoreRequest( gavRequest.getMavenRepository(), pomGav, gavRequest.isRequestLocalOnly(), gavRequest.isRequestRemoteOnly() ); return retrieveArtifact( pomRequest ); }
StorageFileItem file = helper.retrieveArtifactPom( gavRequest );
deleteWholeGav( gavRequest ); deleteAllSubordinates( gavRequest );
public Gav resolveArtifact( ArtifactStoreRequest gavRequest ) throws IllegalOperationException, ItemNotFoundException, StorageException, AccessDeniedException { checkRequest( gavRequest ); try { Gav gav = repository.getMetadataManager().resolveArtifact( gavRequest ); if ( gav == null ) { throw new ItemNotFoundException( gavRequest, repository ); } return gav; } catch ( IOException e ) { throw new LocalStorageException( "Could not maintain metadata!", e ); } }
Gav resolvedGav = helper.resolveArtifact( gavRequest ); resolvedFile = helper.retrieveArtifact( gavRequest );
helper.storeArtifactPom(gavRequest, is, null); isPom = false; helper.storeArtifact(gavRequest, is, null); helper.storeArtifactWithGeneratedPom(gavRequest, uploadContext.getPackaging(), is, null);
StorageFileItem file = helper.retrieveArtifact(gavRequest);
StorageFileItem file = helper.retrieveArtifactPom(gavRequest);
public void storeArtifact( ArtifactStoreRequest gavRequest, InputStream is, Map<String, String> attributes ) throws UnsupportedStorageOperationException, IllegalOperationException, ItemNotFoundException, StorageException, AccessDeniedException { checkRequest( gavRequest ); Gav gav = new Gav( gavRequest.getGroupId(), gavRequest.getArtifactId(), gavRequest.getVersion(), gavRequest.getClassifier(), gavRequest.getExtension(), null, null, null, false, null, false, null ); gavRequest.setRequestPath( repository.getGavCalculator().gavToPath( gav ) ); repository.storeItemWithChecksums( gavRequest, is, attributes ); }
StorageFileItem file = helper.retrieveArtifact( gavRequest );
public void storeArtifactPom( ArtifactStoreRequest gavRequest, InputStream is, Map<String, String> attributes ) throws UnsupportedStorageOperationException, IllegalOperationException, ItemNotFoundException, StorageException, AccessDeniedException { checkRequest( gavRequest ); Gav gav = new Gav( gavRequest.getGroupId(), gavRequest.getArtifactId(), gavRequest.getVersion(), gavRequest.getClassifier(), "pom", null, null, null, false, null, false, null ); gavRequest.setRequestPath( repository.getGavCalculator().gavToPath( gav ) ); repository.storeItemWithChecksums( gavRequest, is, attributes ); try { repository.getMetadataManager().deployArtifact( gavRequest ); } catch ( IOException e ) { throw new LocalStorageException( "Could not maintain metadata!", e ); } }
public ArtifactStoreHelper getArtifactStoreHelper() { if ( artifactStoreHelper == null ) { artifactStoreHelper = new ArtifactStoreHelper( this ); } return artifactStoreHelper; }
StorageException, AccessDeniedException checkRequest( gavRequest );
@Override public ArtifactStoreHelper getArtifactStoreHelper() { if ( artifactStoreHelper == null ) { artifactStoreHelper = new ArtifactStoreHelper( this ); } return artifactStoreHelper; }