Skip to content

Commit

Permalink
Added new code changes for ESPM Version2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Puja committed Feb 22, 2017
1 parent 5dac897 commit 2dd587f
Show file tree
Hide file tree
Showing 67 changed files with 2,229 additions and 1,217 deletions.
30 changes: 3 additions & 27 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Apache License

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

Expand Down Expand Up @@ -173,29 +174,4 @@
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
END OF TERMS AND CONDITIONS
47 changes: 31 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ Clone the Git [repository](https://github.com/SAP/cloud-espm-v2.git) or download

# 1. Quick start guide
### Setting up the developer environment
1. Install [SAP JVM 7.*](https://tools.hana.ondemand.com/#cloud) or Java JDK 1.7 and setup the JAVA_HOME and PATH environment variables in your local machine
2. Install [Eclipse](https://help.hana.ondemand.com/help/frameset.htm?761374e5711e1014839a8273b0e91070.html). Please download Eclipse Mars
1. Install [SAP JVM 8.*](https://tools.hana.ondemand.com/#cloud) or Java JDK 1.8 and setup the JAVA_HOME and PATH environment variables in your local machine
2. Install [Eclipse](https://help.hana.ondemand.com/help/frameset.htm?761374e5711e1014839a8273b0e91070.html). Please download Eclipse Neon
3. [Install SAP Development Tools for Eclipse](https://help.hana.ondemand.com/help/frameset.htm?76137a37711e1014839a8273b0e91070.html)
4. Install the [SAP HANA Cloud SDK](https://help.hana.ondemand.com/help/frameset.htm?7613843c711e1014839a8273b0e91070.html). Please download Java EE 6 Web Profile SDK
5. [Setup the Runtime Environment](https://help.hana.ondemand.com/help/frameset.htm?7613f000711e1014839a8273b0e91070.html). please use the Java EE 6 Web Profile section in the above document
6. Signup for [HCP Trial account](https://hcp.sap.com/developers.html#section_4)
4. Install the [SAP HANA Cloud SDK](https://help.hana.ondemand.com/help/frameset.htm?7613843c711e1014839a8273b0e91070.html). Please download Java Web Tomcat 8 SDK
5. Use Java Web Tomcat 8 Runtime Environment as described in [Setup the Runtime Environment](https://help.hana.ondemand.com/help/frameset.htm?7613f000711e1014839a8273b0e91070.html) document
6. Signup for [HCP Trial account](https://hcp.sap.com/developers.html#section_4) if you don't have HCP Trial Account

### Build the application and deploy
Below are the Steps to build and run espm application.
Expand All @@ -34,7 +34,7 @@ Below are the Steps to build and run espm application.
7.Bind the database to espm application and start espm application
```

1.Git configuration in Eclipse
#### 1.Git configuration in Eclipse
- From the Eclipse IDE main menu, choose Window > Preferences
- Enter git in the filter field in the top-left corner.
- Navigate to Team > Git > Configuration and select the Configuration node and add the following configuration
Expand All @@ -43,7 +43,7 @@ Below are the Steps to build and run espm application.

**Note! For most people the proxy value doesn’t need to be set but if you are working behind a proxy, then it should be set as per you environment**

2.Maven configuration
#### 2.Maven configuration
- From the Eclipse IDE main menu, choose Window > Preferences
- Enter maven in the filter field in the top-left corner
- Navigate to Maven > User Settings and select the User Settings node
Expand Down Expand Up @@ -80,7 +80,7 @@ Below are the Steps to build and run espm application.
```


3.Clone Git repository and import Maven project
#### 3.Clone Git repository and import Maven project
- Open https://github.com/SAP/cloud-espm-v2 with your web browser
- Click on the Copy to clipboard so that the Git repository URL of the opened cloud-basecamp GitHub repository is copied to your clipboard.

Expand All @@ -97,14 +97,14 @@ Below are the Steps to build and run espm application.
- Click on Finish so that the remote cloud-basecamp Git repository (source code) is cloned to the local location specified on the last wizard page.
- In Eclipse, open File->Import->Existing Maven projects.
4.Update dependencies and build Maven project
#### 4.Update dependencies and build Maven project
- Instruction to run update dependencies for the Maven project
- Right click on the web project in ESPM > and choose Maven > Click on Update Project
- Note! you need to modify the parent pom.xml for certain property values depending on your environment:
- local.server.proxy.settings - comment this out if you are not behind a proxy server. Else update your proxy settings here
- browser.proxy.settings - comment this out if your browser is not using a proxy. Else update your browser proxy settings here
- sap.cloud.sdk.version - The SAP HANA Cloud Platform SDK for Java EE 6 Web Profile version that you intend to run the application with. the minimum version supported is 2.87.10
- sap.cloud.sdk.version - The SAP HANA Cloud Platform SDK for Java Web Tomcat 8 version that you intend to run the application with. the minimum version supported is 3.22.10
- olingo.version - The Apache Olingo version that you intend the application to run with. The minimum version supported is 2.0.6
The application can be built with the maven command to the parent pom.xml
Expand All @@ -115,14 +115,14 @@ Below are the Steps to build and run espm application.
**The unit tests and the integration tests are run by default when building the project with goal "clean install"**
5.Deploy the application on local Cloud Runtime
#### 5.Deploy the application on local Cloud Runtime
i)Run the application in HCP Java EE 6 Web Profile Server
i)Run the application in HCP Java Web Tomcat 8 Server
- Right click on the web project in ESPM > and choose the Run on Server option
![Run ESPM Locally](/docs/images/RunESPM1.png?raw=true)
- Make sure that Manually define a new server is selected and choose SAP > Java EE 6 Web Profile Server as server type. Leave all other settings unchanged and choose Finish
- Make sure that Manually define a new server is selected and choose SAP > Java Web Tomcat 8 Server as server type. Leave all other settings unchanged and choose Finish
![Run ESPM Finish](/docs/images/RunESPM2.png?raw=true)
- Now a local server is started that has your espm application deployed.
Expand All @@ -140,12 +140,26 @@ ii)Create Users and Assign Role
- The eCommerce site can be accessed via the URL: https://localhost:\<port\>/espm-cloud-web/webshop
- The Retailer UI can be accessed via the URL: https://localhost:\<port\>/espm-cloud-web/retailer
6.Deploy the application on SAP HCP via the cockpit
#### 6.Deploy the application on SAP HCP via the cockpit
**Note! The application name must be "espm", else the above URL will change based on the application name given during deployment**
- Deploy the application in your SAP HANA Cloud Platform Trial account.
- Note! If you deploy with the console client, make sure to specify the --java-version parameter with value 7. Note! The application name must be espm.
1.Go to HCP Cockpit --> Click on Java Application under Applications --> Click on Deploy Application
![HCP Cockpit](/docs/images/HCPCockpit.png?raw=true)
2.Add War File Location, Give Application Name "espm" ,select Runtime Name "Java Web Tomcat 8" and JVM Version "JRE 8"
![HCP Deploy](/docs/images/HCPDeploy.png?raw=true)
3.After Successful Deployment , Click on Start
![Deployed](/docs/images/Deployed.png?raw=true)
- Configure the application role assignments from the [cockpit](https://help.hana.ondemand.com/help/frameset.htm?db8175b9d976101484e6fa303b108acd.html). You basically need to add the "Retailer" role to your SAP HANA Cloud Platform user to access the Retailer UI
You can access the application from the URL
Expand All @@ -156,7 +170,7 @@ ii)Create Users and Assign Role
**Note! The application name must be "espm", else the above URL will change bsaed on the application name given during deployment**
7.Bind the database to espm application and start espm application
#### 7.Bind the database to espm application and start espm application
Below is the process to bind the database to the java application in HCP trial account using a Shared HANA database
Expand Down Expand Up @@ -276,3 +290,4 @@ Copyright 2016 SAP SE
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:
[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

11 changes: 5 additions & 6 deletions docs/demoscript/Retailer_SalesOrderApprovalREADME.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@ Enterprise Sales Procurement Model (ESPM) Sample Application - Retailer - Sales
==========================================================================================================

1. Open ESPM Retailer URL in the browser https://espmxxxxxxxtrial.hanatrial.ondemand.com/espm-cloud-web/retailer/

![ESPM1](/docs/demoscript/retailerimages/LaunchRetailer.png?raw=true)
2. Click on tile “Approve sales orders” to view the list of sales orders.

2. Click on tile “Approve sales orders” to view the list of sales orders.
![ESPM2](/docs/demoscript/retailerimages/2.ClickSalesOrderTile.png?raw=true)
3. Select Sales Order item from the sales orders list to view its details.

3. Select Sales Order item from the sales orders list to view its details.
![ESPM3](/docs/demoscript/retailerimages/3.SelectSalesOrder.png?raw=true)
4. The details of the sales order is available in the details view. Click on Approve button on the bottom to approve the sales order. Likewise, clicking on the Reject button will reject the sales order.

4. The details of the sales order is available in the details view. Click on Approve button on the bottom to approve the sales order. Likewise, clicking on the Reject button will reject the sales order.
![ESPM4](/docs/demoscript/retailerimages/4.DetailsfoSalesOrder.png?raw=true)
5. On selecting approve, a message box to confirm approval is shown. Click on “Ok” button to confirm sales order approval.

5. On selecting approve, a message box to confirm approval is shown. Click on “Ok” button to confirm sales order approval.
![ESPM5](/docs/demoscript/retailerimages/5.ApproveSalesOrderr.png?raw=true)
6. The Sales Order is approved and a message is shown for confirmation.

6. The Sales Order is approved and a message is shown for confirmation.
![ESPM6](/docs/demoscript/retailerimages/6.SalesOrderApproved.png?raw=true)


13 changes: 6 additions & 7 deletions docs/demoscript/Retailer_StockUpdateREADME.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
Enterprise Sales Procurement Model (ESPM) Sample Application - Retailer - Stock Update Demo Script
==================================================================================================

1. Open ESPM Retailer URL in the browser https://espmxxxxxxxtrial.hanatrial.ondemand.com/espm-cloud-web/retailer/

1. Open ESPM Retailer URL in the browser https://espmxxxxxxxtrial.hanatrial.ondemand.com/espm-cloud-web/retailer/
![ESPM1](/docs/demoscript/retailerimages/LaunchRetailer.png?raw=true)
2. Click on tile “Stock availability” to check the product stock information availability.

2. Click on tile “Stock availability” to check the product stock information availability.
![ESPM2](/docs/demoscript/retailerimages/1.ClickStockTile.png?raw=true)
3. The list of products and its stock information is shown. To update the minimum required stock information, click on the link against Items in Stock/Target.

3. The list of products and its stock information is shown. To update the minimum required stock information, click on the link against Items in Stock/Target.
![ESPM3](/docs/demoscript/retailerimages/2.updateproductstock.png?raw=true)
4. In the popup window, you can update the Minimum stock level information. Click on Submit button.

4. In the popup window, you can update the Minimum stock level information. Click on Submit button.
![ESPM4](/docs/demoscript/retailerimages/3.SetMinimumStock.png?raw=true)
5. If the Minimum stock level information is greater that items in stock, the status is shown in red.

5. If the Minimum stock level information is greater that items in stock, the status is shown in red.
![ESPM5](/docs/demoscript/retailerimages/5.ApproveSalesOrderr.png?raw=true)
6. The Sales Order is approved and a message is shown for confirmation.

6. The Sales Order is approved and a message is shown for confirmation.
![ESPM6](/docs/demoscript/retailerimages/4.StockinformationUpdated.png?raw=true)


19 changes: 9 additions & 10 deletions docs/demoscript/WebshopREADME.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,32 @@ Enterprise Sales Procurement Model (ESPM) Sample Application - Webshop Demo Scri
==================================================================================

1. Open ESPM Webshop URL in the browser https://espmxxxxxxxtrial.hanatrial.ondemand.com/espm-cloud-web/webshop/

![ESPM1](/docs/demoscript/webshopimages/1.OpenURL.png?raw=true)
2. In the search field, enter “Notebook Basic 15” and press enter key.

2. In the search field, enter “Notebook Basic 15” and press enter key.
![ESPM2](/docs/demoscript/webshopimages/2.NotebookBasic15.png?raw=true)
3. Select “Notebook Basic 15” in the list to view the details of the product.

3. Select “Notebook Basic 15” in the list to view the details of the product.
![ESPM3](/docs/demoscript/webshopimages/3.Notebookbasic15Details.png?raw=true)
4. Click “Add to Cart” button to add the product to the cart. The cart is updated as shown by the icon on the top right corner.

4. Click “Add to Cart” button to add the product to the cart. The cart is updated as shown by the icon on the top right corner.
![ESPM4](/docs/demoscript/webshopimages/4.AddToCart.png?raw=true)
5. Click on the “Cart” icon on the top right corner to view your shopping cart. To checkout, Click on “checkout” button.

5. Click on the “Cart” icon on the top right corner to view your shopping cart. To checkout, Click on “checkout” button.
![ESPM5](/docs/demoscript/webshopimages/5.ViewCart.png?raw=true)
6. In the Checkout screen, Click on Step2 button.

6. In the Checkout screen, Click on Step2 button.
![ESPM6](/docs/demoscript/webshopimages/6.CheckoutScreen1.png?raw=true)
7. Select “I am a new customer” radio button, fill in the customer information and click on “Step3” button.

7. Select “I am a new customer” radio button, fill in the customer information and click on “Step3” button.
![ESPM6](/docs/demoscript/webshopimages/6.CheckoutScreen2.png?raw=true)
8. Enter the Billing information. Click on the Review button.

8. Enter the Billing information. Click on the Review button.
![ESPM6](/docs/demoscript/webshopimages/6.CheckoutScreen3.png?raw=true)
9. In the summary page, Click on “Place an order” button to order the product.

9. In the summary page, Click on “Place an order” button to order the product.
![ESPM6](/docs/demoscript/webshopimages/6.CheckoutScreen4.png?raw=true)
10. The Sales Order is created successfully and a message is shown for the same.

10. The Sales Order is created successfully and a message is shown for the same.
![ESPM6](/docs/demoscript/webshopimages/6.CheckoutScreen5.png?raw=true)

13 changes: 6 additions & 7 deletions docs/documentation/DocumentServiceREADME.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,21 @@ In ESPM Webshop application, we have implemented Document Service of HANA cloud
# Demo

1. Click on the “View My Sales Orders” button.

![ESPM1](/docs/documentation/DocumentServiceImages/ESPM1.jpg?raw=true)
2. Enter the registered email id.

2. Enter the registered email id.
![ESPM2](/docs/documentation/DocumentServiceImages/ESPM2.jpg?raw=true)
3. Click on Get sales orders list, for getting the list of orders.

3. Click on Get sales orders list, for getting the list of orders.
![ESPM3](/docs/documentation/DocumentServiceImages/ESPM3.jpg?raw=true)
4. After clicking on “Get Sales Order List” button, List of invoices come to the list.

4. After clicking on “Get Sales Order List” button, List of invoices come to the list.
![ESPM4](/docs/documentation/DocumentServiceImages/ESPM4.jpg?raw=true)
5. Click on sales order from the list, detail information about customer and product displayed on the right side of the screen.

5. Click on sales order from the list, detail information about customer and product displayed on the right side of the screen.
![ESPM5](/docs/documentation/DocumentServiceImages/ESPM5.jpg?raw=true)
6. Download the pdf by clicking on “Download pdf” icon in the bottom right corner.

6. Download the pdf by clicking on “Download pdf” icon in the bottom right corner.
![ESPM6](/docs/documentation/DocumentServiceImages/ESPM6.jpg?raw=true)


Expand Down Expand Up @@ -114,7 +113,7 @@ Get access to the root folder of the application document repository. Further fo
Folder root = openCmisSession.getRootFolder();
### Create new folder or file/document as per your requirement
Create sales order as pdf files and export/store pdfs in the document service repository. You can use PDFBox library for creating pdfs. For code, click on the [LINK](/espm-cloud-web/src/main/java/com/sap/espm/model/pdf/generator/InvoicePDFGenerator.java).
Create sales order as pdf files and export/store pdfs in the document service repository. You can use PDFBox library for creating pdfs. For code, click on the [LINK](/espm-cloud-web/src/main/java/com/sap/espm/model/documentservice/InvoiceBuilder.java).
### Use Streaming API’s to download invoices.
Expand Down
Binary file added docs/images/Deployed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/HCPCockpit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/HCPDeploy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/RunESPM2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/localuser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 15 additions & 1 deletion espm-cloud-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,21 @@
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.5.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!-- Unit Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit 2dd587f

Please sign in to comment.