Skip to content

Extract CreateProjectCommand and prepare to move to remote api #1179

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

Merged
merged 3 commits into from
Jul 25, 2022

Conversation

labkey-adam
Copy link
Contributor

@labkey-adam labkey-adam commented Jul 23, 2022

Rationale

Improve the usability of this command. We'll move it into labkey-client-api once the library supports Java 17.

Related Pull Requests

Changes

  • Extract a named class and use setters instead of String-based maps, like a real API

@labkey-tchad
Copy link
Member

How would this CreateProjectCommand relate to the existing CreateContainerCommand in labkey-client-api? Seems kind of redundant.

@labkey-adam
Copy link
Contributor Author

There's overlap, but, for better or worse, these commands invoke different server-side actions. CoreController.CreateContainerAction is a true API action that doesn't support creating folders from a template. AdminController.CreateProjectAction extends CreateFolderAction, the FormViewAction that powers the create folder wizard. It supports templates (because the base class does) and the special "Project Creator" role that allows a site administrator to create a project and assign themselves project admin. CreateProjectCommand is interesting only if it's going to be used by non-site admins that have been assigned the special role.

@labkey-adam labkey-adam requested a review from labkey-tchad July 25, 2022 20:54
@labkey-adam labkey-adam merged commit 614973b into develop Jul 25, 2022
@labkey-adam labkey-adam deleted the fb_create_project_command branch July 25, 2022 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants