diff --git a/src/main/java/org/eclipsefoundation/marketplace/dto/Listing.java b/src/main/java/org/eclipsefoundation/marketplace/dto/Listing.java index 40c5c013a2286a9fd3f9e12b88ce8c1e7e1f327e..d1a7cb38c4654bd2021cd2eab567f577ba762c54 100644 --- a/src/main/java/org/eclipsefoundation/marketplace/dto/Listing.java +++ b/src/main/java/org/eclipsefoundation/marketplace/dto/Listing.java @@ -385,7 +385,7 @@ public class Listing extends NodeBase { StringBuilder sb = new StringBuilder(); sb.append("Listing ["); sb.append(", id=").append(getId()); - sb.append(", name=").append(getName()); + sb.append(", name=").append(getTitle()); sb.append(", url=").append(getUrl()); sb.append(", supportUrl=").append(supportUrl); sb.append(", homepageUrl=").append(homepageUrl); diff --git a/src/main/java/org/eclipsefoundation/marketplace/dto/NodeBase.java b/src/main/java/org/eclipsefoundation/marketplace/dto/NodeBase.java index 278f294c6c834f67777103e0b1f13e0127790015..3035305471ad5d20027282dec8269f79bd256c39 100644 --- a/src/main/java/org/eclipsefoundation/marketplace/dto/NodeBase.java +++ b/src/main/java/org/eclipsefoundation/marketplace/dto/NodeBase.java @@ -15,7 +15,7 @@ import java.util.Objects; */ public class NodeBase { private String id; - private String name; + private String title; private String url; /** @@ -33,17 +33,17 @@ public class NodeBase { } /** - * @return the name + * @return the title */ - public String getName() { - return name; + public String getTitle() { + return title; } /** - * @param name the name to set + * @param title the title to set */ - public void setName(String name) { - this.name = name; + public void setTitle(String title) { + this.title = title; } /** @@ -62,7 +62,7 @@ public class NodeBase { @Override public int hashCode() { - return Objects.hash(id, name, url); + return Objects.hash(id, title, url); } @Override @@ -77,6 +77,6 @@ public class NodeBase { return false; } NodeBase other = (NodeBase) obj; - return Objects.equals(id, other.id) && Objects.equals(name, other.name) && Objects.equals(url, other.url); + return Objects.equals(id, other.id) && Objects.equals(title, other.title) && Objects.equals(url, other.url); } } diff --git a/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/CatalogCodec.java b/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/CatalogCodec.java index 15626de124aa3256158b718275be6b370a1e5b1a..cfa9cd71b7aec8358e792803193c185592c458e2 100644 --- a/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/CatalogCodec.java +++ b/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/CatalogCodec.java @@ -51,7 +51,7 @@ public class CatalogCodec implements CollectibleCodec<Catalog> { Document doc = new Document(); doc.put(DatabaseFieldNames.DOCID, value.getId()); - doc.put(DatabaseFieldNames.NAME, value.getName()); + doc.put(DatabaseFieldNames.TITLE, value.getTitle()); doc.put(DatabaseFieldNames.URL, value.getUrl()); doc.put(DatabaseFieldNames.CATALOG_ICON, value.getIcon()); doc.put(DatabaseFieldNames.CATALOG_SELF_CONTAINED, value.isSelfContained()); @@ -73,7 +73,7 @@ public class CatalogCodec implements CollectibleCodec<Catalog> { Catalog out = new Catalog(); out.setId(document.getString(DatabaseFieldNames.DOCID)); out.setUrl(document.getString(DatabaseFieldNames.URL)); - out.setName(document.getString(DatabaseFieldNames.NAME)); + out.setTitle(document.getString(DatabaseFieldNames.TITLE)); out.setIcon(document.getString(DatabaseFieldNames.CATALOG_ICON)); out.setSelfContained(document.getBoolean(DatabaseFieldNames.CATALOG_SELF_CONTAINED)); out.setSearchEnabled(document.getBoolean(DatabaseFieldNames.CATALOG_SEARCH_ENABLED)); diff --git a/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/ErrorReportCodec.java b/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/ErrorReportCodec.java index ac2915a6e192399df5f05457991605237a41c024..e8dc9b5f7541352259f5fe751fa1ebb915b9a6af 100644 --- a/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/ErrorReportCodec.java +++ b/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/ErrorReportCodec.java @@ -43,7 +43,7 @@ public class ErrorReportCodec implements CollectibleCodec<ErrorReport> { Document doc = new Document(); doc.put(DatabaseFieldNames.DOCID, value.getId()); - doc.put(DatabaseFieldNames.NAME, value.getTitle()); + doc.put(DatabaseFieldNames.TITLE, value.getTitle()); doc.put(DatabaseFieldNames.ERROR_BODY, value.getBody()); doc.put(DatabaseFieldNames.ERROR_DETAILED_MESSAGE, value.getDetailedMessage()); doc.put(DatabaseFieldNames.ERROR_READ, value.isRead()); diff --git a/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/ListingCodec.java b/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/ListingCodec.java index 59dc2f055bdc2709342d499ca3e5f7a57a37f39c..19daaffe552d45d451e47aae56f38d7ed54a98a8 100644 --- a/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/ListingCodec.java +++ b/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/ListingCodec.java @@ -65,7 +65,7 @@ public class ListingCodec implements CollectibleCodec<Listing> { // for each of the fields, get the value from the unencoded object and set it doc.put(DatabaseFieldNames.DOCID, value.getId()); - doc.put(DatabaseFieldNames.NAME, value.getName()); + doc.put(DatabaseFieldNames.TITLE, value.getTitle()); doc.put(DatabaseFieldNames.URL, value.getUrl()); doc.put(DatabaseFieldNames.SUPPORT_PAGE_URL, value.getSupportUrl()); doc.put(DatabaseFieldNames.HOME_PAGE_URL, value.getHomepageUrl()); @@ -105,7 +105,7 @@ public class ListingCodec implements CollectibleCodec<Listing> { // for each field, get the value from the encoded object and set it in POJO out.setId(document.getString(DatabaseFieldNames.DOCID)); - out.setName(document.getString(DatabaseFieldNames.NAME)); + out.setTitle(document.getString(DatabaseFieldNames.TITLE)); out.setUrl(document.getString(DatabaseFieldNames.URL)); out.setSupportUrl(document.getString(DatabaseFieldNames.SUPPORT_PAGE_URL)); out.setHomepageUrl(document.getString(DatabaseFieldNames.HOME_PAGE_URL)); diff --git a/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/MarketCodec.java b/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/MarketCodec.java index 610a0360f5164f7fbc08c8196132f289335d246f..4a2631d713fdbfd81bf0d08a1d35967809fa81eb 100644 --- a/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/MarketCodec.java +++ b/src/main/java/org/eclipsefoundation/marketplace/dto/codecs/MarketCodec.java @@ -47,7 +47,7 @@ public class MarketCodec implements CollectibleCodec<Market> { doc.put(DatabaseFieldNames.DOCID, value.getId()); doc.put(DatabaseFieldNames.URL, value.getUrl()); - doc.put(DatabaseFieldNames.NAME, value.getName()); + doc.put(DatabaseFieldNames.TITLE, value.getTitle()); doc.put(DatabaseFieldNames.CATEGORY_IDS, value.getCategoryIds()); documentCodec.encode(writer, doc, encoderContext); @@ -64,7 +64,7 @@ public class MarketCodec implements CollectibleCodec<Market> { Market out = new Market(); out.setId(document.getString(DatabaseFieldNames.DOCID)); out.setUrl(document.getString(DatabaseFieldNames.URL)); - out.setName(document.getString(DatabaseFieldNames.NAME)); + out.setTitle(document.getString(DatabaseFieldNames.TITLE)); return out; } diff --git a/src/main/java/org/eclipsefoundation/marketplace/dto/converters/CategoryConverter.java b/src/main/java/org/eclipsefoundation/marketplace/dto/converters/CategoryConverter.java index d887ae2e94504b4b9c314a4ed11b53b3ae98865a..14d0aaf62da8f20668f0dedff399f4d5a8743abd 100644 --- a/src/main/java/org/eclipsefoundation/marketplace/dto/converters/CategoryConverter.java +++ b/src/main/java/org/eclipsefoundation/marketplace/dto/converters/CategoryConverter.java @@ -21,7 +21,7 @@ public class CategoryConverter implements Converter<Category> { public Category convert(Document src) { Category out = new Category(); out.setId(src.getString(DatabaseFieldNames.DOCID)); - out.setName(src.getString(DatabaseFieldNames.NAME)); + out.setTitle(src.getString(DatabaseFieldNames.TITLE)); out.setUrl(src.getString(DatabaseFieldNames.URL)); return out; } @@ -30,7 +30,7 @@ public class CategoryConverter implements Converter<Category> { public Document convert(Category src) { Document doc = new Document(); doc.put(DatabaseFieldNames.DOCID, src.getId()); - doc.put(DatabaseFieldNames.NAME, src.getName()); + doc.put(DatabaseFieldNames.TITLE, src.getTitle()); doc.put(DatabaseFieldNames.URL, src.getUrl()); return doc; } diff --git a/src/main/java/org/eclipsefoundation/marketplace/namespace/DatabaseFieldNames.java b/src/main/java/org/eclipsefoundation/marketplace/namespace/DatabaseFieldNames.java index 91306cf2e4bdfb7c6529598f34dc9e3c362255d5..bad77d419d83968eb683170a0d8146b1dee5dca6 100644 --- a/src/main/java/org/eclipsefoundation/marketplace/namespace/DatabaseFieldNames.java +++ b/src/main/java/org/eclipsefoundation/marketplace/namespace/DatabaseFieldNames.java @@ -20,7 +20,7 @@ public final class DatabaseFieldNames { // base fields public static final String DOCID = "_id"; public static final String URL = "url"; - public static final String NAME = "name"; + public static final String TITLE = "title"; public static final String OS = "os"; public static final String LISTING_ID = "listing_id";