Skip to content

feat:filtering shells based on timestamp #506

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

Draft
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

shijinrajbosch
Copy link
Contributor

@shijinrajbosch shijinrajbosch commented Mar 27, 2025

This pull request includes changes to add timestamp-based filtering for shells and updates across multiple files to support this new feature. The most important changes include modifications to the AssetAdministrationShellApiDelegate, ShellMapper, ShellAccessHandler, and ShellService classes.

Timestamp-based filtering:

Code updates for timestamp handling:

Specification updates:

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

@agg3fe agg3fe self-requested a review March 27, 2025 10:09
Copy link
Contributor

@agg3fe agg3fe left a comment

Choose a reason for hiding this comment

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

DO NOT MERGE..!

@shijinrajbosch shijinrajbosch marked this pull request as draft March 27, 2025 10:13
@shijinrajbosch shijinrajbosch self-assigned this Mar 27, 2025
shellRepository.getCreatedDateByIdExternal( cursorValue ).orElse( MINIMUM_SQL_DATETIME ) :
// If cursor is not available, use createdAfter date or fetch from repository
Optional.ofNullable( createdAfter ).map( OffsetDateTime::toInstant )
.orElseGet( () -> shellRepository.getCreatedDateByIdExternal( cursorValue ).orElse( MINIMUM_SQL_DATETIME ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

same here?

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 getCreatedDate() method will revert to the existing logic if the createdAfter parameter is null. This behavior aligns with the implementation that was in place prior to this change.

The getShellSearchCursor() method includes a fallback mechanism: if no cursor is provided (i.e., nextPageCursor is null or empty), it returns a default timestamp set to five years before the current date and time. This ensures that the search begins from a sufficiently early point when no cursor is available.

Copy link

@thomas-henn thomas-henn left a comment

Choose a reason for hiding this comment

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

Please see comments below and change the file on this review.
BR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants