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

Tools module functionality #2389

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Tools module functionality #2389

wants to merge 14 commits into from

Conversation

alex-odysseus
Copy link
Contributor

Addressing #2330

  • CRUD operations implemented
  • a separate Permission Schema has been created

@Column(name = "description")
private String description;
@Column(name = "is_enabled")
private Boolean isEnabled;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The property name should be renamed to 'enabled'

import org.ohdsi.webapi.tool.dto.ToolDTO;
import org.springframework.stereotype.Controller;

import javax.ws.rs.*;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imports with * should be eliminated

import java.util.Optional;

@Component
public class ToolConvertor extends AbstractDaoService {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need a separate class, to be moved to ToolServiceImpl

return tool;
}

private void setCreationDetails(Tool tool, Instant currentInstant) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need two separate methods

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose of this class is unclear SimpleDateFormat usage should be sufficient

@@ -0,0 +1,18 @@
CREATE TABLE IF NOT EXISTS ${ohdsiSchema}.tool (
Copy link
Contributor Author

@alex-odysseus alex-odysseus Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can combine all migration scripts into one if necessary

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer if you did this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition, please mark these migrations attached to V2.15

@Component
public class ToolPermissionSchema extends EntityPermissionSchema {
private static Map<String, String> writePermissions = new HashMap<String, String>() {{
put("tool:%s:delete", "Delete Tool with id = %s");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid that the notation doesn't coincide with what is inserted by the migration scripts

@anthonysena anthonysena linked an issue Sep 3, 2024 that may be closed by this pull request
@chrisknoll
Copy link
Collaborator

Hello Everyone. Once the migration scripts are combined and the changes @alex-odysseus requests have been implemented, I can pull down the branches to check the functionality.

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.

Tools module
3 participants