Skip to content

V3 casl 657 hub module v3 migration#398

Merged
Amaneusz merged 9 commits intov3from
v3_CASL_657-hub-module-v3-migration
Jan 16, 2025
Merged

V3 casl 657 hub module v3 migration#398
Amaneusz merged 9 commits intov3from
v3_CASL_657-hub-module-v3-migration

Conversation

@Amaneusz
Copy link

No description provided.

@github-actions
Copy link

Code Coverage

Overall Project 31.02% -3.95% 🍏
Files changed 17.86% 🍏

Module Coverage
here-naksha-lib-view 82.9% 🍏
here-naksha-lib-handlers 36.6% -4.15% 🍏
here-naksha-lib-core 30.18% -1.75% 🍏
here-naksha-lib-hub 24.75% -38.8% 🍏
here-naksha-storage-http 13.08% -1.03% 🍏
Files
Module File Coverage
here-naksha-lib-view ViewReadSession.java 74.4% 🍏
here-naksha-lib-handlers ContextXyzFeatureResult.java 100% 🍏
IntHandlerForSpaces.java 96.23% 🍏
DefaultStorageHandlerProperties.java 89.66% -10.34% 🍏
IntHandlerForStorages.java 61.26% -1.2% 🍏
DefaultStorageHandler.java 56.26% -3.21% 🍏
TagFilterHandler.java 54.85% -1.94% 🍏
HandlerUtil.java 5.52% -1.53% 🍏
DefaultViewHandler.java 0% -2.62% 🍏
NakshaAdminCollection.java 0% 🍏
DefaultViewHandlerProperties.java 0% -62.5% 🍏
TagFilterHandlerProperties.java 0% -86.67% 🍏
MockValidationHandler.java 0% -7.39% 🍏
EndorsementHandler.java 0% -5.19% 🍏
MockContextLoaderHandler.java 0% -5.04% 🍏
EchoHandler.java 0% -10.77% 🍏
IntHandlerForEventHandlers.java 0% -3.66% 🍏
here-naksha-lib-core JsonSerializable.java 16.61% 🍏
SpaceProperties.java 0% -75% 🍏
Storage.java 0% -44.83% 🍏
Plugin.java 0% -71.43% 🍏
EventTarget.java 0% -63.33% 🍏
SubscriptionState.java 0% -71.43% 🍏
EventHandler.java 0% -49.54% 🍏
Space.java 0% -83.42% 🍏
Copyright.java 0% -69.23% 🍏
License.java 0% -90% 🍏
ConstraintAll.java 0% 🍏
ConstraintCheck.java 0% -34% 🍏
Index.java 0% 🍏
Constraint.java 0% 🍏
IndexProperty.java 0% -75.41% 🍏
ConstraintNot.java 0% 🍏
ConstraintOne.java 0% 🍏
here-naksha-lib-hub NHSpaceStorageWriter.java 57.82% -39.66% 🍏
NHSpaceStorageReader.java 55.37% -28.89% 🍏
NHSpaceStorage.java 54.37% -41.26% 🍏
NakshaHubConfig.java 4.73% 🍏
NakshaHub.java 0.53% -61.45% 🍏
NHAdminStorageReader.java 0% -84.44% 🍏
NHAdminStorage.java 0% -90.63% 🍏
NHAdminStorageWriter.java 0% -40% 🍏
here-naksha-storage-http HttpStorage.java 0% -3.16% 🍏
PrepareResult.java 0% -3.38% 🍏

try (final Result result = executeReadRequestFromSpaceStorage(rdRequest)) {
if (result instanceof SuccessResult) {
feature = ResultHelper.readFeatureFromResult(result, XyzFeature.class);
feature = ResultHelper.readFeatureFromResponse(result, XyzFeature.class);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should be using NakshaFeature.class everywhere instead right?

Copy link
Author

Choose a reason for hiding this comment

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

Good catch but no worries ;) This change was done because of refactoring the method name - I haven't worked on this module (app-service) yet.
You are right - this will have to be changed to NakshaFeature.class but this is not in the scope of this PR


object JvmBoxingUtil {
@JvmStatic
fun <T> box(raw: Any?, _clazz: Class<T>): T? =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh we already have this as JvmProxyUtil, let's keep one and delete the other

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nevermind, you deleted the other one 👍

return this;
}

public static class List extends JvmListProxy<Copyright> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this used for?

Copy link
Author

Choose a reason for hiding this comment

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

In Space we have field copyright for List<Copyright>. This is a type for that field.
In proxy world generics are tricky so what we do with boxing typees (maps, lists etc) is that we create a dedicated type for them - for example we have StringList which is basically List<String> that also follows Proxy pattern.
This is quite similar :) We also have NakshaFeatureList and so on.

/**
* The copyright information object.
*/
public class Copyright extends NakshaFeature {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have a JSON example of the copyright? I assume it won't have the "type": "Feature", so probably extending AnyObject is better

Copy link
Author

Choose a reason for hiding this comment

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

Yup, I changed this in a commit subsequent to this comment - now it extends AnyObject :)

Jakub Amanowicz added 9 commits January 16, 2025 10:17
Signed-off-by: Jakub Amanowicz <jakub.amanowicz@here.com>
Signed-off-by: Jakub Amanowicz <jakub.amanowicz@here.com>
Signed-off-by: Jakub Amanowicz <jakub.amanowicz@here.com>
Signed-off-by: Jakub Amanowicz <jakub.amanowicz@here.com>
Signed-off-by: Jakub Amanowicz <jakub.amanowicz@here.com>
Signed-off-by: Jakub Amanowicz <jakub.amanowicz@here.com>
Signed-off-by: Jakub Amanowicz <jakub.amanowicz@here.com>
Signed-off-by: Jakub Amanowicz <jakub.amanowicz@here.com>
Signed-off-by: Jakub Amanowicz <jakub.amanowicz@here.com>
@Amaneusz Amaneusz force-pushed the v3_CASL_657-hub-module-v3-migration branch from d78ce33 to f215161 Compare January 16, 2025 09:17
@github-actions
Copy link

Code Coverage

Overall Project 31.02% -3.95% 🍏
Files changed 17.86% 🍏

Module Coverage
here-naksha-lib-view 82.9% 🍏
here-naksha-lib-handlers 36.6% -4.15% 🍏
here-naksha-lib-core 30.18% -1.75% 🍏
here-naksha-lib-hub 24.75% -38.8% 🍏
here-naksha-storage-http 13.08% -1.03% 🍏
Files
Module File Coverage
here-naksha-lib-view ViewReadSession.java 74.4% 🍏
here-naksha-lib-handlers ContextXyzFeatureResult.java 100% 🍏
IntHandlerForSpaces.java 96.23% 🍏
DefaultStorageHandlerProperties.java 89.66% -10.34% 🍏
IntHandlerForStorages.java 61.26% -1.2% 🍏
DefaultStorageHandler.java 56.26% -3.21% 🍏
TagFilterHandler.java 54.85% -1.94% 🍏
HandlerUtil.java 5.52% -1.53% 🍏
DefaultViewHandler.java 0% -2.62% 🍏
NakshaAdminCollection.java 0% 🍏
DefaultViewHandlerProperties.java 0% -62.5% 🍏
TagFilterHandlerProperties.java 0% -86.67% 🍏
MockValidationHandler.java 0% -7.39% 🍏
EndorsementHandler.java 0% -5.19% 🍏
MockContextLoaderHandler.java 0% -5.04% 🍏
EchoHandler.java 0% -10.77% 🍏
IntHandlerForEventHandlers.java 0% -3.66% 🍏
here-naksha-lib-core JsonSerializable.java 16.61% 🍏
SpaceProperties.java 0% -75% 🍏
Storage.java 0% -44.83% 🍏
Plugin.java 0% -71.43% 🍏
EventTarget.java 0% -63.33% 🍏
SubscriptionState.java 0% -71.43% 🍏
EventHandler.java 0% -49.54% 🍏
Space.java 0% -83.42% 🍏
Copyright.java 0% -69.23% 🍏
License.java 0% -90% 🍏
ConstraintAll.java 0% 🍏
ConstraintCheck.java 0% -34% 🍏
Index.java 0% 🍏
Constraint.java 0% 🍏
IndexProperty.java 0% -75.41% 🍏
ConstraintNot.java 0% 🍏
ConstraintOne.java 0% 🍏
here-naksha-lib-hub NHSpaceStorageWriter.java 57.82% -39.66% 🍏
NHSpaceStorageReader.java 55.37% -28.89% 🍏
NHSpaceStorage.java 54.37% -41.26% 🍏
NakshaHubConfig.java 4.73% 🍏
NakshaHub.java 0.53% -61.45% 🍏
NHAdminStorageReader.java 0% -84.44% 🍏
NHAdminStorage.java 0% -90.63% 🍏
NHAdminStorageWriter.java 0% -40% 🍏
here-naksha-storage-http HttpStorage.java 0% -3.16% 🍏
PrepareResult.java 0% -3.38% 🍏

@Amaneusz Amaneusz merged commit 832f362 into v3 Jan 16, 2025
3 checks passed
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