All Projects → SAP-samples → Cloud Sample Library

SAP-samples / Cloud Sample Library

TBD

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Cloud Sample Library

Play Samples
Stars: ✭ 335 (+2292.86%)
Mutual labels:  sample
Tutoshowcase
A simple and Elegant Showcase view for Android
Stars: ✭ 499 (+3464.29%)
Mutual labels:  sample
Simpleopenclsamples
Simple OpenCL Samples that Build with Khronos Headers and Libs
Stars: ✭ 22 (+57.14%)
Mutual labels:  sample
Go Project Sample
Introduce the best practice experience of Go project with a complete project example.通过一个完整的项目示例介绍Go语言项目的最佳实践经验.
Stars: ✭ 344 (+2357.14%)
Mutual labels:  sample
Androidwithkotlin
🚀 These are android sample projects which are written in Kotlin. It covers video streaming, mp3 player, sqlite, location services, custom camera, o-notifications, simple compass etc.
Stars: ✭ 447 (+3092.86%)
Mutual labels:  sample
Rxjava2 Android Samples
RxJava 2 Android Examples - Migration From RxJava 1 to RxJava 2 - How to use RxJava 2 in Android
Stars: ✭ 4,950 (+35257.14%)
Mutual labels:  sample
Flutter Layouts Exampls
Layout of the flutter example.such as Row,Comlun,listview,Just for learning.
Stars: ✭ 292 (+1985.71%)
Mutual labels:  sample
Metrica Sample Dotnet
Yandex AppMetrica SDK Sample for Windows
Stars: ✭ 11 (-21.43%)
Mutual labels:  sample
Basic Microservice Example
Simple sketch of how we layout a clojure microservice
Stars: ✭ 452 (+3128.57%)
Mutual labels:  sample
Demo Multi Lang
Simple libp2p demos implemented in Go, JS and Rust
Stars: ✭ 17 (+21.43%)
Mutual labels:  sample
Vokuro
Sample application for Phalcon Framework (Acl, Auth, Security)
Stars: ✭ 350 (+2400%)
Mutual labels:  sample
Handyswift
Handy Swift features that didn't make it into the Swift standard library.
Stars: ✭ 403 (+2778.57%)
Mutual labels:  sample
Rxjavasample
RxJava Sample
Stars: ✭ 811 (+5692.86%)
Mutual labels:  sample
Kotlin Mvp Example
A small client server app on Kotlin that is using MVP architecture
Stars: ✭ 337 (+2307.14%)
Mutual labels:  sample
Kotlinsample Mvp
Sample Kotlin project with MVP implementation
Stars: ✭ 11 (-21.43%)
Mutual labels:  sample
Umi Examples
examples for umi.js
Stars: ✭ 294 (+2000%)
Mutual labels:  sample
Swiftui 2048
A 2048 game writing with SwiftUI.
Stars: ✭ 539 (+3750%)
Mutual labels:  sample
Yaas Getting Started Yaasbites
YaaS bites (our getting started series) is a tutorial and sample code set consisting of small, incremental coding exercises to help a developer learn the basics of the YaaS platform. Its goal is to ensure that a Software Developer's initial journies into YaaS are productive and successful.
Stars: ✭ 13 (-7.14%)
Mutual labels:  sample
Runnerty Quick Start
Runnerty quick start example project
Stars: ✭ 11 (-21.43%)
Mutual labels:  sample
Scala Pet Store
An implementation of the java pet store using FP techniques in scala
Stars: ✭ 812 (+5700%)
Mutual labels:  sample

Library

The Library is a sample Java application that runs on SAP HANA Cloud Platform, Java Web runtime, and uses the following platform services:

Quick Start

Clone the repo, https://github.com/SAP/cloud-sample-library.git, or download the latest release.

Project Overview

Below is a basic description of the project. The structure is as follows:

  • com.sap.hana.cloud.samples - the main package that holds all other
    • adapters - classes for accessing the SAP HANA Cloud Platform services
    • book.service - contains servlets (and filters, required for manipulation over books - extracting, creating, editing, deleting, reserving, returning) + a servlet responsible for sending e-mails in the cases of reserving and returning a book
    • my.books.service - servlets which manipulate books that the user has borrowed
    • persistence.entities - entities for the database
    • user.image.service - contains servlets that upload user's profile image to the Document Service repo and for retrieving this profile image from the repo
    • user.service - contains servlets and filters which extract, save and manipulate user's data, as well as logging functionality
    • util - commonly used utility functionalities like date manipulation, streams manipulation, mails, Connectivity service utilities, etc.

Application Startup

You can run the application either locally, or on SAP HANA Cloud.

  • Running locally
  1. Go to your computer’s properties > Advanced system settings > Environment Variables, and create a new system variable named "NW_CLOUD_SDK_PATH".
  2. Enter the path to the directory where you have downloaded and unarchived the SAP HANA Cloud SDK. Check the pom.xml file for the SDK version and versions of other JAR files, if needed.
  3. Create a new local server.
  4. Double-click on it and choose the "Connectivity" tab.
  5. Create a new destination, named "OpenLibrary" and paste the following URL to the URL field: http://www.openlibrary.org or you can simply import the file "OpenLibrary", located in the src/main/resources folder.
  6. If you work behind a proxy server, you should configure your proxy settings (host and port). Double-click on the server, go to "Overview" tab and choose "Open launch configuration". In the tab "(x)= Arguments" > "VM Arguments", paste the following: -Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort= Set your proxy hosts and ports.
  7. Create local users: Double-click on the created server, go to the "Users" tab and create new users with the properties required. Set a role for each user of yours. Role with name "Everyone" is mandatory. If you want to use the admin functionalities, add one more role, named "admin".
  8. Run MongoDB - it is used for the SAP HANA Cloud document service when running it locally. Download MongoDB from here: http://www.mongodb.org/downloads Save the archive, unpack and execute the following command: mongod --dbpath C:\mongodb_data, where "C:\mongodb_data" is an empty directory.
  9. Run the application.

NOTE: When running locally, you will receive the e-mails on your local file system, i.e. <local server's folder>/work/mailservice/ (In the local scenario, you do not need a Mail destination.)

  • Running on SAP HANA Cloud
  1. Go to your computer’s properties > Advanced system settings > Environment Variables, and create a new system variable named "NW_CLOUD_SDK_PATH".
  2. Enter the path to the directory where you have downloaded and unarchived the SAP HANA Cloud JAVA WEB SDK (https://tools.hana.ondemand.com/). Check the pom.xml file for the SDK version and versions of other JAR files, if needed.
  3. Create a SAP HANA Cloud server.
  4. Double-click on it and choose the "Connectivity" tab.
  5. Create a new destination, named "OpenLibrary" and paste the following URL to the URL field: http://www.openlibrary.org or you can simply import the file "OpenLibrary", located in the src/main/resources folder.
  6. To use the e-mail functionalities, you need to create a Mail destination (the app will work properly without it, but you will not receive e-mails). You can find a template in directory src/main/resources, named Session.template. Remove the .template extension(!) and fill in the data regarding SMTP, username, password, etc. for you e-mail account. You can then import it in the Eclipse IDE.
  7. Assign your user a specific role: Go to the SAP HANA Cloud cockpit. Choose "Authorizations" (located on the left of the screen), select an application from the combo box and the available roles will appear on the right. Assign the desired role for the user.
  8. Only for accounts using HANA DB: you should add extarnal jar {SDK-Location}\repository\plugins\com.sap.core.persistence.osgi.hdb.platform_x.y.z.jar to the build path of the project.

NOTE: you can add this to your pom.xml:

	  <dependency>
                <groupId>com.sap.core.persistence.osgi</groupId>
                <artifactId>com.sap.core.persistence.osgi.hdb.platform</artifactId>
                <version>0.6.11</version>
      </dependency>
  1. Run the application.

Authors

Ilhan Myumyun

Copyright and license

Copyright 2013 SAP AG

Licensed under the Apache License, Version 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].