Skip to content

Commit 4c30a8e

Browse files
committed
chore: rewrite document api (CloudNetService#1178)
### Motivation At the moment the document api is very limited due to the reason that practically only the json implementation is used everywhere. While there is an abstract interface for a Document that specifies most of the methods implemented in the json implementation, that interface cannot really be used for custom implementations as the exposed api never accepts the custom implementation. ### Modification The whole Document api has been rewritten and the Document interface is now used everywhere in the api, allowing to use custom document types. To make this work, this PR also contains a way to transfer the key-value pairs from one document type to another. To follow the internal structure of having one mutable type and one immutable type for everything (to make it clear when something can/should be edited, an when that shouldn't be the case) the document is now split up into mutable and immutable as well. ### Result Way cleaner document implementation with proper support for custom document types.
1 parent 12024c1 commit 4c30a8e

File tree

200 files changed

+6539
-2108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+6539
-2108
lines changed

.idea/inspectionProfiles/CloudNet.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

checkstyle.xml

-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@
158158
<module name="OneStatementPerLine"/>
159159
<module name="MultipleVariableDeclarations"/>
160160
<module name="ArrayTypeStyle"/>
161-
<module name="MissingSwitchDefault"/>
162161
<module name="FallThrough"/>
163162
<module name="UpperEll"/>
164163
<module name="ModifierOrder"/>

common/src/main/java/eu/cloudnetservice/common/document/Document.java

-149
This file was deleted.

common/src/main/java/eu/cloudnetservice/common/document/Persistable.java

-63
This file was deleted.

common/src/main/java/eu/cloudnetservice/common/document/Readable.java

-59
This file was deleted.

0 commit comments

Comments
 (0)