Skip to content

Commit

Permalink
Version 1.3 (#16)
Browse files Browse the repository at this point in the history
version 1.3.0
  • Loading branch information
aleksandar-cloudinary authored Sep 17, 2024
1 parent 356153b commit 6c4c670
Show file tree
Hide file tree
Showing 440 changed files with 22,208 additions and 10,262 deletions.
Binary file added .DS_Store
Binary file not shown.
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Default ignored files
/workspace.xml


# IDEA related files
.idea/
*.iml
*.ipr
*.iws
*.ids

# exclude binary files
*.class

*.orig
.pmd
.ruleset
ruleset.xml
.springBeans
.metadata/

build.xml
*testclasses.xml
hmc.xsd
extensioninfo.xsd
items.xsd
beans.xsd

# Exclude jalo files
jalo/

# Exlcude auto-generated source files
gensrc/
addons/
addonsrc/
commonwebsrc/

rebel.xml
package-lock.json
hybris4intellij.properties
.classpath
*/platformhome.properties
platformhome.properties
cloudinarymediabackoffice_bof.jar

ext-cloudinary/cloudinary/cloudinarymediabackoffice/backoffice/classes
generatedVariables.tag
generatedVariables.js
wro_addons.xml
ext-cloudinary/cloudinary/cloudinarymediabackoffice/web/addontestsrc
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Cloudinary
Copyright (c) 2020 cloudinary-labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# The Cloudinary SAP Commerce Extension

Cloudinary
==========
Cloudinary is a cloud-based service that provides solutions for image and video management, including server or client-side upload, on-the-fly image and video transformations, quick CDN delivery, and a variety of asset management options.

SAP is the market leader in enterprise application software, helping companies of all sizes and in all industries run at their best. The SAP Commerce solution simplifies selling and buying processes on a modern, agile e-commerce platform.

The SAP Commerce Extension enables you to create rich media experiences on your storefront, whether B2B or B2C, by leveraging Cloudinary's automatic image and video optimization and transformation capabilities, and delivering responsive media through global content delivery networks.
The SAP Commerce Cloudinary Extension provides rich features such as media management, transformations, optimizations and advanced delivery features exposed via the SAP Commerce platform with a plug and play integrated extension.

Learn more about the [SAP Commerce Extension](https://cloudinary.com/documentation/sap_commerce_extension_integration).
## Get your Cloudinary account information ######################################################################
If you don’t have a Cloudinary account, sign up for a [free account](https://cloudinary.com/users/register/free) so you can try out image and video transformations and seamless delivery through CDN.
Get your cloudname, api_key and api_secret from your Cloudinary account [as described here](https://cloudinary.com/documentation/how_to_integrate_cloudinary#account_details).

If you don't have a Cloudinary account yet, you can [sign up](https://cloudinary.com/users/register/free) for a free account now.
## Additional resources ##########################################################

## Additional resources
Additional resources are available at:

* [Cloudinary extension in SAP store](https://store.sap.com/dcp/en/product/display-0000059939_live_v1/Cloudinary%20for%20SAP%20Commerce)
* [Cloudinary website](https://cloudinary.com)
* [Cloudinary documentation](https://cloudinary.com/documentation)
* [Cloudinary Website](https://cloudinary.com)
* [Cloudinary Documentation](https://cloudinary.com/documentation)
* [Knowledge Base](https://support.cloudinary.com/hc/en-us)
* [Video transformations documentation](https://cloudinary.com/documentation/video_manipulation_and_delivery)
* [Image transformations documentation](https://cloudinary.com/documentation/image_transformations)
Expand All @@ -25,6 +24,6 @@ Contact us [https://cloudinary.com/contact](https://cloudinary.com/contact).

Stay tuned for updates, tips and tutorials: [Blog](https://cloudinary.com/blog), [Twitter](https://twitter.com/cloudinary), [Facebook](https://www.facebook.com/Cloudinary).

## Join the community
## Join the Community ##########################################################

Impact the product, hear updates, test drive new features and more! Join [here](https://www.facebook.com/groups/CloudinaryCommunity).
Binary file added ext-cloudinary/.DS_Store
Binary file not shown.
Binary file added ext-cloudinary/cloudinary/.DS_Store
Binary file not shown.
Binary file not shown.
12 changes: 1 addition & 11 deletions ext-cloudinary/cloudinary/cloudinarymediaaddon/.project
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,10 @@
<arguments>
</arguments>
</buildCommand>

</buildSpec>
<natures>
<nature>org.springframework.ide.eclipse.core.springnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1648658182311</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package uk.ptr.cloudinary.controllers.cms;

import de.hybris.platform.acceleratorstorefrontcommons.controllers.cms.AbstractCMSComponentController;
import de.hybris.platform.addonsupport.controllers.cms.AbstractCMSAddOnComponentController;
import de.hybris.platform.core.model.components.CloudinaryGalleryComponentModel;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import uk.ptr.cloudinary.constants.CloudinarymediaaddonWebConstants;
import uk.ptr.cloudinary.facades.CloudinaryConfigFacade;
import uk.ptr.cloudinary.model.CloudinaryConfigModel;


import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package uk.ptr.cloudinary.controllers.cms;

import atg.taglib.json.util.JSONArray;
import atg.taglib.json.util.JSONException;
import atg.taglib.json.util.JSONObject;
import com.cloudinary.Cloudinary;
import de.hybris.platform.addonsupport.controllers.cms.AbstractCMSAddOnComponentController;
import de.hybris.platform.cms2.model.contents.ContentCatalogModel;
import de.hybris.platform.core.model.components.CloudinaryVideoComponentModel;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.cloudinary.json.JSONArray;
import org.cloudinary.json.JSONException;
import org.cloudinary.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
Expand Down Expand Up @@ -51,7 +51,7 @@ protected void fillModel(HttpServletRequest request, Model model, CloudinaryVide

if (cloudinaryConfigModel.getCloudinaryURL() != null) {
Cloudinary cloudinary = new Cloudinary(cloudinaryConfigModel.getCloudinaryURL());
cloudinary.setUserAgent(CloudinarymediacoreConstants.CLOUDINARYSAPCC, CloudinarymediacoreConstants.CLOUDINARY_VERSION + "(SAPCC" + CloudinarymediacoreConstants.SAP_VERSION + ")");
// cloudinary.setUserAgent(CloudinarymediacoreConstants.CLOUDINARYSAPCC, CloudinarymediacoreConstants.CLOUDINARY_VERSION + "(SAPCC" + CloudinarymediacoreConstants.SAP_VERSION + ")")

model.addAttribute("cloudName", cloudinary.config.cloudName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import com.cloudinary.Cloudinary;
import com.google.common.collect.Maps;
import de.hybris.platform.acceleratorfacades.futurestock.FutureStockFacade;
import de.hybris.platform.commercefacades.futurestock.impl.DefaultFutureStockFacade;
import de.hybris.platform.acceleratorservices.controllers.page.PageType;
import de.hybris.platform.acceleratorstorefrontcommons.breadcrumb.impl.ProductBreadcrumbBuilder;
import de.hybris.platform.acceleratorstorefrontcommons.constants.WebConstants;
Expand All @@ -29,7 +29,6 @@
import de.hybris.platform.product.ProductService;
import de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException;
import de.hybris.platform.util.Config;
import de.hybris.platform.variants.model.VariantProductModel;
import de.hybris.platform.yacceleratorstorefront.controllers.ControllerConstants;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.BooleanUtils;
Expand All @@ -41,7 +40,6 @@
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import uk.ptr.cloudinary.constants.CloudinarymediacoreConstants;
import uk.ptr.cloudinary.facades.CloudinaryConfigFacade;
import uk.ptr.cloudinary.model.CloudinaryConfigModel;

Expand Down Expand Up @@ -96,7 +94,7 @@ public class ProductPageController extends AbstractPageController
private ReviewValidator reviewValidator;

@Resource(name = "futureStockFacade")
private FutureStockFacade futureStockFacade;
private DefaultFutureStockFacade futureStockFacade;

@Resource
private CloudinaryConfigFacade cloudinaryConfigFacade;
Expand Down Expand Up @@ -416,7 +414,7 @@ protected void populateProductDetailForDisplay(final String productCode, final M

CloudinaryConfigModel cloudinaryConfigModel = cloudinaryConfigFacade.getCloudinaryConfig();

if (BooleanUtils.isTrue(cloudinaryConfigModel.getEnableCloudinary()) && BooleanUtils.isTrue(cloudinaryConfigModel.getEnableCloudinaryGalleryWidget())) {
/*if (BooleanUtils.isTrue(cloudinaryConfigModel.getEnableCloudinary()) && BooleanUtils.isTrue(cloudinaryConfigModel.getEnableCloudinaryGalleryWidget())) {
if (cloudinaryConfigModel.getCloudinaryURL() != null) {
Cloudinary cloudinary = new Cloudinary(cloudinaryConfigModel.getCloudinaryURL());
cloudinary.setUserAgent(CloudinarymediacoreConstants.CLOUDINARYSAPCC, CloudinarymediacoreConstants.CLOUDINARY_VERSION + "(SAPCC" + CloudinarymediacoreConstants.SAP_VERSION + ")");
Expand All @@ -428,7 +426,7 @@ protected void populateProductDetailForDisplay(final String productCode, final M
model.addAttribute("isProductGalleryEnabled", Boolean.TRUE);
model.addAttribute("cloudinaryConfig", cloudinaryConfigModel);
model.addAttribute("sapCCProductCode", productData.getSapCCProductCode());
}
}*/

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public void beforeView(final HttpServletRequest request, final HttpServletRespon
{
CloudinaryConfigModel cloudinaryConfig = cloudinaryConfigFacade.getCloudinaryConfig();


if(BooleanUtils.isTrue(cloudinaryConfig.getEnableCloudinary()) && BooleanUtils.isTrue(cloudinaryConfig.getCloudinaryResponsive()) && cloudinaryConfig.getCloudinaryURL()!= null) {

Cloudinary cloudinary = new Cloudinary(cloudinaryConfig.getCloudinaryURL());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
<c:otherwise></c:otherwise>
</c:choose>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions ext-cloudinary/cloudinary/cloudinarymediaaddon/build.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved.
-->
<project name="cloudinarymediaaddon" default="all">
<property file="platformhome.properties" />
Expand All @@ -20,7 +20,7 @@
IF YOU WANT TO ADAPT THE BUILD PROCESS, CREATE A FILE
CALLED buildcallbacks.xml IN YOUR EXTENSION.
PLEASE ALSO REFER TO THE DOCUMENTATION ON THE HYBRIS HELP SITE
(https://help.sap.com/viewer/d0224eca81e249cb821f2cdf45a82ace/2005/en-US/8b6ded0d86691014a6fab18e171c1f91.html).
(https://help.sap.com/viewer/d0224eca81e249cb821f2cdf45a82ace/LATEST/en-US/8b6ded0d86691014a6fab18e171c1f91.html).
*** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING ***
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Fri, 08 Jan 2021 15:50:12 +0000
#Thu, 08 Aug 2024 08:10:40 +0100
# -----------------------------------------------------------------------
# Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
# -----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@
</property>
</bean>
<bean class="de.hybris.platform.yacceleratorstorefront.interceptors.beforeview.UiExperienceMetadataViewHandler" />
<bean class="de.hybris.platform.yacceleratorstorefront.interceptors.beforeview.AnalyticsPropertiesBeforeViewHandler" />
<bean class="de.hybris.platform.yacceleratorstorefront.interceptors.beforeview.AnalyticsPropertiesBeforeViewHandler">
<property name="hostConfigService" ref="hostConfigService" />
</bean>
<bean class="de.hybris.platform.yacceleratorstorefront.interceptors.beforeview.ConfigWro4jBeforeViewHandler" >
<property name="siteConfigService" ref="siteConfigService"/>
</bean>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

Expand Down Expand Up @@ -379,6 +379,11 @@
<xs:documentation>Configures a single index key.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="include" type="indexIncludeType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Configures a single index include column.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
Expand Down Expand Up @@ -467,6 +472,17 @@
</xs:attribute>
</xs:complexType>

<xs:complexType name="indexIncludeType">
<xs:annotation>
<xs:documentation>Configures a single index include column.</xs:documentation>
</xs:annotation>
<xs:attribute name="attribute" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>Type attribute to be indexed.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>

<xs:complexType name="attributeType">
<xs:annotation>
<xs:documentation>Defines an attribute of a type.</xs:documentation>
Expand Down
Binary file not shown.
11 changes: 0 additions & 11 deletions ext-cloudinary/cloudinary/cloudinarymediabackoffice/.project
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,4 @@
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1648658182322</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,38 +1,13 @@
@charset "utf-8";
@import "./support/cloudinarymediabackofficewidget-variables.scss";

.yw-labelstyle
{
color: red;
color: $cloudinarymediabackoffice-label-text-color;
}
.yw-labelstyle-z-label
{
font-weight: bold !important;
color: black !important;
font-size: 16px !important;
}
.yw-enablelabelstyle
{
font-weight: bold !important;
color: black !important;
font-size: 16px !important;
}
.yw-editorarea-z-html
{
font-weight: bold !important;
}
.yw-editorarea-z-div
{
font-weight: bold !important;
}
.yw-radioButton-z-html
{
color: black !important;
font-size: 14px !important;
}
.yw-error-connection-labelstyle-z-label{
color : red !important;
font-weight: bold !important;
font-size: 16px !important;

.cloudinarymediabackoffice-container {
background: $cloudinarymediabackoffice-container-background;
font-family: $cloudinarymediabackoffice-container-font-family;
font-size: $cloudinarymediabackoffice-container-font-size;
}
.yw-desc-cloudinary-tooltip .z-popup-content {
padding: 8px;
white-space: pre;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.hybris.com/schema/cockpitng/zul/zul.xsd"
height="100%">

<div height="100%" style="background: #ccc;">
<div height="100%" class="cloudinarymediabackoffice-container">
<div>
<label id="label" value="${labels.hello} cloudinarymediabackoffice" />
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -----------------------------------------------------------------------
# Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved
# -----------------------------------------------------------------------

hello=Hello
Loading

0 comments on commit 6c4c670

Please sign in to comment.