@Path(value="shops/{shopId}/legal")
@RolesAllowed(value={"sf","legal_read"})
public final class LegalContentResource
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private LegalContentService |
legalInfoService |
private ShopRequestContextService |
shopRequestContextService |
Constructor and Description |
---|
LegalContentResource(ShopRequestContextService shopRequestContextService,
LegalContentService legalInfoService) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
getContactInformation(java.lang.String shopId,
java.util.Locale locale)
Returns the contact information of a shop.
|
private static Link |
getLink(ShopRequestContext requestContext,
java.lang.String methodName,
java.lang.String rel) |
private static java.util.List<Link> |
getLinks(LegalContentSummary summary,
ShopRequestContext requestContext) |
javax.ws.rs.core.Response |
getPrivacyPolicy(java.lang.String shopId,
java.util.Locale locale)
Returns the privacy policy of a shop.
|
javax.ws.rs.core.Response |
getRightsOfWithdrawal(java.lang.String shopId,
java.util.Locale locale)
Returns the rights of withdrawal (customer information) of a shop.
|
javax.ws.rs.core.Response |
getShippingInformation(java.lang.String shopId,
java.util.Locale locale) |
javax.ws.rs.core.Response |
getSummary(java.lang.String shopId,
java.util.Locale locale)
The localized shop legal summary information resource
|
javax.ws.rs.core.Response |
getTermsAndConditions(java.lang.String shopId,
java.util.Locale locale)
Returns the terms and conditions of a shop.
|
javax.ws.rs.core.Response |
updateContactInformation(java.lang.String shopId,
java.util.Locale locale,
ContactInformation contactInformation) |
javax.ws.rs.core.Response |
updatePrivacyPolicy(ContentPage privacyPolicy,
java.lang.String shopId,
java.util.Locale locale) |
javax.ws.rs.core.Response |
updateRightsOfWithdrawal(ContentPage rightsOfWidthdrawal,
java.lang.String shopId,
java.util.Locale locale) |
javax.ws.rs.core.Response |
updateShippingInformation(ContentPage shippingInformation,
java.lang.String shopId,
java.util.Locale locale) |
javax.ws.rs.core.Response |
updateTermsAndConditions(ContentPage termsAndConditions,
java.lang.String shopId,
java.util.Locale locale) |
private final ShopRequestContextService shopRequestContextService
private final LegalContentService legalInfoService
@Inject public LegalContentResource(ShopRequestContextService shopRequestContextService, LegalContentService legalInfoService)
@GET @Produces(value="application/vnd.epages.v1+json, application/json") public javax.ws.rs.core.Response getSummary(@PathParam(value="shopId") java.lang.String shopId, @QueryParam(value="locale") java.util.Locale locale)
shopId
- The id of the shoplocale
- The ISO 639-1 for language code and ISO 3166-1 for country
code. (Example: de_DE).private static java.util.List<Link> getLinks(LegalContentSummary summary, ShopRequestContext requestContext)
private static Link getLink(ShopRequestContext requestContext, java.lang.String methodName, java.lang.String rel)
@GET @Path(value="privacy-policy") @Produces(value="application/vnd.epages.v1+json, application/json") public javax.ws.rs.core.Response getPrivacyPolicy(@PathParam(value="shopId") java.lang.String shopId, @QueryParam(value="locale") java.util.Locale locale)
shopId
- The id of the shop.locale
- The ISO 639-1 for language code and ISO 3166-1 for country
code. (Example: de_DE).@PUT @Path(value="privacy-policy") @Produces(value="application/vnd.epages.v1+json, application/json") @Consumes(value="application/json") @RolesAllowed(value="legal_write") public javax.ws.rs.core.Response updatePrivacyPolicy(ContentPage privacyPolicy, @PathParam(value="shopId") java.lang.String shopId, @NotNull @QueryParam(value="locale") java.util.Locale locale)
@GET @Path(value="contact-information") @Produces(value="application/vnd.epages.v1+json, application/json") public javax.ws.rs.core.Response getContactInformation(@PathParam(value="shopId") java.lang.String shopId, @QueryParam(value="locale") java.util.Locale locale)
shopId
- The id of the shop.locale
- The ISO 639-1 for language code and ISO 3166-1 for country
code. (Example: de_DE).@PUT @Path(value="contact-information") @Produces(value="application/vnd.epages.v1+json, application/json") @Consumes(value="application/json") @RolesAllowed(value="legal_write") public javax.ws.rs.core.Response updateContactInformation(@PathParam(value="shopId") java.lang.String shopId, @NotNull @QueryParam(value="locale") java.util.Locale locale, ContactInformation contactInformation)
@GET @Path(value="terms-and-conditions") @Produces(value="application/vnd.epages.v1+json, application/json") public javax.ws.rs.core.Response getTermsAndConditions(@PathParam(value="shopId") java.lang.String shopId, @QueryParam(value="locale") java.util.Locale locale)
shopId
- The id of the shop.locale
- The ISO 639-1 for language code and ISO 3166-1 for country
code. (Example: de_DE).@PUT @Path(value="terms-and-conditions") @Produces(value="application/vnd.epages.v1+json, application/json") @Consumes(value="application/json") @RolesAllowed(value="legal_write") public javax.ws.rs.core.Response updateTermsAndConditions(ContentPage termsAndConditions, @PathParam(value="shopId") java.lang.String shopId, @NotNull @QueryParam(value="locale") java.util.Locale locale)
@GET @Path(value="rights-of-withdrawal") @Produces(value="application/vnd.epages.v1+json, application/json") public javax.ws.rs.core.Response getRightsOfWithdrawal(@PathParam(value="shopId") java.lang.String shopId, @QueryParam(value="locale") java.util.Locale locale)
shopId
- The id of the shop.locale
- The ISO 639-1 for language code and ISO 3166-1 for country
code. (Example: de_DE).@PUT @Path(value="rights-of-withdrawal") @Produces(value="application/vnd.epages.v1+json, application/json") @Consumes(value="application/json") @RolesAllowed(value="legal_write") public javax.ws.rs.core.Response updateRightsOfWithdrawal(ContentPage rightsOfWidthdrawal, @PathParam(value="shopId") java.lang.String shopId, @NotNull @QueryParam(value="locale") java.util.Locale locale)
@GET @Path(value="shipping-information") @Produces(value="application/vnd.epages.v1+json, application/json") public javax.ws.rs.core.Response getShippingInformation(@PathParam(value="shopId") java.lang.String shopId, @QueryParam(value="locale") java.util.Locale locale)
@PUT @Path(value="shipping-information") @Produces(value="application/vnd.epages.v1+json, application/json") @Consumes(value="application/json") @RolesAllowed(value="legal_write") public javax.ws.rs.core.Response updateShippingInformation(ContentPage shippingInformation, @PathParam(value="shopId") java.lang.String shopId, @NotNull @QueryParam(value="locale") java.util.Locale locale)