Git Product home page Git Product logo

greenbuttonalliance / openespi-thirdparty-java Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 28.0 4.49 MB

Spring Framework implementation of a Green Button Third Party OpenESPI Application

Home Page: https://sandbox.greenbuttonalliance.org:8443/ThirdParty/

License: Apache License 2.0

Shell 2.28% Java 71.07% CSS 21.89% JavaScript 0.75% Gherkin 2.02% Less 1.91% Procfile 0.08%
energy openespi pivotal spring third-party

openespi-thirdparty-java's Introduction

NPM version Build Status npm audit total GitHub contributors

monthly npm installs total docker pulls monthly packagist installs gzip size

Introduction

Swagger UI allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without having any of the implementation logic in place. It’s automatically generated from your OpenAPI (formerly known as Swagger) Specification, with the visual documentation making it easy for back end implementation and client side consumption.

General

👉🏼 Want to score an easy open-source contribution? Check out our Good first issue label.

🕰️ Looking for the older version of Swagger UI? Refer to the 2.x branch.

This repository publishes three different NPM modules:

  • swagger-ui is a traditional npm module intended for use in single-page applications that are capable of resolving dependencies (via Webpack, Browserify, etc.).
  • swagger-ui-dist is a dependency-free module that includes everything you need to serve Swagger UI in a server-side project, or a single-page application that can't resolve npm module dependencies.
  • swagger-ui-react is Swagger UI packaged as a React component for use in React applications.

We strongly suggest that you use swagger-ui instead of swagger-ui-dist if you're building a single-page application, since swagger-ui-dist is significantly larger.

If you are looking for plain ol' HTML/JS/CSS, download the latest release and copy the contents of the /dist folder to your server.

Compatibility

The OpenAPI Specification has undergone 5 revisions since initial creation in 2010. Compatibility between Swagger UI and the OpenAPI Specification is as follows:

Swagger UI Version Release Date OpenAPI Spec compatibility Notes
5.0.0 2023-06-12 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0 tag v5.0.0
4.0.0 2021-11-03 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3 tag v4.0.0
3.18.3 2018-08-03 2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3 tag v3.18.3
3.0.21 2017-07-26 2.0 tag v3.0.21
2.2.10 2017-01-04 1.1, 1.2, 2.0 tag v2.2.10
2.1.5 2016-07-20 1.1, 1.2, 2.0 tag v2.1.5
2.0.24 2014-09-12 1.1, 1.2 tag v2.0.24
1.0.13 2013-03-08 1.1, 1.2 tag v1.0.13
1.0.1 2011-10-11 1.0, 1.1 tag v1.0.1

Documentation

Usage

Customization

Development

Contributing

Integration Tests

You will need JDK of version 7 or higher as instructed here https://nightwatchjs.org/guide/getting-started/installation.html#install-selenium-server

Integration tests can be run locally with npm run e2e - be sure you aren't running a dev server when testing!

Browser support

Swagger UI works in the latest versions of Chrome, Safari, Firefox, and Edge.

Known Issues

To help with the migration, here are the currently known issues with 3.X. This list will update regularly, and will not include features that were not implemented in previous versions.

  • Only part of the parameters previously supported are available.
  • The JSON Form Editor is not implemented.
  • Support for collectionFormat is partial.
  • l10n (translations) is not implemented.
  • Relative path support for external files is not implemented.

Security contact

Please disclose any security-related issues or vulnerabilities by emailing [email protected], instead of using the public issue tracker.

License

SwaggerUI is licensed under Apache 2.0 license. SwaggerUI comes with an explicit NOTICE file containing additional legal notices and information.

openespi-thirdparty-java's People

Contributors

antityping avatar dfcoffin avatar jateeter avatar martyburns avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openespi-thirdparty-java's Issues

Support SFTP

The TP upon receipt of a notification of sftp:// available data shall retrieve the data using a GETALL of the URI via the SFTP protocol.

Remove support for Postgres Database

The current OpenESPI-ThirdParty-java repository contains dependency and references to the Postgres Database, but this database interface has never been implemented.

Need documentation for GreenButtonData Data class

Need documentation for GreenButtonData Data class namely for

  • UsagePoint
  • MeterReading
  • IntervalBlock
  • IntervalReading
  • ElectricPowerQualitySummaries
  • ElectricPowerUsageSummaries
  • ReadingType

And its attributes significance

A ThirdParty user may have accounts with multiple datacustodian

In third-party application, key for authorization is scope & customer id. If a customer has relationships with multiple data custodians how will they successfully do authorization using openESPI third party application.

In scopeselection controller, existing authorization is checked based on scope and customer id. Not with datacustodian id.
Authorization currentAuthorization = authorizationService.findByScope(scope, currentCustomer(principal).getId());

Remove deprecated Profiles

The POM file contains profiles that are no longer available. These should be removed to simplify the POM file.

Build error following OpenESPI developmentEnvironment instructions

Hi,

Thank you for your great work. I am attempting to deploy the Third-Party application locally on the recommended virtual machine and I ran into an issue when running the tomcat server.

According to the greenbutton documentation I was able to build the different applications using the command mvn -P devmysql -Dmaven.test.skip=true clean install.

But unfortunately I run into an error when I want to run the Third-Party application using mvn -P devmysql -Dmaven.test.skip=true clean tomcat7:run.

I am running under the virtual machine proposed by GreenButton. I was able to successfully build Common, DataCustodian and Third-Party applications and I can run tomcat for the DataCustodian application.

Here is the full log of the build failing for the Third-Party application:

[INFO] Scanning for projects...
[INFO]                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building ThirdParty 1.2-RC1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ ThirdParty ---
[INFO] Deleting /home/bitnami/Documents/my_espi/OpenESPI-ThirdParty-java/target
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.0:run (default-cli) @ ThirdParty >>>
[INFO]
[INFO] --- buildnumber-maven-plugin:1.1:create (default) @ ThirdParty ---
[INFO] Checking for local modifications: skipped.
[INFO] Updating project files from SCM: skipped.
[INFO] ShortRevision tag detected. The value is '7'.
[INFO] Executing: /bin/sh -c cd /home/bitnami/Documents/my_espi/OpenESPI-ThirdParty-java && git rev-parse --verify --short=7 HEAD
[INFO] Working directory: /home/bitnami/Documents/my_espi/OpenESPI-ThirdParty-java
[INFO] Storing buildNumber: b74797d at timestamp: 1426696035058
[INFO] ShortRevision tag detected. The value is '7'.
[INFO] Executing: /bin/sh -c cd /home/bitnami/Documents/my_espi/OpenESPI-ThirdParty-java && git rev-parse --verify --short=7 HEAD
[INFO] Working directory: /home/bitnami/Documents/my_espi/OpenESPI-ThirdParty-java
[INFO] Storing buildScmBranch: UNKNOWN
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ ThirdParty ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 16 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ ThirdParty ---
[INFO] Compiling 34 source files to /home/bitnami/Documents/my_espi/OpenESPI-ThirdParty-java/target/classes
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.0:run (default-cli) @ ThirdParty <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.0:run (default-cli) @ ThirdParty ---
[INFO] Running war on http://localhost:8080/ThirdParty
[INFO] Creating Tomcat server configuration at /home/bitnami/Documents/my_espi/OpenESPI-ThirdParty-java/target/tomcat
[INFO] create webapp with contextPath: /ThirdParty
Mar 18, 2015 12:27:19 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 18, 2015 12:27:19 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Mar 18, 2015 12:27:19 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.30
Mar 18, 2015 12:27:19 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/ThirdParty]]
                at java.util.concurrent.FutureTask.report(FutureTask.java:122)
                at java.util.concurrent.FutureTask.get(FutureTask.java:188)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:785)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
                at java.util.concurrent.FutureTask.run(FutureTask.java:262)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/ThirdParty]]
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
                ... 6 more
Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer
                at org.apache.catalina.startup.ContextConfig.getServletContainerInitializer(ContextConfig.java:1657)
                at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1565)
                at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1273)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
                at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
                at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
                ... 6 more

Mar 18, 2015 12:27:19 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
                at java.util.concurrent.FutureTask.report(FutureTask.java:122)
                at java.util.concurrent.FutureTask.get(FutureTask.java:188)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
                at org.apache.catalina.startup.Tomcat.start(Tomcat.java:335)
                at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:1018)
                at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:478)
                at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
                at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
                at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
                at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
                at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
                at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
                at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
                at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
                at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
                at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
                at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
                at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
                at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:606)
                at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
                at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
                at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
                at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
                at java.util.concurrent.FutureTask.run(FutureTask.java:262)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:785)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
                ... 6 more

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.006s
[INFO] Finished at: Wed Mar 18 12:27:19 EDT 2015
[INFO] Final Memory: 27M/64M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0:run (default-cli) on project ThirdParty: Could not start Tomcat: Failed to start component [StandardServer[-1]]: Failed to start component [StandardService[Tomcat]]: Failed to start component [StandardEngine[Tomcat]]: A child container failed during start -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Document Authorization and Subscription Table Contents and Usage

There are fields in the authorizations and subscriptions table rows that contain NULL. These should be completed at time of row creation to have suitable contents and/or any residual NULL entries well documented as to why they are not being initialized.

Complete Initialization of Authorization and Subscription

There are fields in the authorizations and subscriptions table rows that contain NULL. These should be completed at time of row creation to have suitable contents and/or any residual NULL entries well documented as to why they are not being initialized.

Unable to build Third Party using maven CLI

Attempting to build the Data Custodian using the following maven CLI format produces a failed build:

mvn clean -Dmaven.test.skip=true package

Results in the following build error and subsequent failure:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building ThirdParty 1.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.energyos:Common:jar:1.3-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.823s
[INFO] Finished at: Thu Oct 29 11:30:46 EDT 2015
[INFO] Final Memory: 9M/59M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project ThirdParty: Could not resolve dependencies for project org.energyos:ThirdParty:war:1.3-SNAPSHOT: Failure to find org.energyos:Common:jar:1.3-SNAPSHOT in http://maven.springframework.org/release was cached in the local repository, resolution will not be reattempted until the update interval of spring-maven-release has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Support Internationalization for decoding code lists in ESPI

Many elements of the ESPI data structures are code list enumerations where the data content is an integer that corresponds to a textual name and a description. Internationalization of this data facilitates agile adaptation of GUIs to local needs.

Retail Customer Management in Web

The RetailCustomerController.java (in thethirdparty.web.custodian package) contains the patterns:

DATA_CUSTODIAN_RETAIL_CUSTOMER_INDEX
DATA_CUSTODIAN_RETAIL_CUSTOMER_FORM
DATA_CUSTODIAN_RETAIL_CUSTOMER_CREATE
DATA_CUSTODIAN_RETAIL_CUSTOMER_SHOW

These controllers provide the basis for RetailCustomer(Account) management.

Refresh Token Validation

Implement refresh token support in TP. Upon rejection of acces-token by DC, the TP must request a new access-token using the refresh-token. Updates to the TP's record of access-token and refresh-token.

JavaDoc Documentation

Develop Third Party API documentation:

1 - Controllers
2 - Restful APIs (as defined in api documentation)
3 - UX flows

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.