Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

updates for storing/fetching projectChanges for linearization through event-history-service #19

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package edu.stanford.protege.webprotege.change;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
import com.google.auto.value.AutoValue;
import edu.stanford.protege.webprotege.common.Page;
import edu.stanford.protege.webprotege.common.UserId;
Expand All @@ -16,17 +16,22 @@
* 24/02/15
*/
@AutoValue

public abstract class ProjectChange implements Serializable {

@JsonCreator
@Nonnull
public static ProjectChange get(@Nonnull RevisionNumber revisionNumber, UserId author, long timestamp, String summary, int changeCount, Page<DiffElement<String, String>> diff) {
public static ProjectChange get(@JsonProperty("revisionNumber") @Nonnull RevisionNumber revisionNumber,
@JsonProperty("userId") UserId author,
@JsonProperty("timestamp") long timestamp,
@JsonProperty("summary") String summary,
@JsonProperty("changeCount") int changeCount,
@JsonProperty("diff") Page<DiffElement<String, String>> diff) {
return new AutoValue_ProjectChange(changeCount,
revisionNumber,
author,
summary,
timestamp,
diff);
revisionNumber,
author,
summary,
timestamp,
diff);
}

public abstract int getChangeCount();
Expand Down
Loading