From 1e51d9755db6b8b035ca1ebeedece300320ce774 Mon Sep 17 00:00:00 2001 From: Steve Benedick Date: Tue, 25 Jun 2024 11:05:26 -0600 Subject: [PATCH] -more feedback from pr and adding ContentType enum --- gatsby-config.js | 4 ++ .../public-classes/content-card.md | 4 +- .../public-classes/content-type.md | 45 +++++++++++++++ .../public-classes/index.md | 1 + .../public-classes/tabs/content-type.md | 57 +++++++++++++++++++ 5 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 src/pages/edge/adobe-journey-optimizer/public-classes/content-type.md create mode 100644 src/pages/edge/adobe-journey-optimizer/public-classes/tabs/content-type.md diff --git a/gatsby-config.js b/gatsby-config.js index 211043c400..da24c2ebbb 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -265,6 +265,10 @@ module.exports = { title: "ContentCardSchemaData", path: "/edge/adobe-journey-optimizer/public-classes/content-card-schema-data" }, + { + title: "ContentType", + path: "/edge/adobe-journey-optimizer/public-classes/content-type" + }, { title: "HtmlContentSchemaData", path: "/edge/adobe-journey-optimizer/public-classes/html-content-schema-data" diff --git a/src/pages/edge/adobe-journey-optimizer/public-classes/content-card.md b/src/pages/edge/adobe-journey-optimizer/public-classes/content-card.md index 58128a42b6..3c02e3fa25 100644 --- a/src/pages/edge/adobe-journey-optimizer/public-classes/content-card.md +++ b/src/pages/edge/adobe-journey-optimizer/public-classes/content-card.md @@ -133,8 +133,8 @@ public void track(final String interaction, final MessagingEdgeEventType eventTy ContentCard contentCard; // tracking a display -contentCardSchemaData.track(null, MessagingEdgeEventType.display); +contentCard.track(null, MessagingEdgeEventType.display); // tracking a user interaction -contentCardSchemaData.track("itemSelected", MessagingEdgeEventType.interact); +contentCard.track("itemSelected", MessagingEdgeEventType.interact); ``` diff --git a/src/pages/edge/adobe-journey-optimizer/public-classes/content-type.md b/src/pages/edge/adobe-journey-optimizer/public-classes/content-type.md new file mode 100644 index 0000000000..8f46201274 --- /dev/null +++ b/src/pages/edge/adobe-journey-optimizer/public-classes/content-type.md @@ -0,0 +1,45 @@ +--- +title: ContentType +description: Enum representing the ContentTypes used in schema-based objects. +keywords: +- Adobe Journey Optimizer +- Messaging +- iOS +- Android +- Proposition +- Schema +- ContentType +- Content type +--- + +import Tabs from './tabs/content-type.md' + +# Enum - ContentType + +Enum representing content types found within a schema object. + +## Definition + + + +Android + + + +iOS + + + +## String values + +Below is the table of values returned by calling the `toString` method for each case: + + + +Android + + + +iOS + + diff --git a/src/pages/edge/adobe-journey-optimizer/public-classes/index.md b/src/pages/edge/adobe-journey-optimizer/public-classes/index.md index 58d0958473..105e44bc38 100644 --- a/src/pages/edge/adobe-journey-optimizer/public-classes/index.md +++ b/src/pages/edge/adobe-journey-optimizer/public-classes/index.md @@ -31,6 +31,7 @@ This documents lists details about the public classes and enums available in Mes * [Class - Proposition](./proposition.md) * [Class - PropositionItem](./proposition-item.md) * [Class - Surface](./surface.md) +* [Enum - ContentType](./content-type.md) * [Enum - MessagingEdgeEventType](./messaging-edge-event-type.md) * [Schema Class - ContentCardSchemaData](./content-card-schema-data.md) * [Schema Class - HtmlContentSchemaData](./html-content-schema-data.md) diff --git a/src/pages/edge/adobe-journey-optimizer/public-classes/tabs/content-type.md b/src/pages/edge/adobe-journey-optimizer/public-classes/tabs/content-type.md new file mode 100644 index 0000000000..b4d0ce09f5 --- /dev/null +++ b/src/pages/edge/adobe-journey-optimizer/public-classes/tabs/content-type.md @@ -0,0 +1,57 @@ +--- +noIndex: true +--- + + + +#### Java + +```java +public enum ContentType { + APPLICATION_JSON(0), + TEXT_HTML(1), + TEXT_XML(2), + TEXT_PLAIN(3), + UNKNOWN(4); + + @Override + public String toString(); +} +``` + + + +#### Swift + +```swift +@objc(AEPContentType) +public enum ContentType: Int, Codable { + case applicationJson = 0 + case textHtml = 1 + case textXml = 2 + case textPlain = 3 + case unknown = 4 + + public func toString() -> String +} +``` + + + +| Case | String value | +| ---- | ------------ | +| `APPLICATION_JSON` | `application/json` | +| `TEXT_HTML` | `text/html` | +| `TEXT_XML` | `text/xml` | +| `TEXT_PLAIN` | `text/plain` | +| `UNKNOWN` | (empty string) | + + + +| Case | String value | +| ---- | ------------ | +| `.applicationJson` | `application/json` | +| `.testHtml` | `text/html` | +| `.textXml` | `text/xml` | +| `.textPlain` | `text/plain` | +| `.unknown` | (empty string) |