-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avniproject/avni-client#1328 - use uuid instead of id for resolution …
…of entities
- Loading branch information
1 parent
0156e9a
commit 9ee6dbe
Showing
8 changed files
with
123 additions
and
15 deletions.
There are no files selected for viewing
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
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
2 changes: 0 additions & 2 deletions
2
avni-server-api/src/main/java/org/avni/server/web/GroupDashboardController.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
22 changes: 22 additions & 0 deletions
22
avni-server-api/src/main/java/org/avni/server/web/contract/BaseBundleContract.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,22 @@ | ||
package org.avni.server.web.contract; | ||
|
||
public class BaseBundleContract { | ||
private String uuid; | ||
private boolean voided; | ||
|
||
public String getUuid() { | ||
return uuid; | ||
} | ||
|
||
public void setUuid(String uuid) { | ||
this.uuid = uuid; | ||
} | ||
|
||
public boolean isVoided() { | ||
return voided; | ||
} | ||
|
||
public void setVoided(boolean voided) { | ||
this.voided = voided; | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
avni-server-api/src/main/java/org/avni/server/web/contract/GroupDashboardBundleContract.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,73 @@ | ||
package org.avni.server.web.contract; | ||
|
||
import org.avni.server.domain.GroupDashboard; | ||
|
||
public class GroupDashboardBundleContract extends BaseBundleContract { | ||
private boolean isPrimaryDashboard; | ||
private boolean isSecondaryDashboard; | ||
private String dashboardUUID; | ||
private String groupUUID; | ||
private String dashboardName; | ||
private String dashboardDescription; | ||
|
||
public static GroupDashboardBundleContract fromEntity(GroupDashboard groupDashboard) { | ||
GroupDashboardBundleContract contract = new GroupDashboardBundleContract(); | ||
contract.setUuid(groupDashboard.getUuid()); | ||
contract.setVoided(groupDashboard.isVoided()); | ||
contract.isPrimaryDashboard = groupDashboard.isPrimaryDashboard(); | ||
contract.isSecondaryDashboard = groupDashboard.isSecondaryDashboard(); | ||
contract.groupUUID = groupDashboard.getGroup().getUuid(); | ||
contract.dashboardUUID = groupDashboard.getDashboard().getUuid(); | ||
contract.dashboardName = groupDashboard.getDashboard().getName(); | ||
contract.dashboardDescription = groupDashboard.getDashboard().getDescription(); | ||
return contract; | ||
} | ||
|
||
public boolean isPrimaryDashboard() { | ||
return isPrimaryDashboard; | ||
} | ||
|
||
public void setPrimaryDashboard(boolean primaryDashboard) { | ||
isPrimaryDashboard = primaryDashboard; | ||
} | ||
|
||
public boolean isSecondaryDashboard() { | ||
return isSecondaryDashboard; | ||
} | ||
|
||
public void setSecondaryDashboard(boolean secondaryDashboard) { | ||
isSecondaryDashboard = secondaryDashboard; | ||
} | ||
|
||
public String getDashboardUUID() { | ||
return dashboardUUID; | ||
} | ||
|
||
public void setDashboardUUID(String dashboardUUID) { | ||
this.dashboardUUID = dashboardUUID; | ||
} | ||
|
||
public String getGroupUUID() { | ||
return groupUUID; | ||
} | ||
|
||
public void setGroupUUID(String groupUUID) { | ||
this.groupUUID = groupUUID; | ||
} | ||
|
||
public String getDashboardName() { | ||
return dashboardName; | ||
} | ||
|
||
public void setDashboardName(String dashboardName) { | ||
this.dashboardName = dashboardName; | ||
} | ||
|
||
public String getDashboardDescription() { | ||
return dashboardDescription; | ||
} | ||
|
||
public void setDashboardDescription(String dashboardDescription) { | ||
this.dashboardDescription = dashboardDescription; | ||
} | ||
} |