Skip to content
This repository has been archived by the owner on Jul 29, 2021. It is now read-only.

Commit

Permalink
feat(views): make views sortable, hidden and choose the default one
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGeraud authored and brasseld committed Dec 9, 2017
1 parent b5ad5b1 commit 79a0239
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
Expand Up @@ -22,6 +22,7 @@

/**
* @author Azize ELAMRANI (azize.elamrani at graviteesource.com)
* @author Nicolas GERAUD (nicolas.geraud at graviteesource.com)
* @author GraviteeSource Team
*/
public interface ViewRepository extends CrudRepository<View, String>{
Expand Down
55 changes: 53 additions & 2 deletions src/main/java/io/gravitee/repository/management/model/View.java
Expand Up @@ -15,6 +15,7 @@
*/
package io.gravitee.repository.management.model;

import java.util.Date;
import java.util.Objects;

/**
Expand All @@ -26,11 +27,16 @@ public enum AuditEvent implements Audit.AuditEvent {
VIEW_CREATED, VIEW_UPDATED, VIEW_DELETED
}

private String id;
public static final String ALL_ID = "all";

private String id;
private String name;

private String description;
private boolean defaultView;
private boolean hidden;
private int order;
private Date createdAt;
private Date updatedAt;

public String getId() {
return id;
Expand All @@ -56,6 +62,46 @@ public void setDescription(String description) {
this.description = description;
}

public boolean isDefaultView() {
return defaultView;
}

public void setDefaultView(boolean defaultView) {
this.defaultView = defaultView;
}

public int getOrder() {
return order;
}

public void setOrder(int order) {
this.order = order;
}

public Date getCreatedAt() {
return createdAt;
}

public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}

public Date getUpdatedAt() {
return updatedAt;
}

public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}

public boolean isHidden() {
return hidden;
}

public void setHidden(boolean hidden) {
this.hidden = hidden;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
Expand All @@ -77,6 +123,11 @@ public String toString() {
"id='" + id + '\'' +
", name='" + name + '\'' +
", description='" + description + '\'' +
", defaultView='" + defaultView + '\'' +
", hidden='" + hidden + '\'' +
", order='" + order + '\'' +
", updatedAt='" + updatedAt + '\'' +
", createdAt='" + createdAt + '\'' +
'}';
}
}

0 comments on commit 79a0239

Please sign in to comment.