Package

eu.shiftforward.adstax.ups

api

Permalink

package api

Visibility
  1. Public
  2. All

Type Members

  1. sealed trait AttributesMergingStrategy extends AnyRef

    Permalink

    A strategy to merge two sets of user attributes.

  2. sealed trait BasicSingleAttributeMergingStrategy extends SingleAttributeMergingStrategy

    Permalink

    A basic strategy to merge two attributes, not taking any period into account.

  3. case class DeleteUser(userId: UserId) extends UserProfileStorageRequest with Product with Serializable

    Permalink

    A request to delete the information about a user.

    A request to delete the information about a user.

    userId

    the identifier of the user

  4. case class DeleteUserAttribute(userId: UserId, attributeName: String) extends UserProfileStorageRequest with Product with Serializable

    Permalink

    A request to delete an attribute of a user.

    A request to delete an attribute of a user.

    userId

    the identifier of the user

    attributeName

    the name of the attribute

  5. case class GetIds(userId: UserId) extends UserProfileStorageRequest with Product with Serializable

    Permalink

    A request to fetch the set of ids associated with a given user

    A request to fetch the set of ids associated with a given user

    userId

    the id of the user to fetch the set of ids for

  6. case class GetIdsAndData(userId: UserId) extends UserProfileStorageRequest with Product with Serializable

    Permalink

    A request to retrieve the set of ids associated with a given user along with its attributes.

    A request to retrieve the set of ids associated with a given user along with its attributes.

    userId

    the id of the user to fetch the set of ids and attributes for

  7. case class GetIdsAndDataResponse(ids: Set[UserId], data: Option[UserData]) extends UserProfileStorageResponse with Product with Serializable

    Permalink

    The response for a GetIdsAndData request.

    The response for a GetIdsAndData request.

    ids

    the set of ids associated with the user

    data

    the attributes and computed attributes values associated with the user wrapped in a Some if the user exists, None otherwise.

  8. case class GetIdsResponse(ids: Set[UserId]) extends UserProfileStorageResponse with Product with Serializable

    Permalink

    The response for a GetIds request.

  9. case class GetUser(userId: UserId) extends UserProfileStorageRequest with Product with Serializable

    Permalink

    A request to retrieve all attributes of a user.

    A request to retrieve all attributes of a user.

    userId

    the identifier of the user

  10. case class GetUserAttributeResponse(attributeValue: Option[Json]) extends UserProfileStorageResponse with Product with Serializable

    Permalink

    The response for a GetUserBaseAttribute or a GetUserComputedAttribute request.

    The response for a GetUserBaseAttribute or a GetUserComputedAttribute request.

    attributeValue

    the attribute value for the requested key wrapped in a Some if the user and the attribute exists, None otherwise

  11. case class GetUserBaseAttribute(userId: UserId, name: String) extends UserProfileStorageRequest with Product with Serializable

    Permalink

    A request to retrieve a single base attribute of a user.

    A request to retrieve a single base attribute of a user.

    userId

    the identifier of the user

    name

    the name of the base attribute

  12. case class GetUserComputedAttribute(userId: UserId, name: String) extends UserProfileStorageRequest with Product with Serializable

    Permalink

    A request to retrieve a single computed attribute of a user.

    A request to retrieve a single computed attribute of a user.

    userId

    the identifier of the user

    name

    the name of the computed attribute

  13. case class GetUserResponse(data: Option[UserData]) extends UserProfileStorageResponse with Product with Serializable

    Permalink

    The response for a GetUser request.

    The response for a GetUser request.

    data

    the attributes and computed attributes values associated with the user wrapped in a Some if the user exists, None otherwise.

  14. case class LinkUsers(userId1: UserId, userId2: UserId, source: Option[String]) extends UserProfileStorageRequest with Product with Serializable

    Permalink

    A request to link the two users.

    A request to link the two users.

    userId1

    the identifier of the first user

    userId2

    the identifier of the second user

    source

    an optional source for the link

  15. case class PeriodicSingleAttributeMergingStrategy(period: FiniteDuration, strategy: BasicSingleAttributeMergingStrategy) extends SingleAttributeMergingStrategy with Product with Serializable

    Permalink

    A strategy to merge two attributes in the provided period.

  16. case class ResetLinks(source: String) extends UserProfileStorageRequest with Product with Serializable

    Permalink

    A request to reset the links of a given source.

    A request to reset the links of a given source.

    source

    the source to be reset

  17. case class SetMergeStrategy(name: String, mergeStrategy: SingleAttributeMergingStrategy) extends UserProfileStorageRequest with Product with Serializable

    Permalink

    A request to set the merge strategy of a given base attribute.

    A request to set the merge strategy of a given base attribute.

    name

    the name of the base attribute whose merge strategy is to be set

    mergeStrategy

    the merge strategy to set for the attribute

  18. sealed trait SingleAttributeMergingStrategy extends AnyRef

    Permalink

    A strategy to merge two attributes.

  19. case class UpdateUser(userId: UserId, attributes: UserAttributes, mergeStrategy: AttributesMergingStrategy) extends UserProfileStorageRequest with Product with Serializable

    Permalink

    A request to update the information about a user.

    A request to update the information about a user.

    userId

    the identifier of the user

    attributes

    the attributes to update the user with

    mergeStrategy

    the strategy to use when merging the attributes

  20. case class UserAttributes(attributes: Map[String, Json]) extends Product with Serializable

    Permalink

    The attribute set of a user.

    The attribute set of a user.

    attributes

    the map from attribute names to values

  21. case class UserData(baseAttributes: UserAttributes, computedAttributes: UserAttributes) extends Product with Serializable

    Permalink

    A structure containing all the attributes of a user.

    A structure containing all the attributes of a user.

    baseAttributes

    the base attribute set of the user

    computedAttributes

    the computed attributes of the user

  22. case class UserId(idType: String, id: String) extends Product with Serializable

    Permalink

    A fully qualified user identifier.

    A fully qualified user identifier.

    idType

    the type of identifier

    id

    the identifier

  23. trait UserProfileStorageClient extends AnyRef

    Permalink

    Interface for clients capable of interacting with the User Profile Storage module by retrieving, updating or deleting information about users.

  24. sealed trait UserProfileStorageRequest extends AnyRef

    Permalink

    A request to be sent to the User Profile Storage module.

  25. sealed trait UserProfileStorageResponse extends AnyRef

    Permalink

    A response from the User Profile Storage module to a UserProfileStorageRequest.

Value Members

  1. object And extends BasicSingleAttributeMergingStrategy with Product with Serializable

    Permalink

    Attribute merging strategy that performs a boolean AND between both attribute values.

    Attribute merging strategy that performs a boolean AND between both attribute values. When merging two attributes, attribute values that are not booleans nor can't be directly converted to one are considered to be booleans with value true.

    Numbers with value different from 0 are converted to booleans with value true. Numbers with value equal to 0 are converted to booleans with value false. Strings with value "true" are converted to booleans with value true. Strings with value "false" are converted to booleans with value false. Strings whose value can be parsed to a Double follow the rules of the number conversion enumerated above.

  2. object AttributesMergingStrategy

    Permalink
  3. object BasicSingleAttributeMergingStrategy

    Permalink
  4. object Concatenate extends BasicSingleAttributeMergingStrategy with Product with Serializable

    Permalink

    Attribute merging strategy that joins all the individual elements of both attribute values in a single array.

    Attribute merging strategy that joins all the individual elements of both attribute values in a single array. When merging two attributes, attribute values that are not arrays are converted to an array whose value is a sequence with a single element: the value of the attribute prior to the conversion.

  5. object DeleteUserAttributeResponse extends UserProfileStorageResponse with Product with Serializable

    Permalink

    The response for a DeleteUserAttribute request.

  6. object DeleteUserResponse extends UserProfileStorageResponse with Product with Serializable

    Permalink

    The response for a DeleteUser request.

  7. object LinkUsersResponse extends UserProfileStorageResponse with Product with Serializable

    Permalink

    The response for a LinkUsers request.

  8. object MapMerge extends BasicSingleAttributeMergingStrategy with Product with Serializable

    Permalink

    Attribute merging strategy that merges the attribute values, provided that they are both maps.

    Attribute merging strategy that merges the attribute values, provided that they are both maps. When conflicting keys arise, this merging strategy preferes the value of the most recently changed user. When merging two attributes, attribute values that are not maps are considered to be an empty map.

  9. object Max extends BasicSingleAttributeMergingStrategy with Product with Serializable

    Permalink

    Attribute merging strategy that uses the max of both attribute values as the final one.

    Attribute merging strategy that uses the max of both attribute values as the final one. When merging two attributes, attribute values that are not numbers nor can't be directly converted to one are considered to be numbers with value Double.MinValue.

    Strings whose value can be parsed to a double can be converted to a number. Booleans with value false can be converted to a number with value 0. Booleans with value true can be converted to a number with value 1.

  10. object MergeMergingStrategy extends AttributesMergingStrategy with Product with Serializable

    Permalink

    Simple attributes merge strategy that updates the old attributes with the most recent ones.

    Simple attributes merge strategy that updates the old attributes with the most recent ones. Attributes that were only present in the old attributes are preserved. SingleAttributeMergingStrategys are applied for individual attributes when using this attributes merge strategy.

    Example: [(a, 1), (b, 1)] * [(a, 3), (c, 1)] = [(a, 3), (b, 1), (c, 1)]

  11. object Min extends BasicSingleAttributeMergingStrategy with Product with Serializable

    Permalink

    Attribute merging strategy that uses the min of both attribute values as the final one.

    Attribute merging strategy that uses the min of both attribute values as the final one. When merging two attributes, attribute values that are not numbers nor can't be directly converted to one are considered to be numbers with value Double.MaxValue.

    Strings whose value can be parsed to a double can be converted to a number. Booleans with value false can be converted to a number with value 0. Booleans with value true can be converted to a number with value 1.

  12. object MostRecent extends BasicSingleAttributeMergingStrategy with Product with Serializable

    Permalink

    Attribute merging strategy that prefers the attribute value of the most recently changed user when merging attributes.

  13. object Older extends BasicSingleAttributeMergingStrategy with Product with Serializable

    Permalink

    Attribute merging strategy that prefers the attribute value of the least recently changed user when merging attributes.

  14. object Or extends BasicSingleAttributeMergingStrategy with Product with Serializable

    Permalink

    Attribute merging strategy that performs a boolean OR between both attribute values.

    Attribute merging strategy that performs a boolean OR between both attribute values. When merging two attributes, attribute values that are not booleans nor can't be directly converted to one are considered to be booleans with value false.

    Numbers with value different from 0 are converted to booleans with value true. Numbers with value equal to 0 are converted to booleans with value false. Strings with value "true" are converted to booleans with value true. Strings with value "false" are converted to booleans with value false. Strings whose value can be parsed to a Double follow the rules of the number conversion enumerated above.

  15. object PeriodicSingleAttributeMergingStrategy extends Serializable

    Permalink
  16. object ReplaceMergingStrategy extends AttributesMergingStrategy with Product with Serializable

    Permalink

    Simple attribute merge strategy that overwrites the old attributes with new attributes, removing all old attributes.

    Simple attribute merge strategy that overwrites the old attributes with new attributes, removing all old attributes.

    Example: [(a, 1), (b, 1)] * [(a, 3), (c, 1)] = [(a, 3), (c, 1)]

  17. object ResetLinksResponse extends UserProfileStorageResponse with Product with Serializable

    Permalink

    The response for a ResetLinks request.

  18. object SetMergeStrategyResponse extends UserProfileStorageResponse with Product with Serializable

    Permalink

    The response for a SetMergeStrategy request.

  19. object SingleAttributeMergingStrategy

    Permalink
  20. object Sum extends BasicSingleAttributeMergingStrategy with Product with Serializable

    Permalink

    Attribute merging strategy that sums both attribute values when merging attributes.

    Attribute merging strategy that sums both attribute values when merging attributes. When merging two attributes, attribute values that are not numbers nor can't be directly converted to one are considered to be numbers with value 0.

    Strings whose value can be parsed to a double can be converted to a number. Booleans with value false can be converted to a number with value 0. Booleans with value true can be converted to a number with value 1.

  21. object UpdateUserResponse extends UserProfileStorageResponse with Product with Serializable

    Permalink

    The response for an UpdateUser request.

  22. object UserAttributes extends Serializable

    Permalink
  23. object UserData extends Serializable

    Permalink
  24. object UserId extends Serializable

    Permalink

Ungrouped