Marketing Cloud SDK / com.salesforce.marketingcloud.registration / RegistrationManager / Editor

Editor

interface Editor

This class handles the setting of customer configurable values in the SDK. All validation for length, type, nullability, etc. is completed within the editor. When the editor's commit method is called the SDK will compare the running configuration to the previously successfully processed configuration. If there have been any changes they will be stored locally and transmitted to the Marketing Cloud Servers.

Functions

addTag

Adds the provided to tag to the registration.

abstract fun addTag(tag: String): Editor

addTags

Adds the Iterable provided to tags.

abstract fun addTags(tags: MutableIterable<String!>): Editor

Adds the Collection provided to tags.

abstract fun addTags(vararg tags: String!): Editor

clearAttribute

Clear the value for the attributes of the key provided.

abstract fun clearAttribute(key: String): Editor

clearAttributes

Clear the value for the attribute of the keys provided.

abstract fun clearAttributes(keys: MutableIterable<String!>): Editor

Clear the value for the attributes of the keys provided.

abstract fun clearAttributes(vararg keys: String!): Editor

clearTags

Removes all customer configured tags.

abstract fun clearTags(): Editor

commit

You must call this method for your changes to be stored locally and transmitted to the Marketing Cloud Servers.

abstract fun commit(): Boolean

removeTag

Removes the provided tag from the tags in your registration.

abstract fun removeTag(tag: String): Editor

removeTags

Removes the tags provided from the registration

abstract fun removeTags(tags: MutableIterable<String!>): Editor

Removes the Collection provided from tags.

abstract fun removeTags(vararg tags: String!): Editor

setAttribute

Sets a key/value pair as an attribute in the registration. This key must already exist in your Marketing Cloud Server configuration. There is no way to add an attribute from the SDK.

abstract fun setAttribute(key: String, value: String): Editor

setContactKey

Setter for contactKey which was formerly known in the SDK as SubscriberKey. The name was changed to align the SDK's nomenclature with the Marketing Cloud Contacts DB.

abstract fun setContactKey(contactKey: String): Editor

setSignedString

Setter for "Signed String" in the SDK. The value is passed through the SDK to the Marketing Cloud Servers and can be used as a means to authenticate devices/contacts.

abstract fun setSignedString(signedString: String?): Editor