Skip to content

Commit

Permalink
server: Use standard IMarker structure for storing bookmarks
Browse files Browse the repository at this point in the history
The new changes aim to re-structure the algorithm of storing bookmarks.
Previously, we stored each bookmark (of an experiment) under a specific
directory inside the .webapp directory of Trace Compass. Right now, we
are using Eclipse's markers system to store and fetch the benchmarks.

[Changed] Bookmark storing/fetching system is changed to IMarker

Signed-off-by: Kaveh Shahedi <[email protected]>
  • Loading branch information
kavehshahedi authored and bhufmann committed Nov 26, 2024
1 parent 5224594 commit 5e42f43
Show file tree
Hide file tree
Showing 6 changed files with 439 additions and 335 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
package org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core.tests.stubs;

import java.io.Serializable;
import java.nio.charset.Charset;
import java.util.Objects;
import java.util.UUID;

Expand All @@ -25,7 +24,6 @@
* <code>BookmarkModel</code> schema
*
* @author Kaveh Shahedi
* @since 10.1
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class BookmarkModelStub implements Serializable {
Expand Down Expand Up @@ -71,11 +69,7 @@ public BookmarkModelStub(
* end time
*/
public BookmarkModelStub(String name, long start, long end) {
this(getUUID(name), name, start, end);
}

private static UUID getUUID(String name) {
return UUID.nameUUIDFromBytes(Objects.requireNonNull(name.getBytes(Charset.defaultCharset())));
this(UUID.randomUUID(), name, start, end);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* Contributes to the model used for TSP swagger-core annotations.
*
* @author Kaveh Shahedi
* @since 10.1
*/
public interface Bookmark {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
* Parameters for bookmark creation and update operations
*
* @author Kaveh Shahedi
* @since 10.1
*/
public interface BookmarkQueryParameters {

Expand All @@ -31,6 +30,9 @@ public interface BookmarkQueryParameters {
BookmarkParameters getParameters();


/**
* Bookmark parameters
*/
interface BookmarkParameters {
/**
* @return The bookmark name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
* Bookmark model for TSP
*
* @author Kaveh Shahedi
* @since 10.1
*/
public class Bookmark implements Serializable {

Expand Down
Loading

0 comments on commit 5e42f43

Please sign in to comment.