tenthe opened a new pull request, #4173:
URL: https://github.com/apache/streampipes/pull/4173
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<!--
Thanks for contributing! Here are some tips you can follow to help us
incorporate your contribution quickly and easily:
1. If this is your first time, please read our contributor guidelines:
- https://streampipes.apache.org/community/get-involved/
- https://cwiki.apache.org/confluence/display/STREAMPIPES/Getting+Started
2. Make sure the PR title is formatted like: `[#<GitHub issue id>] PR title
...`
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g.,
`[WIP][#<GitHub issue id>] PR title ...`.
4. Please write your PR title to summarize what this PR proposes/fixes.
5. Link the PR to the corresponding GitHub issue (if present) in the
`Development` section in the right menu bar.
6. Be sure to keep the PR description updated to reflect all changes.
7. If possible, provide a concise example to reproduce the issue for a
faster review.
8. Make sure tests pass via `mvn clean install`.
9. (Optional) If the contribution is large, please file an Apache ICLA
- http://apache.org/licenses/icla.pdf
-->
### Purpose
<!--
Please clarify what changes you are proposing and describe how those changes
will address the issue.
Furthermore, describe potential consequences the changes might have.
-->
This PR contains a storage-layer refactoring.
It introduces typed storage interfaces for previously generic
`CRUDStorage<T>` accessors and reorganizes both API and CouchDB implementation
packages into domain-based subpackages.
## Main Changes
### 1. Introduced typed storage interfaces
The following interfaces were added and integrated:
- `IUserGroupStorage`
- `IFileMetadataStorage`
- `IDataExplorerDashboardStorage`
- `IDataExplorerWidgetStorage`
- `IPasswordRecoveryTokenStorage`
- `IUserActivationTokenStorage`
- `IExtensionsServiceStorage`
- `IExtensionsServiceConfigurationStorage`
- `IRoleStorage`
- `IPrivilegeStorage`
- `ICompactPipelineTemplateStorage`
- `ICertificateStorage`
- `IAssetStorage`
- `ITransformationScriptTemplateStorage`
### 2. Updated storage manager contracts
- `INoSqlStorage` methods were updated to return typed interfaces instead of
`CRUDStorage<T>` for the domains above.
- `CouchDbStorageManager` was updated accordingly to return typed
implementation classes.
- Existing call sites were migrated to use the new typed return types.
### 3. Added CouchDB typed implementations
For each newly introduced interface, dedicated implementation classes were
added/used in `streampipes-storage-couchdb`, replacing direct
`DefaultCrudStorage`/`DefaultViewCrudStorage` usage at manager return points.
### 4. Package restructuring in `streampipes-storage-api`
`org.apache.streampipes.storage.api` was split into:
- `org.apache.streampipes.storage.api.core`
- `org.apache.streampipes.storage.api.connect`
- `org.apache.streampipes.storage.api.user`
- `org.apache.streampipes.storage.api.pipeline`
- `org.apache.streampipes.storage.api.explorer`
- `org.apache.streampipes.storage.api.system`
Interfaces were moved to the corresponding domain package and all imports
across modules were updated.
### 5. Package restructuring in `streampipes-storage-couchdb`
`org.apache.streampipes.storage.couchdb.impl` was split into:
- `org.apache.streampipes.storage.couchdb.impl.core`
- `org.apache.streampipes.storage.couchdb.impl.connect`
- `org.apache.streampipes.storage.couchdb.impl.user`
- `org.apache.streampipes.storage.couchdb.impl.pipeline`
- `org.apache.streampipes.storage.couchdb.impl.explorer`
- `org.apache.streampipes.storage.couchdb.impl.system`
Implementation classes were moved to matching domain packages and all
references/imports were migrated.
## Notes
- Refactor only: no intentional functional behavior change.
- This PR is primarily structural and type-contract focused; detailed
per-file changes are visible in the commit history/changelog.
### Remarks
<!--
Is there anything left we need to pay attention on?
Are there some references that might be important? E.g. links to Confluence,
or discussions
on the mailing list or GitHub.
-->
PR introduces (a) breaking change(s): no
PR introduces (a) deprecation(s): no
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]