Skip to content

Commit

Permalink
refactor: move username and origin to properties attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
tcompiegne committed Jan 19, 2016
1 parent 5faf6d1 commit 4d23a76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
import java.util.Set;

/**
* @author Titouan COMPIEGNE
*/
* @author Titouan COMPIEGNE
*/
public interface EventRepository extends CrudRepository<Event, String> {

Set<Event> findByType(List<EventType> eventTypes);
Set<Event> findByType(List<EventType> eventTypes);

Set<Event> findByProperty(String key, String value);

Expand Down
30 changes: 3 additions & 27 deletions src/main/java/io/gravitee/repository/management/model/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@ public class Event {
*/
private String parentId;

/**
* The event origin
*/
private String origin;

/**
* The event publisher
*/
private String username;

/**
* The event properties
*/
Expand Down Expand Up @@ -100,22 +90,6 @@ public void setParentId(String parentId) {
this.parentId = parentId;
}

public String getOrigin() {
return origin;
}

public void setOrigin(String origin) {
this.origin = origin;
}

public String getUsername() {
return username;
}

public void setUsername(String username) {
this.username = username;
}

public Map<String, String> getProperties() {
return properties;
}
Expand All @@ -141,7 +115,9 @@ public void setUpdatedAt(Date updatedAt) {
}

public enum EventProperties {
API_ID("api_id");
API_ID("api_id"),
ORIGIN("origin"),
USERNAME("username");

private String value;

Expand Down

0 comments on commit 4d23a76

Please sign in to comment.