[Trunk | Admin tools library service]:
1. Community.java: Add field "alias" (now it will be: openaire/explore (to be decided), connect, community, monitor) - it may be renamed again to: type. 2. Page.java & DivId.java & CommunityPage.java & DivIdResponse.java: Remove fields: "connect", "communities", "openaire" and add field: "dashboardAlias". 3. PageDAO.java & MongoDBPageDAO.java & DivIdDAO.java & MongoDBDivIdDAO.java: Methods use new field "dashboardAlias" instead of old fields: "connect", "communities", "openaire". 4. CommunityController.java & PageController.java & DivIdController.java & DivHelpContentController.java: Use methods for new field "dashboardAlias" instead of old fields: "connect", "communities", "openaire".
This commit is contained in:
parent
caaa5921ca
commit
30e8d91991
|
@ -307,20 +307,21 @@ public class CommunityController {
|
|||
@RequestParam(value="page_route", required=false) String page_route,
|
||||
@RequestParam(value="div", required = false) String div) {
|
||||
List<CommunityPage> return_pages = new ArrayList<CommunityPage>();
|
||||
Map<String, Boolean> pages = communityDAO.findByPid(pid).getPages();
|
||||
Community community = communityDAO.findByPid(pid);
|
||||
Map<String, Boolean> pages = community.getPages();
|
||||
|
||||
if(pages != null) {
|
||||
for (Map.Entry<String, Boolean> page : pages.entrySet()) {
|
||||
if(div != null && div.equals("true")) {
|
||||
Community community = communityDAO.findByPid(pid);
|
||||
List<DivId> divIds = divIdDAO.findByPagesContaining(page.getKey());
|
||||
Iterator<DivId> divIdIterator = divIds.iterator();
|
||||
|
||||
while (divIdIterator.hasNext()) {
|
||||
DivId divId = divIdIterator.next();
|
||||
if((pid.equals("openaire") && !divId.getOpenaire()) ||
|
||||
(pid.equals("connect") && !divId.getConnect()) ||
|
||||
(!pid.equals("openaire") && !pid.equals("connect") && !divId.getCommunities())) {
|
||||
// if((pid.equals("openaire") && !divId.getOpenaire()) ||
|
||||
// (pid.equals("connect") && !divId.getConnect()) ||
|
||||
// (!pid.equals("openaire") && !pid.equals("connect") && !divId.getCommunities())) {
|
||||
if(community.getAlias().equals(divId.getDashboardAlias())) {
|
||||
divIdIterator.remove();
|
||||
}
|
||||
}
|
||||
|
@ -332,7 +333,8 @@ public class CommunityController {
|
|||
|
||||
Page p = pageDAO.findById(page.getKey());
|
||||
|
||||
if((pid.equals("openaire") && p.getOpenaire()) || (pid.equals("connect") && p.getConnect()) ||(!pid.equals("openaire") && !pid.equals("connect") && p.getCommunities())) {
|
||||
//if((pid.equals("openaire") && p.getOpenaire()) || (pid.equals("connect") && p.getConnect()) ||(!pid.equals("openaire") && !pid.equals("connect") && p.getCommunities())) {
|
||||
if(community.getAlias().equals(p.getDashboardAlias())) {
|
||||
if ((page_type == null && page_route == null) || (page_route == null && p.getType().equals(page_type))
|
||||
|| p.getRoute().equals(page_route)) {
|
||||
CommunityPage communityPage = new CommunityPage(p);
|
||||
|
|
|
@ -133,6 +133,9 @@ public class DivHelpContentController {
|
|||
}
|
||||
|
||||
public void addDivHelpContentsInCommunity(String pid, String communityId, String divIdName) {
|
||||
Community community = communityDAO.findByPid(pid);
|
||||
String dashboardAlias = community.getAlias();
|
||||
|
||||
//String organizations_class_content = "<div> <p>Here you can write more details about the organizations related to your community.</p> </div>";
|
||||
String link_context_form_content = "<div> <div><span class=\"uk-text-bold\"><span uk-icon=\"icon: info\"> </span> Information:</span> Select a research community and/or a category and search for a community concept, or browse to the community tree through the categories</div> </div>";
|
||||
String link_project_form_content = "<div> <div><span class=\"uk-text-bold\"><span uk-icon=\"icon: info\"> </span> Information:</span> Search for projects using project name or grant id. Limit results filtering by funder.</div> </div>";
|
||||
|
@ -143,11 +146,11 @@ public class DivHelpContentController {
|
|||
List<DivId> divIds = divIdController.getDivIds(null, divIdName, null);
|
||||
|
||||
for( DivId div : divIds ) {
|
||||
if (div != null && (
|
||||
(div.getOpenaire() && pid.equals("openaire")) ||
|
||||
(div.getConnect() && pid.equals("connect")) ||
|
||||
(div.getCommunities() && !pid.equals("openaire") && !pid.equals("connect"))
|
||||
)) {
|
||||
if (div != null && div.getDashboardAlias().equals(dashboardAlias) ) {
|
||||
// (div.getOpenaire() && pid.equals("openaire")) ||
|
||||
// (div.getConnect() && pid.equals("connect")) ||
|
||||
// (div.getCommunities() && !pid.equals("openaire") && !pid.equals("connect"))
|
||||
// )) {
|
||||
/*
|
||||
if (div.getName().equals("organizations")) {
|
||||
this.insertOrUpdateDivHelpContent(new DivHelpContent(div.getId(), communityId, organizations_class_content, false));
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
|
||||
import java.util.*;
|
||||
|
||||
import eu.dnetlib.uoaadmintoolslibrary.dao.CommunityDAO;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.dao.DivIdDAO;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.dao.PageDAO;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.entities.Community;
|
||||
|
@ -25,6 +26,9 @@ public class DivIdController {
|
|||
@Autowired
|
||||
private PageDAO pageDAO;
|
||||
|
||||
@Autowired
|
||||
private CommunityDAO communityDAO;
|
||||
|
||||
@Autowired
|
||||
private CommunityController communityController;
|
||||
|
||||
|
@ -37,6 +41,9 @@ public class DivIdController {
|
|||
public List<DivId> getDivIds(@RequestParam(required = false) String page,
|
||||
@RequestParam(required = false) String name,
|
||||
@RequestParam(value = "communityId", required = false) String pid) {
|
||||
Community community = communityDAO.findByPid(pid);
|
||||
String dashboardAlias = community.getAlias();
|
||||
|
||||
List<DivId> divIds = null;
|
||||
|
||||
if(page != null && name != null) {
|
||||
|
@ -57,15 +64,11 @@ public class DivIdController {
|
|||
divIds = divIdDAO.findAll();
|
||||
}
|
||||
|
||||
if(pid != null) {
|
||||
if(dashboardAlias != null) {
|
||||
Iterator<DivId> iteratorDivIds = divIds.iterator();
|
||||
while(iteratorDivIds.hasNext()) {
|
||||
DivId divId = iteratorDivIds.next();
|
||||
if (pid.equals("openaire") && !divId.getOpenaire()) {
|
||||
iteratorDivIds.remove();
|
||||
} else if (pid.equals("connect") && !divId.getConnect()) {
|
||||
iteratorDivIds.remove();
|
||||
} else if(!pid.equals("openaire") && !pid.equals("connect") && !divId.getCommunities()){
|
||||
if (!dashboardAlias.equals(divId.getDashboardAlias())) {
|
||||
iteratorDivIds.remove();
|
||||
}
|
||||
}
|
||||
|
@ -136,9 +139,7 @@ public class DivIdController {
|
|||
DivId divId = new DivId();
|
||||
divId.setId(divIdResponse.getId());
|
||||
divId.setName(divIdResponse.getName());
|
||||
divId.setOpenaire(divIdResponse.getOpenaire());
|
||||
divId.setConnect(divIdResponse.getConnect());
|
||||
divId.setCommunities(divIdResponse.getCommunities());
|
||||
divId.setDashboardAlias(divIdResponse.getDashboardAlias());
|
||||
|
||||
List<Page> fullPages = divIdResponse.getPages();
|
||||
List<String> pages = new ArrayList<String>();
|
||||
|
@ -152,71 +153,67 @@ public class DivIdController {
|
|||
|
||||
@RequestMapping(value = "/div/update", method = RequestMethod.POST)
|
||||
public DivIdResponse updateDivId(@RequestBody DivIdResponse divIdResponse) {
|
||||
/*
|
||||
DivId divId = divIdDAO.findById(_divId.getId());
|
||||
divId.setName(_divId.getName());
|
||||
divId.setPages(_divId.getPages());
|
||||
divIdDAO.save(divId);
|
||||
return this.getDivIdFull(divId.getId());
|
||||
*/
|
||||
DivId divIdOld = divIdDAO.findById(divIdResponse.getId());
|
||||
// DivId divIdOld = divIdDAO.findById(divIdResponse.getId());
|
||||
// DivId divId = this.getDivIdByDivIdResponse(divIdResponse);
|
||||
// divIdDAO.save(divId);
|
||||
//
|
||||
// boolean openaireEnabled = divId.getOpenaire();
|
||||
// boolean connectEnabled = divId.getConnect();
|
||||
//
|
||||
// if(divId.getCommunities() && !divIdOld.getCommunities()) {
|
||||
// List<Community> communities = communityController.getAllCommunities();
|
||||
// for( Community community : communities ) {
|
||||
// if(!community.getPid().equals("openaire") && !community.getPid().equals("connect")) {
|
||||
// divHelpContentController.addDivHelpContentsInCommunity(community.getPid(), community.getId(), divId.getName());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if(openaireEnabled && !divIdOld.getOpenaire()) {
|
||||
// Community community = communityController.getCommunity("openaire");
|
||||
// divHelpContentController.addDivHelpContentsInCommunity(community.getPid(), community.getId(), divId.getName());
|
||||
// }
|
||||
//
|
||||
// if(connectEnabled && !divIdOld.getConnect()) {
|
||||
// Community community = communityController.getCommunity("connect");
|
||||
// divHelpContentController.addDivHelpContentsInCommunity(community.getPid(), community.getId(), divId.getName());
|
||||
// }
|
||||
//
|
||||
// if(!divId.getCommunities()) {
|
||||
// List<Community> communities = communityController.getAllCommunities();
|
||||
// for( Community community : communities ) {
|
||||
// if(!community.getPid().equals("openaire") && !community.getPid().equals("connect")) {
|
||||
// // delete div contents related to this divId
|
||||
// List<DivHelpContentResponse> divHelpContentResponses = divHelpContentController.getDivHelpContents(community.getPid(), null, divId.getName(), null);
|
||||
// for(DivHelpContentResponse divHelpContentResponse : divHelpContentResponses) {
|
||||
// divHelpContentController.deleteDivHelpContent(divHelpContentResponse.getId());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if(!openaireEnabled) {
|
||||
// Community community = communityController.getCommunity("openaire");
|
||||
//
|
||||
// // delete div contents related to this divId
|
||||
// List<DivHelpContentResponse> divHelpContentResponses = divHelpContentController.getDivHelpContents("openaire", null, divId.getName(), null);
|
||||
// for(DivHelpContentResponse divHelpContentResponse : divHelpContentResponses) {
|
||||
// divHelpContentController.deleteDivHelpContent(divHelpContentResponse.getId());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if(!connectEnabled) {
|
||||
// Community community = communityController.getCommunity("connect");
|
||||
//
|
||||
// // delete div contents related to this divId
|
||||
// List<DivHelpContentResponse> divHelpContentResponses = divHelpContentController.getDivHelpContents("connect", null, divId.getName(), null);
|
||||
// for(DivHelpContentResponse divHelpContentResponse : divHelpContentResponses) {
|
||||
// divHelpContentController.deleteDivHelpContent(divHelpContentResponse.getId());
|
||||
// }
|
||||
// }
|
||||
|
||||
DivId divId = this.getDivIdByDivIdResponse(divIdResponse);
|
||||
divIdDAO.save(divId);
|
||||
|
||||
boolean openaireEnabled = divId.getOpenaire();
|
||||
boolean connectEnabled = divId.getConnect();
|
||||
|
||||
if(divId.getCommunities() && !divIdOld.getCommunities()) {
|
||||
List<Community> communities = communityController.getAllCommunities();
|
||||
for( Community community : communities ) {
|
||||
if(!community.getPid().equals("openaire") && !community.getPid().equals("connect")) {
|
||||
divHelpContentController.addDivHelpContentsInCommunity(community.getPid(), community.getId(), divId.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
if(openaireEnabled && !divIdOld.getOpenaire()) {
|
||||
Community community = communityController.getCommunity("openaire");
|
||||
divHelpContentController.addDivHelpContentsInCommunity(community.getPid(), community.getId(), divId.getName());
|
||||
}
|
||||
|
||||
if(connectEnabled && !divIdOld.getConnect()) {
|
||||
Community community = communityController.getCommunity("connect");
|
||||
divHelpContentController.addDivHelpContentsInCommunity(community.getPid(), community.getId(), divId.getName());
|
||||
}
|
||||
|
||||
if(!divId.getCommunities()) {
|
||||
List<Community> communities = communityController.getAllCommunities();
|
||||
for( Community community : communities ) {
|
||||
if(!community.getPid().equals("openaire") && !community.getPid().equals("connect")) {
|
||||
// delete div contents related to this divId
|
||||
List<DivHelpContentResponse> divHelpContentResponses = divHelpContentController.getDivHelpContents(community.getPid(), null, divId.getName(), null);
|
||||
for(DivHelpContentResponse divHelpContentResponse : divHelpContentResponses) {
|
||||
divHelpContentController.deleteDivHelpContent(divHelpContentResponse.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!openaireEnabled) {
|
||||
Community community = communityController.getCommunity("openaire");
|
||||
|
||||
// delete div contents related to this divId
|
||||
List<DivHelpContentResponse> divHelpContentResponses = divHelpContentController.getDivHelpContents("openaire", null, divId.getName(), null);
|
||||
for(DivHelpContentResponse divHelpContentResponse : divHelpContentResponses) {
|
||||
divHelpContentController.deleteDivHelpContent(divHelpContentResponse.getId());
|
||||
}
|
||||
}
|
||||
|
||||
if(!connectEnabled) {
|
||||
Community community = communityController.getCommunity("connect");
|
||||
|
||||
// delete div contents related to this divId
|
||||
List<DivHelpContentResponse> divHelpContentResponses = divHelpContentController.getDivHelpContents("connect", null, divId.getName(), null);
|
||||
for(DivHelpContentResponse divHelpContentResponse : divHelpContentResponses) {
|
||||
divHelpContentController.deleteDivHelpContent(divHelpContentResponse.getId());
|
||||
}
|
||||
}
|
||||
|
||||
return divIdResponse;
|
||||
}
|
||||
|
||||
|
@ -243,17 +240,14 @@ public class DivIdController {
|
|||
|
||||
@RequestMapping(value = "/div/pages", method = RequestMethod.GET)
|
||||
public Set<String> getDivIdsPages(@RequestParam(value="communityId", required = false) String pid) {
|
||||
Community community = communityDAO.findByPid(pid);
|
||||
String dashboardAlias = community.getAlias();
|
||||
|
||||
List<DivId> divIds = null;
|
||||
Set<String> hasCommunityPageDivIds = new HashSet<>();
|
||||
|
||||
if(pid != null) {
|
||||
if(pid.equals("openaire")) {
|
||||
divIds = divIdDAO.findByOpenaire(true);
|
||||
} else if(pid.equals("connect")) {
|
||||
divIds = divIdDAO.findByConnect(true);
|
||||
} else {
|
||||
divIds = divIdDAO.findByCommunities(true);
|
||||
}
|
||||
if(dashboardAlias != null) {
|
||||
divIds = divIdDAO.findByDashboardAlias(dashboardAlias);
|
||||
} else {
|
||||
divIds = divIdDAO.findAll();
|
||||
}
|
||||
|
|
|
@ -70,31 +70,17 @@ public class PageController {
|
|||
@RequestParam(value="with_positions", required=false) String with_positions) {
|
||||
List<Page> pages;
|
||||
if (pid != null) {
|
||||
if (pid.equals("openaire")) {
|
||||
if (page_route != null) {
|
||||
pages = new ArrayList<Page>();
|
||||
pages.add(pageDAO.findByOpenaireAndRoute(true, page_route));
|
||||
} else {
|
||||
pages = pageDAO.findByOpenaire(true);
|
||||
}
|
||||
} else if (pid.equals("connect")) {
|
||||
if (page_route != null) {
|
||||
pages = new ArrayList<Page>();
|
||||
pages.add(pageDAO.findByConnectAndRoute(true, page_route));
|
||||
} else {
|
||||
pages = pageDAO.findByConnect(true);
|
||||
}
|
||||
Community community = communityDAO.findByPid(pid);
|
||||
String dashboardAlias = community.getAlias();
|
||||
|
||||
if (page_route != null) {
|
||||
pages = new ArrayList<Page>();
|
||||
pages.add(pageDAO.findByDashboardAliasAndRoute(dashboardAlias, page_route));
|
||||
} else {
|
||||
if (page_route != null) {
|
||||
pages = new ArrayList<Page>();
|
||||
pages.add(pageDAO.findByCommunitiesAndRoute(true, page_route));
|
||||
} else {
|
||||
pages = pageDAO.findByCommunities(true);
|
||||
}
|
||||
pages = pageDAO.findByDashboardAlias(dashboardAlias);
|
||||
}
|
||||
} else if (page_route != null) {
|
||||
pages = new ArrayList<Page>();
|
||||
pages.add(pageDAO.findByRoute(page_route));
|
||||
pages = pageDAO.findByRoute(page_route);
|
||||
} else {
|
||||
pages = pageDAO.findAll();
|
||||
}
|
||||
|
@ -158,9 +144,7 @@ public class PageController {
|
|||
page.setRoute(communityPage.getRoute());
|
||||
page.setName(communityPage.getName());
|
||||
page.setType(communityPage.getType());
|
||||
page.setConnect(communityPage.getConnect());
|
||||
page.setCommunities(communityPage.getCommunities());
|
||||
page.setOpenaire(communityPage.getOpenaire());
|
||||
page.setDashboardAlias(communityPage.getDashboardAlias());
|
||||
page.setTop(communityPage.getTop());
|
||||
page.setBottom(communityPage.getBottom());
|
||||
page.setLeft(communityPage.getLeft());
|
||||
|
|
|
@ -14,9 +14,7 @@ public interface DivIdDAO {
|
|||
|
||||
DivId findById(String Id);
|
||||
|
||||
List<DivId> findByConnect(boolean connect);
|
||||
List<DivId> findByCommunities(boolean communities);
|
||||
List<DivId> findByOpenaire(boolean openaire);
|
||||
List<DivId> findByDashboardAlias(String dashboardAlias);
|
||||
|
||||
DivId save(DivId divId);
|
||||
|
||||
|
|
|
@ -17,9 +17,7 @@ public interface MongoDBDivIdDAO extends DivIdDAO, MongoRepository<DivId, String
|
|||
|
||||
DivId findById(String Id);
|
||||
|
||||
List<DivId> findByConnect(boolean connect);
|
||||
List<DivId> findByCommunities(boolean communities);
|
||||
List<DivId> findByOpenaire(boolean openaire);
|
||||
List<DivId> findByDashboardAlias(String dashboardAlias);
|
||||
|
||||
DivId save(DivId divId);
|
||||
|
||||
|
|
|
@ -9,16 +9,11 @@ import eu.dnetlib.uoaadmintoolslibrary.entities.Page;
|
|||
|
||||
public interface MongoDBPageDAO extends PageDAO, MongoRepository<Page, String> {
|
||||
List<Page> findAll();
|
||||
List<Page> findByConnect(boolean connect);
|
||||
List<Page> findByCommunities(boolean communities);
|
||||
List<Page> findByOpenaire(boolean openaire);
|
||||
|
||||
Page findByConnectAndRoute(boolean connect, String route);
|
||||
Page findByCommunitiesAndRoute(boolean communities, String route);
|
||||
Page findByOpenaireAndRoute(boolean openaire, String route);
|
||||
List<Page> findByDashboardAlias(String dashboardAlias);
|
||||
List<Page> findByRoute(String route);
|
||||
|
||||
Page findByDashboardAliasAndRoute(String dashboardAlias, String route);
|
||||
Page findById(String Id);
|
||||
Page findByRoute(String route);
|
||||
|
||||
Page save(Page page);
|
||||
|
||||
|
|
|
@ -6,16 +6,11 @@ import eu.dnetlib.uoaadmintoolslibrary.entities.Page;
|
|||
|
||||
public interface PageDAO {
|
||||
List<Page> findAll();
|
||||
List<Page> findByConnect(boolean connect);
|
||||
List<Page> findByCommunities(boolean communities);
|
||||
List<Page> findByOpenaire(boolean openaire);
|
||||
|
||||
Page findByConnectAndRoute(boolean connect, String route);
|
||||
Page findByCommunitiesAndRoute(boolean communities, String route);
|
||||
Page findByOpenaireAndRoute(boolean openaire, String route);
|
||||
List<Page> findByDashboardAlias(String dashboardAlias);
|
||||
List<Page> findByRoute(String route);
|
||||
|
||||
Page findByDashboardAliasAndRoute(String dashboardAlias, String route);
|
||||
Page findById(String Id);
|
||||
Page findByRoute(String route);
|
||||
|
||||
Page save(Page page);
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ public class Community {
|
|||
|
||||
private String pid;
|
||||
private String name;
|
||||
private String alias; // explore, connect, community, monitor
|
||||
private Map<String, Boolean> pages;
|
||||
private Map<String, Boolean> entities;
|
||||
private String layout;
|
||||
|
@ -43,6 +44,14 @@ public class Community {
|
|||
this.name = name;
|
||||
}
|
||||
|
||||
public String getAlias() {
|
||||
return alias;
|
||||
}
|
||||
|
||||
public void setAlias(String alias) {
|
||||
this.alias = alias;
|
||||
}
|
||||
|
||||
public Map<String, Boolean> getPages() { return pages; }
|
||||
|
||||
public void setPages(Map<String, Boolean> pages) { this.pages = pages; }
|
||||
|
|
|
@ -12,18 +12,18 @@ public class DivId {
|
|||
|
||||
private String name;
|
||||
private List<String> pages;
|
||||
private Boolean connect;
|
||||
private Boolean communities;
|
||||
private Boolean openaire;
|
||||
private String dashboardAlias; // explore, connect, community, monitor
|
||||
|
||||
// private Boolean connect;
|
||||
// private Boolean communities;
|
||||
// private Boolean openaire;
|
||||
|
||||
public DivId() {}
|
||||
|
||||
public DivId(DivId divId) {
|
||||
setName(divId.getName());
|
||||
setPages(divId.getPages());
|
||||
setConnect(divId.getConnect());
|
||||
setCommunities(divId.getCommunities());
|
||||
setOpenaire(divId.getOpenaire());
|
||||
setDashboardAlias(divId.getDashboardAlias());
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
@ -50,23 +50,7 @@ public class DivId {
|
|||
this.pages = pages;
|
||||
}
|
||||
|
||||
public Boolean getConnect() {
|
||||
return connect;
|
||||
}
|
||||
public String getDashboardAlias() { return dashboardAlias; }
|
||||
|
||||
public void setConnect(Boolean connect) { this.connect = connect; }
|
||||
|
||||
public Boolean getCommunities() { return communities; }
|
||||
|
||||
public void setCommunities(Boolean communities) {
|
||||
this.communities = communities;
|
||||
}
|
||||
|
||||
public Boolean getOpenaire() {
|
||||
return openaire;
|
||||
}
|
||||
|
||||
public void setOpenaire(Boolean openaire) {
|
||||
this.openaire = openaire;
|
||||
}
|
||||
public void setDashboardAlias(String dashboardAlias) { this.dashboardAlias = dashboardAlias; }
|
||||
}
|
|
@ -14,9 +14,11 @@ public class Page {
|
|||
private String name;
|
||||
private String type;
|
||||
private List<String> entities;
|
||||
private Boolean connect;
|
||||
private Boolean communities;
|
||||
private Boolean openaire;
|
||||
private String dashboardAlias; // explore, connect, community, monitor
|
||||
|
||||
// private Boolean connect;
|
||||
// private Boolean communities;
|
||||
// private Boolean openaire;
|
||||
|
||||
// Positions where help texts are allowed for this page
|
||||
private Boolean top;
|
||||
|
@ -62,27 +64,9 @@ public class Page {
|
|||
|
||||
public void setEntities(List<String> entities) { this.entities = entities; }
|
||||
|
||||
public Boolean getConnect() {
|
||||
return connect;
|
||||
}
|
||||
public String getDashboardAlias() { return dashboardAlias; }
|
||||
|
||||
public void setConnect(Boolean connect) { this.connect = connect; }
|
||||
|
||||
public Boolean getCommunities() {
|
||||
return communities;
|
||||
}
|
||||
|
||||
public void setCommunities(Boolean communities) {
|
||||
this.communities = communities;
|
||||
}
|
||||
|
||||
public Boolean getOpenaire() {
|
||||
return openaire;
|
||||
}
|
||||
|
||||
public void setOpenaire(Boolean openaire) {
|
||||
this.openaire = openaire;
|
||||
}
|
||||
public void setDashboardAlias(String dashboardAlias) { this.dashboardAlias = dashboardAlias; }
|
||||
|
||||
public Boolean getTop() {
|
||||
return top;
|
||||
|
|
|
@ -19,9 +19,11 @@ public class CommunityPage {
|
|||
private String type;
|
||||
private List<Entity> entities;
|
||||
private Boolean isEnabled;
|
||||
private Boolean connect;
|
||||
private Boolean communities;
|
||||
private Boolean openaire;
|
||||
private String dashboardAlias; // explore, connect, community, monitor
|
||||
|
||||
// private Boolean connect;
|
||||
// private Boolean communities;
|
||||
// private Boolean openaire;
|
||||
|
||||
// Posiitions where help texts are allowed for this page
|
||||
private Boolean top;
|
||||
|
@ -36,9 +38,7 @@ public class CommunityPage {
|
|||
this.setRoute(page.getRoute());
|
||||
this.setName(page.getName());
|
||||
this.setType(page.getType());
|
||||
this.setConnect(page.getConnect());
|
||||
this.setCommunities(page.getCommunities());
|
||||
this.setOpenaire(page.getOpenaire());
|
||||
this.setDashboardAlias(page.getDashboardAlias());
|
||||
this.setTop(page.getTop());
|
||||
this.setBottom(page.getBottom());
|
||||
this.setLeft(page.getLeft());
|
||||
|
@ -85,27 +85,9 @@ public class CommunityPage {
|
|||
|
||||
public void setIsEnabled(Boolean isEnabled) { this.isEnabled = isEnabled; }
|
||||
|
||||
public Boolean getConnect() {
|
||||
return connect;
|
||||
}
|
||||
public String getDashboardAlias() { return dashboardAlias; }
|
||||
|
||||
public void setConnect(Boolean connect) { this.connect = connect; }
|
||||
|
||||
public Boolean getCommunities() {
|
||||
return communities;
|
||||
}
|
||||
|
||||
public void setCommunities(Boolean communities) {
|
||||
this.communities = communities;
|
||||
}
|
||||
|
||||
public Boolean getOpenaire() {
|
||||
return openaire;
|
||||
}
|
||||
|
||||
public void setOpenaire(Boolean openaire) {
|
||||
this.openaire = openaire;
|
||||
}
|
||||
public void setDashboardAlias(String dashboardAlias) { this.dashboardAlias = dashboardAlias; }
|
||||
|
||||
public Boolean getTop() {
|
||||
return top;
|
||||
|
|
|
@ -15,18 +15,18 @@ public class DivIdResponse {
|
|||
|
||||
private String name;
|
||||
private List<Page> pages;
|
||||
private Boolean connect;
|
||||
private Boolean communities;
|
||||
private Boolean openaire;
|
||||
private String dashboardAlias; // explore, connect, community, monitor
|
||||
|
||||
// private Boolean connect;
|
||||
// private Boolean communities;
|
||||
// private Boolean openaire;
|
||||
|
||||
public DivIdResponse() {}
|
||||
|
||||
public DivIdResponse(DivId divId) {
|
||||
this.id = divId.getId();
|
||||
this.name = divId.getName();
|
||||
setConnect(divId.getConnect());
|
||||
setCommunities(divId.getCommunities());
|
||||
setOpenaire(divId.getOpenaire());
|
||||
setId(divId.getId());
|
||||
setName(divId.getName());
|
||||
setDashboardAlias(divId.getDashboardAlias());
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
@ -53,23 +53,7 @@ public class DivIdResponse {
|
|||
this.pages = pages;
|
||||
}
|
||||
|
||||
public Boolean getConnect() {
|
||||
return connect;
|
||||
}
|
||||
public String getDashboardAlias() { return dashboardAlias; }
|
||||
|
||||
public void setConnect(Boolean connect) { this.connect = connect; }
|
||||
|
||||
public Boolean getCommunities() { return communities; }
|
||||
|
||||
public void setCommunities(Boolean communities) {
|
||||
this.communities = communities;
|
||||
}
|
||||
|
||||
public Boolean getOpenaire() {
|
||||
return openaire;
|
||||
}
|
||||
|
||||
public void setOpenaire(Boolean openaire) {
|
||||
this.openaire = openaire;
|
||||
}
|
||||
public void setDashboardAlias(String dashboardAlias) { this.dashboardAlias = dashboardAlias; }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue