-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#296 core 81 and SelfJsonStorage sketch
- Loading branch information
1 parent
6030d06
commit 36a8530
Showing
4 changed files
with
98 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/** | ||
* Copyright (c) 2020-2021, Self XDSD Contributors | ||
* All rights reserved. | ||
* <p> | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), | ||
* to read the Software only. Permission is hereby NOT GRANTED to use, copy, | ||
* modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
* the Software. | ||
* <p> | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, | ||
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT | ||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
package com.selfxdsd.storage; | ||
|
||
import com.selfxdsd.api.storage.JsonStorage; | ||
import com.selfxdsd.api.storage.Storage; | ||
|
||
import java.net.URI; | ||
|
||
/** | ||
* Storage for JsonResources in Self XDSD (we store JSONs received from | ||
* providers' API for making conditional requests using E-Tag). | ||
* @author Mihai Andronache (amihaiemil@gmail.com) | ||
* @since 0.0.70 | ||
* @version $Id$ | ||
*/ | ||
public final class SelfJsonStorage implements JsonStorage { | ||
|
||
/** | ||
* Parent Storage. | ||
*/ | ||
private final Storage storage; | ||
|
||
/** | ||
* Database. | ||
*/ | ||
private final Database database; | ||
|
||
/** | ||
* Ctor. | ||
* @param storage Parent Storage. | ||
* @param database Database. | ||
*/ | ||
public SelfJsonStorage( | ||
final Storage storage, | ||
final Database database | ||
) { | ||
this.storage = storage; | ||
this.database = database; | ||
} | ||
|
||
@Override | ||
public String getEtag(final URI uri) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String getResourceBody(final URI uri) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void store(final URI uri, final String etag, final String resource) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters