request.setRequestPath( uid.getPath() ); request.setRequestPath( storedPath );
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() ); } }
gavRequest.setRequestPath( parentCollUid.getPath() );
public void deleteArtifact( ArtifactStoreRequest gavRequest, boolean withChecksums, boolean withAllSubordinates, boolean deleteWholeGav ) throws UnsupportedStorageOperationException, IllegalOperationException, ItemNotFoundException, StorageException, AccessDeniedException { // delete the artifact 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 ) ); handleDelete( gavRequest, deleteWholeGav, withChecksums, withAllSubordinates ); }
request.setRequestPath( pomPath );
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 ); }
gavRequest.setRequestPath( parentCollUid.getPath() );
request.setRequestPath( pomPath );
public void deleteArtifactPom( ArtifactStoreRequest gavRequest, boolean withChecksums, boolean withAllSubordinates, boolean deleteWholeGav ) throws UnsupportedStorageOperationException, IllegalOperationException, ItemNotFoundException, StorageException, AccessDeniedException { // This is just so we can get teh gavToPath functionallity, to give us a path to work with 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 ) ); /* * // First undeploy, we will read the pom contents to build the gav try { gav = new Gav( * gavRequest.getGroupId(), gavRequest.getArtifactId(), gavRequest.getVersion(), gavRequest.getClassifier(), * getPackagingFromPom( gavRequest.getRequestPath() ), null, null, null, RepositoryPolicy.SNAPSHOT.equals( * repository.getRepositoryPolicy() ), false, null, false, null ); } catch ( IOException e ) { throw new * StorageException( "Could not read pom file!", e ); } catch ( XmlPullParserException e ) { throw new * StorageException( "Could not read pom file!", e ); } gavRequest.setRequestPath( * repository.getGavCalculator().gavToPath( gav ) ); // delete the pom's artifact handleDelete( gavRequest, * deleteWholeGav, withChecksums, withAllSubordinates ); // Now delete the pom gav = new Gav( * gavRequest.getGroupId(), gavRequest.getArtifactId(), gavRequest.getVersion(), gavRequest .getClassifier(), * "pom", null, null, null, RepositoryPolicy.SNAPSHOT.equals( repository .getRepositoryPolicy() ), false, null, * false, null ); gavRequest.setRequestPath( repository.getGavCalculator().gavToPath( gav ) ); */ handleDelete( gavRequest, deleteWholeGav, withChecksums, withAllSubordinates ); }
gavRequest.setRequestPath( repository.getGavCalculator().gavToPath( pomGav ) ); gavRequest.setRequestPath( repository.getGavCalculator().gavToPath( pomGav ) ); gavRequest.getClassifier(), gavRequest.getExtension(), null, null, null, false, null, false, null ); gavRequest.setRequestPath( repository.getGavCalculator().gavToPath( artifactGav ) );
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 ); } }