forked from avniproject/avni-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f8968c
commit 94650c8
Showing
11 changed files
with
159 additions
and
27 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
avni-server-api/src/main/java/org/avni/server/domain/metabase/BaseType.java
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,17 @@ | ||
package org.avni.server.domain.metabase; | ||
|
||
public enum BaseType { | ||
INTEGER("type/Integer"), | ||
TEXT("type/Text"), | ||
BOOLEAN("type/Boolean"); | ||
|
||
private final String typeName; | ||
|
||
BaseType(String typeName) { | ||
this.typeName = typeName; | ||
} | ||
|
||
public String getTypeName() { | ||
return typeName; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
avni-server-api/src/main/java/org/avni/server/domain/metabase/CardType.java
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,24 @@ | ||
package org.avni.server.domain.metabase; | ||
|
||
public enum CardType { | ||
QUESTION("question"); | ||
|
||
private final String type; | ||
|
||
CardType(String type) { | ||
this.type = type; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public static CardType fromString(String typeName) { | ||
for (CardType type : CardType.values()) { | ||
if (type.getType().equalsIgnoreCase(typeName)) { | ||
return type; | ||
} | ||
} | ||
throw new IllegalArgumentException("Unknown card type: " + typeName); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
avni-server-api/src/main/java/org/avni/server/domain/metabase/ConditionType.java
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,16 @@ | ||
package org.avni.server.domain.metabase; | ||
|
||
public enum ConditionType { | ||
EQUAL("="), | ||
NOT_EQUAL("!="); | ||
|
||
private final String operator; | ||
|
||
ConditionType(String operator) { | ||
this.operator = operator; | ||
} | ||
|
||
public String getOperator() { | ||
return operator; | ||
} | ||
} |
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
21 changes: 21 additions & 0 deletions
21
avni-server-api/src/main/java/org/avni/server/domain/metabase/QueryType.java
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,21 @@ | ||
package org.avni.server.domain.metabase; | ||
|
||
public enum QueryType { | ||
QUERY("query"), | ||
DASHBOARD("dashboard"); | ||
|
||
private final String typeName; | ||
|
||
QueryType(String typeName) { | ||
this.typeName = typeName; | ||
} | ||
|
||
public String getTypeName() { | ||
return typeName; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return typeName; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
avni-server-api/src/main/java/org/avni/server/domain/metabase/SyncStatus.java
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,25 @@ | ||
package org.avni.server.domain.metabase; | ||
|
||
public enum SyncStatus { | ||
COMPLETE("complete"), | ||
INCOMPLETE("incomplete"); | ||
|
||
private final String status; | ||
|
||
SyncStatus(String status) { | ||
this.status = status; | ||
} | ||
|
||
public String getStatus() { | ||
return status; | ||
} | ||
|
||
public static SyncStatus fromString(String status) { | ||
for (SyncStatus s : SyncStatus.values()) { | ||
if (s.getStatus().equalsIgnoreCase(status)) { | ||
return s; | ||
} | ||
} | ||
throw new IllegalArgumentException("Unknown sync status: " + status); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
avni-server-api/src/main/java/org/avni/server/domain/metabase/VisualizationType.java
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,21 @@ | ||
package org.avni.server.domain.metabase; | ||
|
||
public enum VisualizationType { | ||
TABLE("table"), | ||
CHART("chart"); | ||
|
||
private final String typeName; | ||
|
||
VisualizationType(String typeName) { | ||
this.typeName = typeName; | ||
} | ||
|
||
public String getTypeName() { | ||
return typeName; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return typeName; | ||
} | ||
} |
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