Class ContentResolverRequest
- All Implemented Interfaces:
Serializable
ContentItemResolverEndpoint
to retrieve ContentItems
from a commerce-facing context.- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttribute
(String name, Object value) Takes in any additional attributes passed in the request not matching any defined properties.protected boolean
boolean
Return any additional attributes passed in the request not matching any defined properties.Map holding any additional attributes passed in the request not matching any defined properties.Any contextual information needed to resolve targetted content.Name of aContentZone
to retrieve relatedContentItems
.Ids ofContentItems
to retrieve.Names ofContentItems
to retrieve.Id of aContentModel
all of whoseContentItems
to retrieve.Name of aContentModel
all of whoseContentItems
to retrieve.The id of this content resolver request.getUri()
URI of either aContentModel
all of whoseContentItems
should be retrieved or else that of a singleContentItem
.int
hashCode()
void
setAttributes
(Map<String, Object> attributes) Map holding any additional attributes passed in the request not matching any defined properties.void
setContentContext
(ContentContext contentContext) Any contextual information needed to resolve targetted content.void
setContentZoneName
(String contentZoneName) Name of aContentZone
to retrieve relatedContentItems
.void
setItemIds
(Set<String> itemIds) Ids ofContentItems
to retrieve.void
setItemNames
(Set<String> itemNames) Names ofContentItems
to retrieve.void
setModelId
(String modelId) Id of aContentModel
all of whoseContentItems
to retrieve.void
setModelName
(String modelName) Name of aContentModel
all of whoseContentItems
to retrieve.void
setRequestId
(String requestId) The id of this content resolver request.void
URI of either aContentModel
all of whoseContentItems
should be retrieved or else that of a singleContentItem
.void
Added for compatibility with CatalogBrowseServices requests to resolve a browse entity that may be a content item, product, or category when only a URI is known.toString()
-
Constructor Details
-
ContentResolverRequest
public ContentResolverRequest()
-
-
Method Details
-
setUris
Added for compatibility with CatalogBrowseServices requests to resolve a browse entity that may be a content item, product, or category when only a URI is known. The payload there could include multiple URIs, but this service can only handle a single URI. This will pick the first and set it asuri
.- Parameters:
uris
-
-
addAttribute
Takes in any additional attributes passed in the request not matching any defined properties.- Parameters:
name
- Name of the additional attributevalue
- Value of the additional attribute
-
getAttribute
Return any additional attributes passed in the request not matching any defined properties.- Returns:
- any additional attributes passed in the request not matching any defined properties.
-
getRequestId
The id of this content resolver request.- Since:
- 2.0.3
-
getItemNames
Names ofContentItems
to retrieve.If
uri
,itemIds
,modelId
, ormodelName
are present, then this will be ignored.- Returns:
- Names of
ContentItems
to retrieve.
-
getItemIds
Ids ofContentItems
to retrieve.If
uri
,modelId
, ormodelName
are present, then this will be ignored. If this is present, thenitemNames
will be ignored.- Returns:
- Ids of
ContentItems
to retrieve.
-
getModelName
Name of aContentModel
all of whoseContentItems
to retrieve.If present,
itemIds
anditemNames
will be ignored will be ignored. Ifuri
ormodelId
are present, then this will be ignored. -
getModelId
Id of aContentModel
all of whoseContentItems
to retrieve.If present,
modelId
,itemIds
, anditemNames
will be ignored. Ifuri
is present, then this will be ignored. -
getUri
URI of either aContentModel
all of whoseContentItems
should be retrieved or else that of a singleContentItem
. In the latter case, the parentContentModel's URI
should be appended in the request.If present,
itemNames
,itemIds
,modelId
, andmodelName
will be ignored.- Returns:
- URI of either a
ContentModel
all of whoseContentItems
should be retrieved or else that of a singleContentItem
-
getContentZoneName
Name of aContentZone
to retrieve relatedContentItems
.If a zone with the provided name is found, the
ContentZone's
`defaultItems` will be returned as well as any `alternateItemSets` that meet their `displayRule`'s criteria.If present, all other request parameters will be ignored.
-
getContentContext
Any contextual information needed to resolve targetted content.If present, this information is used during content zone resolution.
-
getAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
setRequestId
The id of this content resolver request.- Since:
- 2.0.3
-
setItemNames
Names ofContentItems
to retrieve.If
uri
,itemIds
,modelId
, ormodelName
are present, then this will be ignored.- Parameters:
names
- Names ofContentItems
to retrieve.
-
setItemIds
Ids ofContentItems
to retrieve.If
uri
,modelId
, ormodelName
are present, then this will be ignored. If this is present, thenitemNames
will be ignored.- Parameters:
ids
- Ids ofContentItems
to retrieve.
-
setModelName
Name of aContentModel
all of whoseContentItems
to retrieve.If present,
itemIds
anditemNames
will be ignored will be ignored. Ifuri
ormodelId
are present, then this will be ignored. -
setModelId
Id of aContentModel
all of whoseContentItems
to retrieve.If present,
modelId
,itemIds
, anditemNames
will be ignored. Ifuri
is present, then this will be ignored. -
setUri
URI of either aContentModel
all of whoseContentItems
should be retrieved or else that of a singleContentItem
. In the latter case, the parentContentModel's URI
should be appended in the request.If present,
itemNames
,itemIds
,modelId
, andmodelName
will be ignored.- Parameters:
uri
- URI of either aContentModel
all of whoseContentItems
should be retrieved or else that of a singleContentItem
-
setContentZoneName
Name of aContentZone
to retrieve relatedContentItems
.If a zone with the provided name is found, the
ContentZone's
`defaultItems` will be returned as well as any `alternateItemSets` that meet their `displayRule`'s criteria.If present, all other request parameters will be ignored.
-
setContentContext
Any contextual information needed to resolve targetted content.If present, this information is used during content zone resolution.
-
setAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-