Class ReviewDraftImpl
- All Implemented Interfaces:
CustomizableDraft<ReviewDraft>
,ReviewDraft
,WithKey
,io.vrap.rmf.base.client.Draft<ReviewDraft>
,io.vrap.rmf.base.client.ModelBase
When creating a new Review, at least one of title
, text
or rating
should be set.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Name of the author.Custom Fields for the Review.Customer who created the Review.getKey()
User-defined unique identifier for the Review.Language in which the content of the Review is written.Rating of the targeted Product or Channel.getState()
State of the Review.Draft type to create a Reference or a KeyReference to a resource.getText()
Content of the Review.getTitle()
Title of the Review.If set, this value must be unique among Reviews.int
hashCode()
void
setAuthorName
(String authorName) Name of the author.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the Review.void
setCustomer
(CustomerResourceIdentifier customer) Customer who created the Review.void
User-defined unique identifier for the Review.void
Language in which the content of the Review is written.void
Rating of the targeted Product or Channel.void
setState
(StateResourceIdentifier state) State of the Review.void
setTarget
(ResourceIdentifier target) Draft type to create a Reference or a KeyReference to a resource.void
Content of the Review.void
Title of the Review.void
setUniquenessValue
(String uniquenessValue) If set, this value must be unique among Reviews.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.review.ReviewDraft
setTarget, withReviewDraft
-
Constructor Details
-
ReviewDraftImpl
public ReviewDraftImpl()create empty instance
-
-
Method Details
-
getKey
User-defined unique identifier for the Review.
- Specified by:
getKey
in interfaceReviewDraft
- Specified by:
getKey
in interfaceWithKey
- Returns:
- key
-
getUniquenessValue
If set, this value must be unique among Reviews. For example, if you want to have only one Review per Customer and per Product, you can set the value to Customer
id
+ Productid
.- Specified by:
getUniquenessValue
in interfaceReviewDraft
- Returns:
- uniquenessValue
-
getLocale
Language in which the content of the Review is written.
- Specified by:
getLocale
in interfaceReviewDraft
- Returns:
- locale
-
getAuthorName
Name of the author.
- Specified by:
getAuthorName
in interfaceReviewDraft
- Returns:
- authorName
-
getTitle
Title of the Review.
- Specified by:
getTitle
in interfaceReviewDraft
- Returns:
- title
-
getText
Content of the Review.
- Specified by:
getText
in interfaceReviewDraft
- Returns:
- text
-
getTarget
Draft type to create a Reference or a KeyReference to a resource. Provide either the
id
or (wherever supported) thekey
of the resource to reference, but depending on the API endpoint the response returns either a Reference or a KeyReference. For example, the fieldparent
of a CategoryDraft takes a ResourceIdentifier for its value while the value of the corresponding field of a Category is a Reference.Each resource type has its corresponding ResourceIdentifier, like ChannelResourceIdentifier.
- Specified by:
getTarget
in interfaceReviewDraft
- Returns:
- target
-
getState
State of the Review. Used for approval processes, see Review approval process for details.
- Specified by:
getState
in interfaceReviewDraft
- Returns:
- state
-
getRating
Rating of the targeted Product or Channel. This rating can represent the number of stars, a percentage, or a like (+1)/dislike (-1). A rating is used in the ratings statistics of the targeted object, unless the Review is in a State that does not have the role
ReviewIncludedInStatistics
.- Specified by:
getRating
in interfaceReviewDraft
- Returns:
- rating
-
getCustomer
Customer who created the Review.
- Specified by:
getCustomer
in interfaceReviewDraft
- Returns:
- customer
-
getCustom
Custom Fields for the Review.
- Specified by:
getCustom
in interfaceCustomizableDraft<ReviewDraft>
- Specified by:
getCustom
in interfaceReviewDraft
- Returns:
- custom
-
setKey
Description copied from interface:ReviewDraft
User-defined unique identifier for the Review.
- Specified by:
setKey
in interfaceReviewDraft
- Parameters:
key
- value to be set
-
setUniquenessValue
Description copied from interface:ReviewDraft
If set, this value must be unique among Reviews. For example, if you want to have only one Review per Customer and per Product, you can set the value to Customer
id
+ Productid
.- Specified by:
setUniquenessValue
in interfaceReviewDraft
- Parameters:
uniquenessValue
- value to be set
-
setLocale
Description copied from interface:ReviewDraft
Language in which the content of the Review is written.
- Specified by:
setLocale
in interfaceReviewDraft
- Parameters:
locale
- value to be set
-
setAuthorName
Description copied from interface:ReviewDraft
Name of the author.
- Specified by:
setAuthorName
in interfaceReviewDraft
- Parameters:
authorName
- value to be set
-
setTitle
Description copied from interface:ReviewDraft
Title of the Review.
- Specified by:
setTitle
in interfaceReviewDraft
- Parameters:
title
- value to be set
-
setText
Description copied from interface:ReviewDraft
Content of the Review.
- Specified by:
setText
in interfaceReviewDraft
- Parameters:
text
- value to be set
-
setTarget
Description copied from interface:ReviewDraft
Draft type to create a Reference or a KeyReference to a resource. Provide either the
id
or (wherever supported) thekey
of the resource to reference, but depending on the API endpoint the response returns either a Reference or a KeyReference. For example, the fieldparent
of a CategoryDraft takes a ResourceIdentifier for its value while the value of the corresponding field of a Category is a Reference.Each resource type has its corresponding ResourceIdentifier, like ChannelResourceIdentifier.
- Specified by:
setTarget
in interfaceReviewDraft
- Parameters:
target
- value to be set
-
setState
Description copied from interface:ReviewDraft
State of the Review. Used for approval processes, see Review approval process for details.
- Specified by:
setState
in interfaceReviewDraft
- Parameters:
state
- value to be set
-
setRating
Description copied from interface:ReviewDraft
Rating of the targeted Product or Channel. This rating can represent the number of stars, a percentage, or a like (+1)/dislike (-1). A rating is used in the ratings statistics of the targeted object, unless the Review is in a State that does not have the role
ReviewIncludedInStatistics
.- Specified by:
setRating
in interfaceReviewDraft
- Parameters:
rating
- value to be set
-
setCustomer
Description copied from interface:ReviewDraft
Customer who created the Review.
- Specified by:
setCustomer
in interfaceReviewDraft
- Parameters:
customer
- value to be set
-
setCustom
Description copied from interface:ReviewDraft
Custom Fields for the Review.
- Specified by:
setCustom
in interfaceCustomizableDraft<ReviewDraft>
- Specified by:
setCustom
in interfaceReviewDraft
- Parameters:
custom
- value to be set
-
equals
-
hashCode
-