Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a generic end-point for deleting repository paths in the StoragesConfigurationController #1401

Open
6 tasks
carlspring opened this issue Jul 28, 2019 · 6 comments · May be fixed by #1592
Open
6 tasks

Comments

@carlspring
Copy link
Member

carlspring commented Jul 28, 2019

Task Description

We need to create end-points for moving repository paths. The code should be located in the StoragesConfigurationController class and a separate form class should be created so that it is able to handle the JSON below. Be sure to check our How to write Spring Controllers guide to see how we return errors. There is some partial implementation of this in the MavenArtifactController which could be useful to speed-up the development of this feature. The existing implementation should be refactored as much as possible and made generic enough that it works for all layout providers.

Deleting a path in a storage/repository

Action:

Deletes recursively the content of path located under the defined storageId and repositoryId.

Form validation:

  1. All fields are required.
DELETE /api/configuration/strongbox/storages/delete

{
   'storageId': 'storage0',
   'repositoryId': 'some-repository-id',
   'path': 'path/relative/to/the/a/directory/or/file',
   'force': true/false
}

The force field is used to determine if we should delete the files on the filesystem as well or not.
Use the BaseController#getSuccessfulResponseEntity and BaseController#getFailedResponseEntity (or if necessary BaseController#getBadRequestResponseEntity) to return the appropriate responses.

Tasks

The following tasks will need to be carried out:

  • Implement end-point for deleting paths
  • Add test cases checking the above for the following layout providers:
    • Maven
    • NuGet
    • Raw
    • PyPi

Task Relationships

This task relates to: #1399, #1400

Help

@ptirador
Copy link
Contributor

ptirador commented Aug 25, 2019

Hi, if @adithyaChander is not working on this, can I pick this up?
cc @carlspring @steve-todorov

@mans4321
Copy link

Can I work on this?

@carlspring
Copy link
Member Author

Go for it! :)

mans4321 added a commit to mans4321/strongbox that referenced this issue Nov 12, 2019
mans4321 added a commit to mans4321/strongbox that referenced this issue Nov 12, 2019
mans4321 added a commit to mans4321/strongbox that referenced this issue Nov 20, 2019
mans4321 added a commit to mans4321/strongbox that referenced this issue Nov 25, 2019
mans4321 added a commit to mans4321/strongbox that referenced this issue Dec 7, 2019
@atul46
Copy link

atul46 commented Jan 14, 2020

is this issue still open?

@dreameral
Copy link

Can I work on this?

@carlspring
Copy link
Member Author

@dreameral : This task is on hold. Perhaps you could look for another one? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment