Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[FEAT]: Container policies implementation. #2

Closed
djenczewski opened this issue Nov 26, 2024 · 0 comments · Fixed by #7
Closed

[FEAT]: Container policies implementation. #2

djenczewski opened this issue Nov 26, 2024 · 0 comments · Fixed by #7
Assignees

Comments

@djenczewski
Copy link
Member

Description

Container policies implementation.

Related

simplito/privmx-endpoint#7.

PrivMX Endpoint:

ADDITIONS

  1. New model classes :
    • ItemPolicy - Policies defines permissions to manage items inside containers like Store or Thread.
    • ContainerWithoutItemPolicy - Policies defines permissions to manage containers like Inbox
    • ContainerPolicy - Policies defines permissions to manage containers like Store or Thread.

MODIFICATIONS

  1. Updated methods:
    Create and Update methods for the Containers in StoreApi, ThreadApi, InboxApi has new optional parameter "policies".

  2. Updated models:
    Thread, Store and Inbox now contains field policy

PrivMX Endpoint Extra:

ADDITIONS

  1. Create Models for policies Values:
    • PolicyValue - Root class for every policy value.
    • BasePolicyValue - Base policy values.
    • ContainerPolicyValue - Policy value for container.
    • ContainerPolicyChainValue - Policy value for container which can be combined with other.
    • ItemPolicyValue - Policy value for items inside container.
    • ItemPolicyChainValue - Policy value for items inside container which can be combined with other.
  2. Create static class final available values:
    • ContainerPolicyValues - Contains available container policies values.
    • ItemPolicyValues - Contains available item policies values.
  3. Create builders for Policy Values:
    • ContainerPolicyBuilder - Creates instances of ContainerPolicy or ContainerPolicyWithoutItem from empty policy or instance of ContainerPolicy or ContainerPolicyWithoutItem.
    • ItemPolicyBuilder - Creates instances of ItemPolicy.
@djenczewski djenczewski self-assigned this Nov 26, 2024
djenczewski added a commit that referenced this issue Dec 5, 2024
…nValue to ContainerPolicyComplexValue and ItemPolicyComplexValue (#2)
djenczewski added a commit that referenced this issue Dec 5, 2024
…initialized builder from existing ItemPolicy (#2)
@djenczewski djenczewski linked a pull request Dec 5, 2024 that will close this issue
djenczewski added a commit that referenced this issue Dec 6, 2024
* feat: Implementation of container policies #2

* refactor(privmx-endpoint-extra): rename class BasePolicyValue to SpecialPolicyValue #2

* refactor: rename classes ContainerPolicyChainValue and ItemPolicyChainValue to ContainerPolicyComplexValue and ItemPolicyComplexValue (#2)

* docs: Container and Items Policies documentation (#2)

* feat: New ItemPolicyBuilder constructor with itemPolicy parameter to initialized builder from existing ItemPolicy (#2)

* feat: Implement field "policy" in Thread, Store, Inbox models (#2)

* feat: Native initializers for policies model classes (#2)

* docs: policies documentation update

* docs: policies documentation update

---------

Co-authored-by: fgrochowski <fgrochowski@simplito.com>
djenczewski added a commit that referenced this issue Feb 3, 2025
* chore: GitHub issue templates (#6)

* chore: create issue templates

* chore: update issue templates

* feat: container policies implementation (#7)

* feat: Implementation of container policies #2

* refactor(privmx-endpoint-extra): rename class BasePolicyValue to SpecialPolicyValue #2

* refactor: rename classes ContainerPolicyChainValue and ItemPolicyChainValue to ContainerPolicyComplexValue and ItemPolicyComplexValue (#2)

* docs: Container and Items Policies documentation (#2)

* feat: New ItemPolicyBuilder constructor with itemPolicy parameter to initialized builder from existing ItemPolicy (#2)

* feat: Implement field "policy" in Thread, Store, Inbox models (#2)

* feat: Native initializers for policies model classes (#2)

* docs: policies documentation update

* docs: policies documentation update

---------

Co-authored-by: fgrochowski <fgrochowski@simplito.com>

* feat: rename platformConnect/platformConnectPublic methods to connect/connectPublic (#8)

* feat: change platformConnect/platformConnectPublic method names to connect/connectPublic
Mark platformConnect/platformConnectPublic methods as deprecated

* docs: connection update

---------

Co-authored-by: fgrochowski <fgrochowski@simplito.com>

* feat: implement inbox streaming api (#9)

* feat(privmx-endopint-extra): Implement Inbox Stream API #4

* refactor: InboxFileStreamWriter.writeStream method improvements (#4)

* fix: throw NullPointerException when InboxEntryStream.EntryStreamListener.onNextChunkRequest returns null during sending file (#4)

* docs: Create docs for Inbox stream API (#4)

* docs: Update docs for InboxEntryStream (#4)

* docs: update inbox streaming api

* refactor: readed -> read

* docs: Update onStartFileSending method docs (#4)

---------

Co-authored-by: fgrochowski <fgrochowski@simplito.com>

* perf(privmx-endpoint-extra): improve performance of EventDispatcher.channelHasNoCallbacks method (#12)

* fix(privmx-endpoint): parsing policies from Java to C++ when policy is null (#13)

* docs: exceptions for Inbox methods (#14)

* docs(privmx-endpoint): add information about exceptions in documentation for InboxApi methods

* docs(privmx-endpoint): add documentation for close method in InboxApi.java

* docs(privmx-endpoint-extra): add information about exceptions for InboxEntryStream and InboxFileStreamWriter

* docs: InboxEntryStream exceptions update

---------

Co-authored-by: fgrochowski <fgrochowski@simplito.com>

* refactor: cleanup code (#15)

* refactor: Formatting code, suppress warnings, remove typos (#10)

* refactor: remove unused code (#10)

* refactor: Remove duplicated implementation of close method in PrivmxEndpoint.java (#10)

* refactor: replace Map entry to compatible with Java 8 implementation (#10)

* refactor: Make predefined event types as final (#10)

* refactor: make InboxEntryStream.FileInfo fields as final (#10)

* refactor: remove unused code from parser and PrivmxEndpoint.java

* refactor: remove unchecked suppressWarning from EventDispatcher.java

* fix: errors from JNI while creating or updating Inbox with policies

* fix: NoSuchFieldError "_delete" error during creating or updating Thread/Store/Inbox with policies

* fix: GetStringUTFChars error during creating or updating Thread/Store/Inbox with policies parameter

* fix: make policy builders methods public

* docs: add documentation tags (category and group) to ItemPolicy, ContainerPolicy and ContainerPolicyWithoutItem classes. (#18)

* docs: add documentation for static fields in SpecialPolicyValue class

* fix: restore constructors without policies parameter (#20)

* fix: restore constructors without policies

* docs: modify description for constructors Thread, Store and Inbox classes

---------

Co-authored-by: Dawid Jenczewski <djenczewski@simplito.com>

* fix: change parameter forceGenerateNewKey default value.

* fix: change parameter types in ItemPolicyBuilder's methods #23

* feat: Add `inherit` value in ItemPolicyValues class

* fix: Make InboxEntryStream.onError method synchronized and no call cancel() method

* docs: update fileHandle parameter description in InboxApi.writeToFile method

* fix: parsing the FilesConfig within JNI wrapper during Inbox creation or update

* docs: update description for InboxEntryStream.EntryStreamListener.onNextChunkRequest method

* docs: rename `filesConfig` parameter to `fileInfos` in InboxEntryStream.prepareEntry methods

---------

Co-authored-by: fgrochowski <fgrochowski@simplito.com>
Co-authored-by: Doominika <dsluzynska@simplito.com>
Co-authored-by: Doominika <101605588+Doominika@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
1 participant