├── jpro-mail
├── src
│ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── javamail.default.address.map
│ │ └── java
│ │ ├── module-info.java
│ │ └── one
│ │ └── jpro
│ │ └── platform
│ │ └── mail
│ │ ├── StartTLSOption.java
│ │ ├── config
│ │ ├── GoogleMailConfig.java
│ │ └── MailTrapConfig.java
│ │ ├── impl
│ │ └── MailClientImpl.java
│ │ ├── MailException.java
│ │ └── MailClient.java
├── example
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ └── one
│ │ │ │ └── jpro
│ │ │ │ └── platform
│ │ │ │ └── mail
│ │ │ │ └── example
│ │ │ │ └── compose
│ │ │ │ ├── img
│ │ │ │ └── jpro-navy-orange-logo.png
│ │ │ │ └── css
│ │ │ │ └── compose-mail.css
│ │ │ └── java
│ │ │ └── module-info.java
│ └── build.gradle
└── build.gradle
├── .gitignore
├── deleteCache.sh
├── jpro-routing
├── core-test
│ └── src
│ │ └── test
│ │ ├── resources
│ │ └── testfiles
│ │ │ ├── size-tester-test-css.css
│ │ │ └── test.jpg
│ │ └── scala
│ │ └── one
│ │ └── jpro
│ │ └── platform
│ │ └── routing
│ │ ├── TestLinkUtil.scala
│ │ ├── TestRouteApp.scala
│ │ └── crawl
│ │ └── TestSitemapGenerator.scala
├── core
│ └── src
│ │ └── main
│ │ ├── scala
│ │ └── one
│ │ │ └── jpro
│ │ │ └── platform
│ │ │ └── routing
│ │ │ ├── ResponseResult.scala
│ │ │ ├── HistoryEntry.scala
│ │ │ ├── Redirect.scala
│ │ │ ├── NodeView.scala
│ │ │ ├── SessionManagerContext.scala
│ │ │ ├── Filter.scala
│ │ │ ├── filter
│ │ │ └── container
│ │ │ │ ├── ContainerFactory.scala
│ │ │ │ ├── Container.scala
│ │ │ │ └── ContainerVBox.scala
│ │ │ ├── sessionmanager
│ │ │ └── SessionManagerDummy.scala
│ │ │ ├── Response.scala
│ │ │ ├── RouteNode.scala
│ │ │ ├── server
│ │ │ └── RouteHTTP.scala
│ │ │ ├── RouteApp.scala
│ │ │ └── View.scala
│ │ ├── java
│ │ ├── one
│ │ │ └── jpro
│ │ │ │ └── platform
│ │ │ │ └── routing
│ │ │ │ ├── filter
│ │ │ │ └── container
│ │ │ │ │ └── IgnoreMe.java
│ │ │ │ ├── extensions
│ │ │ │ └── linkheader
│ │ │ │ │ └── IgnoreMe.java
│ │ │ │ ├── IgnoreMe.java
│ │ │ │ ├── crawl
│ │ │ │ └── IgnoreMe.java
│ │ │ │ ├── server
│ │ │ │ └── IgnoreMe.java
│ │ │ │ ├── performance
│ │ │ │ └── IgnoreMe.java
│ │ │ │ └── sessionmanager
│ │ │ │ └── IgnoreMe.java
│ │ └── module-info.java
│ │ └── resources
│ │ └── one
│ │ └── jpro
│ │ └── platform
│ │ └── routing
│ │ └── extensions
│ │ └── linkheader
│ │ └── css
│ │ └── linkheader.css
├── example
│ └── src
│ │ └── main
│ │ ├── resources
│ │ ├── images
│ │ │ └── img1.jpg
│ │ ├── test.css
│ │ ├── logback.xml
│ │ ├── jpro
│ │ │ └── html
│ │ │ │ ├── defaultpage
│ │ │ │ └── index.html
│ │ └── example
│ │ │ └── filters
│ │ │ └── SimpleHamburgerMenu.css
│ │ ├── java
│ │ ├── example
│ │ │ └── scala
│ │ │ │ └── Dummy.java
│ │ └── module-info.java
│ │ └── scala
│ │ └── example
│ │ └── scala
│ │ ├── TestWebApplicationHTTP.scala
│ │ └── TestExtensions.scala
├── dev
│ └── src
│ │ └── main
│ │ ├── java
│ │ ├── one
│ │ │ └── jpro
│ │ │ │ └── platform
│ │ │ │ └── routing
│ │ │ │ └── dev
│ │ │ │ └── IgnoreMe.java
│ │ └── module-info.java
│ │ ├── resources
│ │ └── one
│ │ │ └── jpro
│ │ │ └── platform
│ │ │ └── routing
│ │ │ └── dev
│ │ │ ├── devfilter.css
│ │ │ └── statisticsfilter.css
│ │ └── scala
│ │ └── one
│ │ └── jpro
│ │ └── platform
│ │ └── routing
│ │ └── dev
│ │ └── NodesHelper.scala
└── popup
│ ├── src
│ └── main
│ │ ├── java
│ │ └── module-info.java
│ │ └── resources
│ │ └── one
│ │ └── jpro
│ │ └── platform
│ │ └── routing
│ │ └── popup
│ │ └── simplepopup
│ │ └── simplepopup.css
│ └── build.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── jpro-image-manager
├── src
│ ├── test
│ │ ├── resources
│ │ │ ├── logo.png
│ │ │ └── testImage.png
│ │ └── java
│ │ │ └── one
│ │ │ └── jpro
│ │ │ └── platform
│ │ │ └── image
│ │ │ └── manager
│ │ │ ├── transformer
│ │ │ ├── ImageTransformerFitWidthTest.java
│ │ │ ├── ImageTransformerScaleToAreaTest.java
│ │ │ ├── ImageTransformerWHTest.java
│ │ │ └── ImageTransformerFitHeightTest.java
│ │ │ ├── ImageResultTest.java
│ │ │ ├── encoder
│ │ │ └── ImageEncoderPNGTest.java
│ │ │ ├── ImageDefinitionTest.java
│ │ │ └── source
│ │ │ ├── ImageSourceFileTest.java
│ │ │ └── ImageSourceURLTest.java
│ └── main
│ │ └── java
│ │ ├── module-info.java
│ │ └── one
│ │ └── jpro
│ │ └── platform
│ │ └── image
│ │ └── manager
│ │ ├── JsonConvertible.java
│ │ ├── transformer
│ │ ├── ImageTransformer.java
│ │ ├── ImageTransformerHelpers.java
│ │ └── ImageTransformerIdentity.java
│ │ ├── encoder
│ │ ├── ImageEncoderException.java
│ │ └── ImageEncoder.java
│ │ ├── source
│ │ ├── ImageSourceException.java
│ │ └── ImageSource.java
│ │ └── ImageUtils.java
└── build.gradle
├── example
├── src
│ └── main
│ │ ├── resources
│ │ ├── jpro
│ │ │ └── html
│ │ │ │ ├── favicon.png
│ │ │ │ └── defaultpage
│ │ └── one
│ │ │ └── jpro
│ │ │ └── platform
│ │ │ └── example
│ │ │ └── media
│ │ │ └── css
│ │ │ ├── main.css
│ │ │ └── media_sample.css
│ │ └── java
│ │ └── module-info.java
└── build.gradle
├── ensemble
├── samples
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ ├── MediaPlayerSample.png
│ │ │ └── ensemble-samples.json
│ └── build.gradle
└── site
│ └── build.gradle
├── jpro-auth
├── example
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ ├── images
│ │ │ │ ├── Google_Logo.png
│ │ │ │ ├── Keycloak_Logo.png
│ │ │ │ └── Microsoft_Logo.png
│ │ │ ├── logback.xml
│ │ │ └── jpro
│ │ │ │ └── html
│ │ │ │ ├── defaultpage
│ │ │ │ └── index.html
│ │ │ └── java
│ │ │ ├── one
│ │ │ └── jpro
│ │ │ │ └── platform
│ │ │ │ └── auth
│ │ │ │ └── example
│ │ │ │ ├── basic
│ │ │ │ └── page
│ │ │ │ │ ├── Page.java
│ │ │ │ │ ├── LoginPage.java
│ │ │ │ │ ├── ErrorPage.java
│ │ │ │ │ └── SignedInPage.java
│ │ │ │ ├── login
│ │ │ │ └── page
│ │ │ │ │ ├── Page.java
│ │ │ │ │ ├── ErrorPage.java
│ │ │ │ │ └── LoginPage.java
│ │ │ │ └── oauth
│ │ │ │ └── page
│ │ │ │ ├── Page.java
│ │ │ │ ├── AuthInfoPage.java
│ │ │ │ ├── UserInfoPage.java
│ │ │ │ ├── RefreshTokenPage.java
│ │ │ │ ├── IntrospectionTokenPage.java
│ │ │ │ └── AuthProviderDiscoveryPage.java
│ │ │ └── module-info.java
│ └── build.gradle
├── core
│ ├── src
│ │ ├── main
│ │ │ ├── resources
│ │ │ │ └── one
│ │ │ │ │ └── jpro
│ │ │ │ │ └── platform
│ │ │ │ │ └── auth
│ │ │ │ │ └── core
│ │ │ │ │ ├── basic
│ │ │ │ │ └── login-pane.properties
│ │ │ │ │ ├── http
│ │ │ │ │ └── default-response.html
│ │ │ │ │ └── crypto
│ │ │ │ │ └── notice.txt
│ │ │ └── java
│ │ │ │ ├── one
│ │ │ │ └── jpro
│ │ │ │ │ └── platform
│ │ │ │ │ └── auth
│ │ │ │ │ └── core
│ │ │ │ │ ├── http
│ │ │ │ │ └── impl
│ │ │ │ │ │ ├── Header.java
│ │ │ │ │ │ ├── Cancellable.java
│ │ │ │ │ │ ├── Clock.java
│ │ │ │ │ │ ├── Handler.java
│ │ │ │ │ │ ├── ByteMerger.java
│ │ │ │ │ │ └── Request.java
│ │ │ │ │ ├── authentication
│ │ │ │ │ ├── Options.java
│ │ │ │ │ ├── AuthenticationProvider.java
│ │ │ │ │ ├── CredentialValidationException.java
│ │ │ │ │ └── Credentials.java
│ │ │ │ │ ├── jwt
│ │ │ │ │ └── TokenExpiredException.java
│ │ │ │ │ ├── oauth2
│ │ │ │ │ └── OAuth2Flow.java
│ │ │ │ │ ├── api
│ │ │ │ │ ├── FluentGoogleAuth.java
│ │ │ │ │ ├── FluentGoogleAuthAPI.java
│ │ │ │ │ ├── FluentMicrosoftAuth.java
│ │ │ │ │ ├── FluentBasicAuth.java
│ │ │ │ │ ├── FluentMicrosoftAuthAPI.java
│ │ │ │ │ └── FluentBasicAuthAPI.java
│ │ │ │ │ ├── AuthAPI.java
│ │ │ │ │ └── basic
│ │ │ │ │ └── UserNotFoundException.java
│ │ │ │ └── module-info.java
│ │ └── test
│ │ │ └── java
│ │ │ └── one
│ │ │ └── jpro
│ │ │ └── platform
│ │ │ └── auth
│ │ │ └── core
│ │ │ ├── http
│ │ │ ├── TestHttpServer.java
│ │ │ └── HttpStatusTests.java
│ │ │ └── oauth2
│ │ │ └── OAuth2FlowTests.java
│ └── build.gradle
└── routing
│ ├── src
│ └── main
│ │ ├── resources
│ │ └── one
│ │ │ └── jpro
│ │ │ └── platform
│ │ │ └── auth
│ │ │ └── routing
│ │ │ └── buttons
│ │ │ └── google
│ │ │ ├── web_dark_sq_SI@2x.png
│ │ │ ├── web_light_sq_SI@2x.png
│ │ │ └── web_neutral_sq_SI@2x.png
│ │ └── java
│ │ ├── module-info.java
│ │ └── one
│ │ └── jpro
│ │ └── platform
│ │ └── auth
│ │ └── routing
│ │ ├── AuthUIProvider.java
│ │ ├── buttons
│ │ └── GoogleLoginButton.java
│ │ └── AuthRestrictionFilter.java
│ └── build.gradle
├── jpro-scenegraph
├── src
│ └── main
│ │ └── java
│ │ └── module-info.java
└── build.gradle
├── jpro-webrtc
├── src
│ └── main
│ │ └── java
│ │ ├── module-info.java
│ │ └── one
│ │ └── jpro
│ │ └── platform
│ │ └── webrtc
│ │ ├── MediaStream.java
│ │ └── VideoFrame.java
├── example
│ ├── src
│ │ └── main
│ │ │ ├── java
│ │ │ ├── module-info.java
│ │ │ └── one
│ │ │ │ └── jpro
│ │ │ │ └── platform
│ │ │ │ └── webrtc
│ │ │ │ └── example
│ │ │ │ └── videoroom
│ │ │ │ ├── page
│ │ │ │ └── OverviewPage.java
│ │ │ │ └── VideoRoomApp.java
│ │ │ └── resources
│ │ │ ├── jpro
│ │ │ └── html
│ │ │ │ └── defaultpage
│ │ │ └── one
│ │ │ └── jpro
│ │ │ └── platform
│ │ │ └── webrtc
│ │ │ └── example
│ │ │ └── videoroom
│ │ │ └── videoroom.css
│ └── build.gradle
└── build.gradle
├── deleteCache.bat
├── jpro-media
├── src
│ ├── main
│ │ └── java
│ │ │ ├── one
│ │ │ └── jpro
│ │ │ │ └── platform
│ │ │ │ └── media
│ │ │ │ ├── util
│ │ │ │ └── package-info.java
│ │ │ │ ├── event
│ │ │ │ └── package-info.java
│ │ │ │ ├── MediaEngine.java
│ │ │ │ ├── WebMediaEngine.java
│ │ │ │ ├── player
│ │ │ │ ├── impl
│ │ │ │ │ └── WebMediaPlayerView.java
│ │ │ │ └── MediaPlayerException.java
│ │ │ │ └── recorder
│ │ │ │ └── impl
│ │ │ │ └── WebMediaRecorderView.java
│ │ │ └── module-info.java
│ └── test
│ │ ├── resources
│ │ └── logback.xml
│ │ └── java
│ │ └── module-info.java
└── example
│ ├── src
│ └── main
│ │ ├── resources
│ │ └── one
│ │ │ └── jpro
│ │ │ └── platform
│ │ │ └── media
│ │ │ └── example
│ │ │ └── css
│ │ │ ├── main.css
│ │ │ └── media_sample.css
│ │ └── java
│ │ └── module-info.java
│ └── build.gradle
├── jpro-youtube
├── src
│ └── main
│ │ └── java
│ │ └── module-info.java
├── example
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ ├── module-info.java
│ │ │ └── one
│ │ │ └── jpro
│ │ │ └── platform
│ │ │ └── youtube
│ │ │ └── example
│ │ │ └── YoutubeExample.java
│ └── build.gradle
└── build.gradle
├── deleteCache.ps1
├── jpro-utils
├── example
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ └── module-info.java
│ └── build.gradle
├── src
│ ├── main
│ │ └── java
│ │ │ └── module-info.java
│ └── test
│ │ └── java
│ │ ├── module-info.java
│ │ └── one
│ │ └── jpro
│ │ └── platform
│ │ └── utils
│ │ └── test
│ │ └── FreezeDetectorTests.java
└── build.gradle
├── jpro-html-scrollpane
├── src
│ └── main
│ │ └── java
│ │ └── module-info.java
├── example
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ └── module-info.java
│ └── build.gradle
└── build.gradle
├── jpro-session
├── src
│ └── main
│ │ └── java
│ │ ├── module-info.java
│ │ └── one
│ │ └── jpro
│ │ └── platform
│ │ └── session
│ │ └── SessionException.java
├── example
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ └── module-info.java
│ └── build.gradle
└── build.gradle
├── jpro-sipjs
├── src
│ └── main
│ │ └── java
│ │ ├── module-info.java
│ │ └── one
│ │ └── jpro
│ │ └── platform
│ │ └── sipjs
│ │ ├── api
│ │ ├── session
│ │ │ ├── Inviter.java
│ │ │ └── Invitation.java
│ │ └── options
│ │ │ ├── MediaStreamConstraints.java
│ │ │ └── SessionDescriptionHandlerOptions.java
│ │ └── SipJSUtil.java
├── example
│ ├── src
│ │ └── main
│ │ │ ├── java
│ │ │ ├── module-info.java
│ │ │ └── one
│ │ │ │ └── jpro
│ │ │ │ └── platform
│ │ │ │ └── sipjs
│ │ │ │ └── example
│ │ │ │ ├── Variables.java
│ │ │ │ ├── SIPJSApp.java
│ │ │ │ └── page
│ │ │ │ ├── BobPage.java
│ │ │ │ ├── AlicePage.java
│ │ │ │ ├── AliceAndBobPage.java
│ │ │ │ └── SelectPage.java
│ │ │ └── resources
│ │ │ └── jpro
│ │ │ └── html
│ │ │ └── defaultpage
│ └── build.gradle
└── build.gradle
├── jpro-file
├── example
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ └── one
│ │ │ │ └── jpro
│ │ │ │ └── platform
│ │ │ │ └── file
│ │ │ │ └── example
│ │ │ │ └── css
│ │ │ │ ├── file_uploader.css
│ │ │ │ └── text_editor.css
│ │ │ └── java
│ │ │ ├── module-info.java
│ │ │ └── one
│ │ │ └── jpro
│ │ │ └── platform
│ │ │ └── file
│ │ │ └── example
│ │ │ └── upload
│ │ │ ├── FileSizeTableCell.java
│ │ │ └── UploadIndicatorTableCell.java
│ └── build.gradle
├── src
│ └── main
│ │ └── java
│ │ ├── module-info.java
│ │ └── one
│ │ └── jpro
│ │ └── platform
│ │ └── file
│ │ ├── picker
│ │ └── FileOpenPicker.java
│ │ ├── WebFileSource.java
│ │ └── event
│ │ └── FileEvent.java
└── build.gradle
├── jpro-mdfx
├── example
│ ├── src
│ │ └── main
│ │ │ ├── java
│ │ │ └── module-info.java
│ │ │ └── resources
│ │ │ └── one
│ │ │ └── jpro
│ │ │ └── platform
│ │ │ └── mdfx
│ │ │ └── example
│ │ │ └── mdfx-sample.css
│ └── build.gradle
├── src
│ └── main
│ │ ├── resources
│ │ └── one
│ │ │ └── jpro
│ │ │ └── platform
│ │ │ └── mdfx
│ │ │ └── mdfx-default.css
│ │ └── java
│ │ ├── module-info.java
│ │ └── one
│ │ └── jpro
│ │ └── platform
│ │ └── mdfx
│ │ └── extensions
│ │ ├── YoutubeExtension.java
│ │ └── ImageExtension.java
├── build.gradle
└── README.md
├── .github
└── workflows
│ ├── add-issues-to-project.yml
│ └── release.yml
├── settings.gradle
└── gradle.properties
/jpro-mail/src/main/resources/META-INF/javamail.default.address.map:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .history
3 | .gradle
4 | bin/
5 | build/
6 | example/logs/
7 | .DS_Store
--------------------------------------------------------------------------------
/deleteCache.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | find ~/.m2 ~/.gradle | grep one.jpro.platform | xargs rm -r
--------------------------------------------------------------------------------
/jpro-routing/core-test/src/test/resources/testfiles/size-tester-test-css.css:
--------------------------------------------------------------------------------
1 | .min-100 {
2 | -fx-min-width: 100;
3 | }
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JPro-one/JPro-Platform/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/scala/one/jpro/platform/routing/ResponseResult.scala:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing
2 |
3 | trait ResponseResult
4 |
--------------------------------------------------------------------------------
/jpro-image-manager/src/test/resources/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JPro-one/JPro-Platform/HEAD/jpro-image-manager/src/test/resources/logo.png
--------------------------------------------------------------------------------
/example/src/main/resources/jpro/html/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JPro-one/JPro-Platform/HEAD/example/src/main/resources/jpro/html/favicon.png
--------------------------------------------------------------------------------
/jpro-image-manager/src/test/resources/testImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JPro-one/JPro-Platform/HEAD/jpro-image-manager/src/test/resources/testImage.png
--------------------------------------------------------------------------------
/jpro-routing/example/src/main/resources/images/img1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JPro-one/JPro-Platform/HEAD/jpro-routing/example/src/main/resources/images/img1.jpg
--------------------------------------------------------------------------------
/ensemble/samples/src/main/resources/MediaPlayerSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JPro-one/JPro-Platform/HEAD/ensemble/samples/src/main/resources/MediaPlayerSample.png
--------------------------------------------------------------------------------
/jpro-auth/example/src/main/resources/images/Google_Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JPro-one/JPro-Platform/HEAD/jpro-auth/example/src/main/resources/images/Google_Logo.png
--------------------------------------------------------------------------------
/jpro-routing/core-test/src/test/resources/testfiles/test.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JPro-one/JPro-Platform/HEAD/jpro-routing/core-test/src/test/resources/testfiles/test.jpg
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/scala/one/jpro/platform/routing/HistoryEntry.scala:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing
2 |
3 | case class HistoryEntry(path: String, title: String)
4 |
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/scala/one/jpro/platform/routing/Redirect.scala:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing
2 |
3 | case class Redirect(to: String) extends ResponseResult
4 |
--------------------------------------------------------------------------------
/jpro-scenegraph/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | module jpro.platform.jpro.scenegraph {
2 | requires javafx.graphics;
3 |
4 | exports one.jpro.platform.scenegraph;
5 | }
--------------------------------------------------------------------------------
/jpro-auth/example/src/main/resources/images/Keycloak_Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JPro-one/JPro-Platform/HEAD/jpro-auth/example/src/main/resources/images/Keycloak_Logo.png
--------------------------------------------------------------------------------
/jpro-auth/example/src/main/resources/images/Microsoft_Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JPro-one/JPro-Platform/HEAD/jpro-auth/example/src/main/resources/images/Microsoft_Logo.png
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/java/one/jpro/platform/routing/filter/container/IgnoreMe.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing.filter.container;
2 |
3 | public class IgnoreMe {
4 | }
5 |
--------------------------------------------------------------------------------
/jpro-routing/example/src/main/java/example/scala/Dummy.java:
--------------------------------------------------------------------------------
1 | package example.scala;
2 |
3 | public class Dummy {
4 | // Workaround for the module system to work with Scala
5 | }
6 |
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/java/one/jpro/platform/routing/extensions/linkheader/IgnoreMe.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing.extensions.linkheader;
2 |
3 | public class IgnoreMe {
4 | }
5 |
--------------------------------------------------------------------------------
/jpro-webrtc/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | module one.jpro.platform.webrtc {
2 | requires javafx.controls;
3 | requires jpro.webapi;
4 |
5 | exports one.jpro.platform.webrtc;
6 | }
--------------------------------------------------------------------------------
/deleteCache.bat:
--------------------------------------------------------------------------------
1 | CHCP 65001
2 | @echo off
3 | setLocal
4 |
5 | SET DIR=%~dp0
6 | cd /D "%DIR%"
7 |
8 | powershell.exe -NoProfile -ExecutionPolicy Bypass -File deleteCache.ps1 %*
9 |
10 | endLocal
--------------------------------------------------------------------------------
/jpro-auth/core/src/main/resources/one/jpro/platform/auth/core/basic/login-pane.properties:
--------------------------------------------------------------------------------
1 | label.header=Basic Login Form
2 | label.username=Username :
3 | label.password=Password :
4 | button.submit=Sign In
--------------------------------------------------------------------------------
/jpro-media/src/main/java/one/jpro/platform/media/util/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Utility classes for the media module.
3 | *
4 | * @author Besmir Beqiri
5 | */
6 | package one.jpro.platform.media.util;
--------------------------------------------------------------------------------
/jpro-youtube/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | module one.jpro.platform.youtube {
2 |
3 | requires jpro.webapi;
4 | requires javafx.graphics;
5 | requires javafx.web;
6 | exports one.jpro.platform.youtube;
7 | }
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/java/one/jpro/platform/routing/IgnoreMe.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing;
2 |
3 | /**
4 | * I only exist to allow the creation of a module-info.java file.
5 | */
6 | public class IgnoreMe {
7 | }
8 |
--------------------------------------------------------------------------------
/jpro-routing/dev/src/main/java/one/jpro/platform/routing/dev/IgnoreMe.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing.dev;
2 |
3 | /**
4 | * I only exist to allow the creation of a module-info.java file.
5 | */
6 | public class IgnoreMe {
7 | }
8 |
--------------------------------------------------------------------------------
/deleteCache.ps1:
--------------------------------------------------------------------------------
1 | Get-ChildItem -Path $env:USERPROFILE\.m2, $env:USERPROFILE\.gradle -Recurse |
2 | Where-Object { $_.FullName -match 'one.jpro.platform' } |
3 | ForEach-Object { Remove-Item -Path $_.FullName -Recurse -Force }
4 |
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/java/one/jpro/platform/routing/crawl/IgnoreMe.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing.crawl;
2 |
3 | /**
4 | * I only exist to allow the creation of a module-info.java file.
5 | */
6 | public class IgnoreMe {
7 | }
8 |
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/java/one/jpro/platform/routing/server/IgnoreMe.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing.server;
2 |
3 | /**
4 | * I only exist to allow the creation of a module-info.java file.
5 | */
6 | public class IgnoreMe {
7 | }
8 |
--------------------------------------------------------------------------------
/jpro-utils/example/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | module one.jpro.platform.utils.example {
2 | requires one.jpro.platform.utils;
3 | requires jpro.webapi;
4 | requires javafx.controls;
5 |
6 | exports one.jpro.platform.utils.example;
7 | }
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/java/one/jpro/platform/routing/performance/IgnoreMe.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing.performance;
2 |
3 | /**
4 | * I only exist to allow the creation of a module-info.java file.
5 | */
6 | public class IgnoreMe {
7 | }
8 |
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/scala/one/jpro/platform/routing/NodeView.scala:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing
2 |
3 | import simplefx.all._
4 |
5 | trait NodeView extends View { this: Node =>
6 | final override def content: NodeView with Node = this
7 | }
8 |
--------------------------------------------------------------------------------
/jpro-youtube/example/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | module one.jpro.platform.youtube.example {
2 | requires one.jpro.platform.youtube;
3 | requires javafx.controls;
4 | requires jpro.webapi;
5 |
6 | exports one.jpro.platform.youtube.example;
7 | }
--------------------------------------------------------------------------------
/jpro-auth/routing/src/main/resources/one/jpro/platform/auth/routing/buttons/google/web_dark_sq_SI@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JPro-one/JPro-Platform/HEAD/jpro-auth/routing/src/main/resources/one/jpro/platform/auth/routing/buttons/google/web_dark_sq_SI@2x.png
--------------------------------------------------------------------------------
/jpro-auth/routing/src/main/resources/one/jpro/platform/auth/routing/buttons/google/web_light_sq_SI@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JPro-one/JPro-Platform/HEAD/jpro-auth/routing/src/main/resources/one/jpro/platform/auth/routing/buttons/google/web_light_sq_SI@2x.png
--------------------------------------------------------------------------------
/jpro-mail/example/src/main/resources/one/jpro/platform/mail/example/compose/img/jpro-navy-orange-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JPro-one/JPro-Platform/HEAD/jpro-mail/example/src/main/resources/one/jpro/platform/mail/example/compose/img/jpro-navy-orange-logo.png
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/java/one/jpro/platform/routing/sessionmanager/IgnoreMe.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing.sessionmanager;
2 |
3 | /**
4 | * I only exist to allow the creation of a module-info.java file.
5 | */
6 | public class IgnoreMe {
7 | }
8 |
--------------------------------------------------------------------------------
/jpro-auth/routing/src/main/resources/one/jpro/platform/auth/routing/buttons/google/web_neutral_sq_SI@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JPro-one/JPro-Platform/HEAD/jpro-auth/routing/src/main/resources/one/jpro/platform/auth/routing/buttons/google/web_neutral_sq_SI@2x.png
--------------------------------------------------------------------------------
/jpro-media/src/main/java/one/jpro/platform/media/event/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * {@link one.jpro.platform.media.player.MediaPlayer} and {@link one.jpro.platform.media.recorder.MediaRecorder} events.
3 | *
4 | * @author Besmir Beqiri
5 | */
6 | package one.jpro.platform.media.event;
--------------------------------------------------------------------------------
/jpro-routing/example/src/main/resources/test.css:
--------------------------------------------------------------------------------
1 | .header-link {
2 | -fx-background-radius: 5;
3 | -fx-insets: 4;
4 | -fx-font-size: 20;
5 | -fx-background-color: white;
6 | }
7 |
8 | .header-link:hover {
9 | -fx-font-size: 30;
10 | -fx-background-color: yellow;
11 | }
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/scala/one/jpro/platform/routing/SessionManagerContext.scala:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing
2 |
3 | import one.jpro.platform.routing.sessionmanager.SessionManager
4 |
5 | object SessionManagerContext extends de.sandec.jnodes.context.ContextManager[SessionManager]
6 |
7 |
--------------------------------------------------------------------------------
/jpro-auth/core/src/main/java/one/jpro/platform/auth/core/http/impl/Header.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.auth.core.http.impl;
2 |
3 | /**
4 | * HTTP header with the given name and value.
5 | *
6 | * @author Besmir Beqiri
7 | */
8 | public record Header(String name, String value) {
9 | }
10 |
--------------------------------------------------------------------------------
/jpro-html-scrollpane/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | module one.jpro.platform.htmlscrollpane {
2 | requires transitive one.jpro.platform.utils;
3 | requires jpro.webapi;
4 | requires one.jpro.jmemorybuddy;
5 | requires org.slf4j;
6 |
7 | exports one.jpro.platform.htmlscrollpane;
8 | }
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/resources/one/jpro/platform/routing/extensions/linkheader/css/linkheader.css:
--------------------------------------------------------------------------------
1 |
2 | .linkheader-link-hbox {
3 | -fx-alignment: center;
4 | -fx-padding: 12px;
5 | -fx-spacing: 20px;
6 | }
7 | .linkheader-link {
8 | -fx-font-size: 24;
9 | }
10 | .linkheader-link.selected {
11 | -fx-underline: true;
12 | }
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/scala/one/jpro/platform/routing/Filter.scala:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing
2 |
3 | object Filter {
4 | def empty(): Filter = route => route
5 | }
6 |
7 | @FunctionalInterface
8 | trait Filter {
9 | def apply(route: Route): Route
10 |
11 | def compose(y: Filter): Filter = r => this.apply(y.apply(r))
12 | }
13 |
--------------------------------------------------------------------------------
/jpro-session/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Module descriptor for the Session module.
3 | *
4 | * @author Besmir Beqiri
5 | */
6 | module one.jpro.platform.session {
7 | requires javafx.controls;
8 | requires jpro.webapi;
9 | requires org.slf4j;
10 | requires org.apache.commons.io;
11 |
12 | exports one.jpro.platform.session;
13 | }
--------------------------------------------------------------------------------
/jpro-webrtc/example/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | module one.jpro.platform.webrtc.example {
2 | requires one.jpro.platform.webrtc;
3 | requires javafx.controls;
4 | requires jpro.webapi;
5 | requires one.jpro.platform.routing.core;
6 |
7 | exports one.jpro.platform.webrtc.example.simple;
8 | exports one.jpro.platform.webrtc.example.videoroom;
9 | }
--------------------------------------------------------------------------------
/jpro-html-scrollpane/example/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Module descriptor for the example application.
3 | *
4 | * @author Besmir Beqiri
5 | */
6 | module one.jpro.platform.htmlscrollpane.example {
7 | requires javafx.controls;
8 | requires one.jpro.platform.htmlscrollpane;
9 |
10 | exports one.jpro.platform.htmlscrollpane.example;
11 | }
--------------------------------------------------------------------------------
/jpro-scenegraph/build.gradle:
--------------------------------------------------------------------------------
1 | publishing {
2 | publications {
3 | mavenJava(MavenPublication) {
4 | pom {
5 | name = 'JPro Scenegraph'
6 | description = 'A module that serializes a scene graph to a string representation making it both ' +
7 | 'human and AI friendly.'
8 | }
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/jpro-media/src/test/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
4 | * The APIs are much similar to the JavaFX APIs, but besides 5 | * being used in JavaFX applications running on desktop/mobile devices, 6 | * they can also be used in web applications running via JPro server, 7 | * without changing a single line of code. 8 | *
9 | * The principal classes are {@link MediaSource}, {@link MediaView},
10 | * {@link MediaPlayer} and {@link MediaRecorder}.
11 | *
12 | * @author Besmir Beqiri
13 | */
14 | module one.jpro.platform.media {
15 | requires transitive javafx.controls;
16 | requires transitive javafx.media;
17 | requires javafx.swing;
18 | requires jpro.webapi;
19 | requires org.json;
20 | requires org.slf4j;
21 |
22 | requires org.bytedeco.javacv;
23 | requires org.bytedeco.opencv;
24 | requires org.bytedeco.ffmpeg;
25 |
26 | opens one.jpro.platform.media;
27 | exports one.jpro.platform.media;
28 | exports one.jpro.platform.media.event;
29 | exports one.jpro.platform.media.player;
30 | exports one.jpro.platform.media.recorder;
31 | exports one.jpro.platform.media.util;
32 | }
--------------------------------------------------------------------------------
/jpro-routing/popup/src/main/resources/one/jpro/platform/routing/popup/simplepopup/simplepopup.css:
--------------------------------------------------------------------------------
1 | * {
2 | SHADOW_COLOR_DEFAULT: #88888880;
3 | }
4 |
5 | .simple-popup-background {
6 | -fx-background-color: #0000001c;
7 | }
8 |
9 | .simple-popup-content {
10 | -fx-background-color: white;
11 | -fx-background-radius: 16;
12 | -fx-effect: dropshadow(three-pass-box, SHADOW_COLOR_DEFAULT, 16px, 0.5, 0, 2);
13 | -fx-padding: 24;
14 | -fx-spacing: 32;
15 | -fx-min-width: 400;
16 | -fx-min-height: 400;
17 | }
18 |
19 | .simple-popup-title {
20 | -fx-font-size: 24;
21 | -fx-font-weight: bold;
22 | }
23 |
24 | .simple-popup-top-area {
25 | -fx-padding: -12 -12 0 -12;
26 | }
27 |
28 | .simple-popup-close-button {
29 | -fx-background-color: #00000000;
30 | -fx-background-radius: 16;
31 | -fx-padding: 4;
32 | }
33 |
34 | .simple-popup-close-button .ikonli-font-icon {
35 | -fx-icon-size: 28;
36 | }
37 |
38 | .simple-popup-close-button:hover {
39 | -fx-background-color: #00000022;
40 | }
41 |
42 | .simple-popup-button-area {
43 | -fx-padding: 0 -12 -12 -12;
44 | -fx-alignment: center;
45 | }
46 |
47 | .simple-popup-text {
48 | -fx-font-size: 16;
49 | }
--------------------------------------------------------------------------------
/jpro-sipjs/example/src/main/java/one/jpro/platform/sipjs/example/page/AliceAndBobPage.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.sipjs.example.page;
2 |
3 | import com.jpro.webapi.WebAPI;
4 | import javafx.scene.control.Label;
5 | import javafx.scene.layout.HBox;
6 | import javafx.scene.layout.VBox;
7 | import one.jpro.platform.sipjs.example.component.User;
8 | import static one.jpro.platform.sipjs.example.Variables.*;
9 |
10 | public class AliceAndBobPage extends VBox {
11 |
12 |
13 | public AliceAndBobPage() {
14 | // Add title
15 | var title = new Label("Alice and Bob");
16 | title.getStyleClass().add("title");
17 | getChildren().add(title);
18 | WebAPI.getWebAPI(this, webapi -> {
19 | setup(webapi);
20 | });
21 | getStyleClass().add("jpro-sipjs-example-page");
22 | }
23 |
24 | public void setup(WebAPI webapi) {
25 | var user1 = new User(webapi, server, sipAlice, "Alice", sipBob);
26 | var user2 = new User(webapi, server, sipBob, "Bob", sipAlice);
27 |
28 | var hbox = new HBox(user1, user2);
29 | hbox.getStyleClass().add("alice-and-bob-hbox");
30 |
31 | getChildren().addAll(hbox);
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/jpro-routing/example/src/main/resources/example/filters/SimpleHamburgerMenu.css:
--------------------------------------------------------------------------------
1 |
2 | .top-box {
3 | /*-fx-background-color: orange;*/
4 | -fx-background-color: linear-gradient(to left, #f46b45, #eea849);
5 | -fx-min-height: 50;
6 | -fx-pref-height: 50;
7 | -fx-max-height: 50;
8 | -fx-padding: 0 20 0 20;
9 | -fx-alignment: center-left;
10 | }
11 |
12 | .simplehamburgermenu-burger {
13 | -fx-pref-width: 30;
14 | -fx-alignment: center;
15 | -fx-font-size: 30px;
16 | -fx-text-fill: white;
17 | }
18 |
19 | .simplehamburgermenu-top-links {
20 | -fx-alignment: center-right;
21 | -fx-spacing: 28;
22 | }
23 | .simplehamburgermenu-top-link {
24 | -fx-font-size: 24px;
25 | -fx-text-fill: white;
26 | }
27 | .simplehamburgermenu-top-link.selected,
28 | .simplehamburgermenu-top-link:hover {
29 | -fx-underline: true;
30 | }
31 |
32 | .simplehamburgermenu-expanded-links {
33 | -fx-alignment: center;
34 | -fx-background-color: #000000DD;
35 | -fx-spacing: 20;
36 | -fx-padding: 20;
37 | }
38 |
39 | .simplehamburgermenu-expanded-link {
40 | -fx-font-size: 20px;
41 | -fx-text-fill: white;
42 | }
43 | .simplehamburgermenu-expanded-link.selected,
44 | .simplehamburgermenu-expanded-link:hover {
45 | -fx-underline: true;
46 | }
--------------------------------------------------------------------------------
/jpro-auth/core/src/main/java/one/jpro/platform/auth/core/api/FluentGoogleAuth.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.auth.core.api;
2 |
3 | import javafx.stage.Stage;
4 | import one.jpro.platform.auth.core.oauth2.provider.GoogleAuthenticationProvider;
5 |
6 | /**
7 | * Fluent Google Authentication interface.
8 | *
9 | * @author Besmir Beqiri
10 | */
11 | public interface FluentGoogleAuth {
12 |
13 | /**
14 | * Set the client id.
15 | *
16 | * @param clientId the client id
17 | * @return self
18 | */
19 | FluentGoogleAuth clientId(String clientId);
20 |
21 | /**
22 | * Set the client secret.
23 | *
24 | * @param clientSecret the client secret
25 | * @return self
26 | */
27 | FluentGoogleAuth clientSecret(String clientSecret);
28 |
29 | /**
30 | * Set the redirect uri.
31 | *
32 | * @param redirectUri the redirect uri
33 | * @return self
34 | */
35 | FluentGoogleAuth redirectUri(String redirectUri);
36 |
37 | /**
38 | * Create a Google authentication provider.
39 | *
40 | * @param stage the stage
41 | * @return a {@link GoogleAuthenticationProvider} instance
42 | */
43 | GoogleAuthenticationProvider create(Stage stage);
44 | }
45 |
--------------------------------------------------------------------------------
/jpro-file/src/main/java/one/jpro/platform/file/picker/FileOpenPicker.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.file.picker;
2 |
3 | import com.jpro.webapi.WebAPI;
4 | import javafx.scene.Node;
5 | import one.jpro.platform.file.MultipleFileSelector;
6 |
7 | import java.util.Objects;
8 |
9 | /**
10 | * {@link FilePicker} interface extension for file open operations.
11 | *
12 | * @author Besmir Beqiri
13 | */
14 | public interface FileOpenPicker extends FilePicker, MultipleFileSelector {
15 |
16 | /**
17 | * Creates a file picker. If the application is running in a
18 | * browser via JPro server, then a web version of the file
19 | * picker is returned. If the application is not running inside
20 | * the browser than a desktop version is returned.
21 | *
22 | * @param node the associated node for this file picker
23 | * @return a {@link FileOpenPicker} object.
24 | * @throws NullPointerException if the node is null
25 | */
26 | static FileOpenPicker create(Node node) {
27 | Objects.requireNonNull(node, "node must not be null");
28 | if (WebAPI.isBrowser()) {
29 | return new WebFileOpenPicker(node);
30 | }
31 | return new NativeFileOpenPicker(node);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/jpro-image-manager/src/test/java/one/jpro/platform/image/manager/ImageResultTest.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.image.manager;
2 |
3 | import javafx.application.Platform;
4 | import javafx.scene.image.Image;
5 | import org.junit.jupiter.api.BeforeEach;
6 | import org.junit.jupiter.api.Test;
7 |
8 | import java.io.File;
9 | import java.util.concurrent.CountDownLatch;
10 |
11 | import static org.junit.jupiter.api.Assertions.assertEquals;
12 |
13 | public class ImageResultTest {
14 |
15 | @BeforeEach
16 | void setUp() throws InterruptedException {
17 | CountDownLatch latch = new CountDownLatch(1);
18 | try {
19 | Platform.startup(latch::countDown);
20 | latch.await();
21 | } catch (IllegalStateException ignored) {
22 | }
23 | }
24 |
25 | @Test
26 | public void testToFXImage() {
27 | File testFile = new File("src/test/resources/testImage.png");
28 | ImageResult result = new ImageResult(testFile, 100, 100);
29 | Image fxImage = result.toFXImage();
30 |
31 | // The following assertions could be more detailed depending on the requirements
32 | assertEquals(100, fxImage.getWidth());
33 | assertEquals(100, fxImage.getHeight());
34 | }
35 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | JPRO_PLATFORM_VERSION = 0.5.8-SNAPSHOT
2 |
3 | JPRO_VERSION = 2025.3.1
4 | JAVAFX_BUILD_VERSION = 17.0.15
5 | JAVAFX_EXAMPLES_VERSION = 23.0.2
6 | SIMPLEFX_VERSION = 3.2.40
7 | JMEMORYBUDDY_VERSION = 0.5.6
8 | JNODES_VERSION = 0.8.3
9 | SCENIC_VIEW_VERSION = 11.0.3-SNAPSHOT-FORK
10 |
11 | JAVAFX_PLUGIN_VERSION = 0.1.0
12 | MODULE_PLUGIN_VERSION = 2.0.0
13 | OSDETECTOR_PLUGIN_VERSION = 1.7.3
14 | ENSEMBLE_GRADLE_PLUGIN_VERSION = 0.1.0-SNAPSHOT
15 | DEPENDENCY_CHECK_PLUGIN_VERSION = 9.1.0
16 | MAVEN_CENTRAL_PUBLISH_PLUGIN_VERSION = 1.3.0
17 |
18 | JAVACPP_VERSION = 1.5.10
19 | JAVACV_VERSION = 1.5.10
20 | JSON_VERSION = 20250517
21 | CONTROLSFX_VERSION = 11.2.2
22 | FLEXMARK_VERSION = 0.64.8
23 | JETBRAINS_ANNOTATIONS_VERSION = 26.0.1
24 | JJWT_VERSION = 0.12.6-jpms
25 | JAKARTA_MAIL_API_VERSION = 2.1.3
26 | ECLIPSE_ANGUS_MAIL_VERSION = 2.0.3
27 | ECLIPSE_COLLECTIONS_VERSION = 11.1.0-jpms
28 | CSSFX_VERSION = 11.5.1-jpms
29 | IKONLI_VERSION = 12.4.0
30 | ATLANTAFX_VERSION = 2.0.1
31 | COMMONS_IO_VERSION = 2.19.0
32 | JUNIT_VERSION = 5.13.4
33 | ASSERTJ_VERSION = 3.27.3
34 | HAMCREST_VERSION = 3.0
35 | MOCKITO_VERSION = 5.18.0
36 | TESTFX_VERSION = 4.0.18-jpms
37 | MONOCLE_VERSION = jfx-21-sandec
38 | SLF4J_API_VERSION = 2.0.17
39 | LOGBACK_VERSION = 1.5.18
--------------------------------------------------------------------------------
/jpro-auth/example/src/main/java/one/jpro/platform/auth/example/oauth/page/RefreshTokenPage.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.auth.example.oauth.page;
2 |
3 | import javafx.beans.binding.Bindings;
4 | import javafx.scene.control.Label;
5 | import javafx.scene.layout.VBox;
6 | import one.jpro.platform.auth.example.oauth.OAuthApp;
7 | import one.jpro.platform.mdfx.MarkdownView;
8 |
9 | /**
10 | * Refresh token page.
11 | *
12 | * @author Besmir Beqiri
13 | */
14 | public class RefreshTokenPage extends Page {
15 |
16 | public RefreshTokenPage(OAuthApp loginApp) {
17 | final var headerLabel = new Label("Authentication information\n" +
18 | "after refreshing the access token:");
19 | headerLabel.getStyleClass().add("header-label");
20 |
21 | MarkdownView markdownView = new MarkdownView();
22 | markdownView.mdStringProperty().bind(Bindings.createStringBinding(() -> {
23 | final var user = loginApp.getUserSession().getUser();
24 | return user == null ? "" : loginApp.jsonToMarkdown(user.toJSON());
25 | }));
26 |
27 | final var pane = new VBox(headerLabel, markdownView);
28 | pane.getStyleClass().add("auth-info-pane");
29 |
30 | getChildren().add(pane);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/jpro-file/example/src/main/java/one/jpro/platform/file/example/upload/FileSizeTableCell.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.file.example.upload;
2 |
3 | import javafx.geometry.Pos;
4 | import javafx.scene.control.ContentDisplay;
5 | import javafx.scene.control.TableCell;
6 | import javafx.scene.text.TextAlignment;
7 | import one.jpro.platform.file.FileSource;
8 | import org.apache.commons.io.FileUtils;
9 |
10 | /**
11 | * A custom TableCell for displaying file sizes.
12 | *
13 | * @param The type of the TableView source
14 | * @author Besmir Beqiri
15 | */
16 | public class FileSizeTableCell extends TableCell {
17 |
18 | /**
19 | * Constructs a custom table cell for displaying file size information in a table cell.
20 | */
21 | public FileSizeTableCell() {
22 | setTextAlignment(TextAlignment.RIGHT);
23 | setContentDisplay(ContentDisplay.TEXT_ONLY);
24 | setAlignment(Pos.CENTER_RIGHT);
25 | }
26 |
27 | @Override
28 | protected void updateItem(Long size, boolean empty) {
29 | super.updateItem(size, empty);
30 |
31 | if (empty) {
32 | setText(null);
33 | } else {
34 | setText(FileUtils.byteCountToDisplaySize(size));
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/jpro-auth/example/src/main/java/one/jpro/platform/auth/example/oauth/page/IntrospectionTokenPage.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.auth.example.oauth.page;
2 |
3 | import javafx.beans.binding.Bindings;
4 | import javafx.scene.control.Label;
5 | import javafx.scene.layout.VBox;
6 | import one.jpro.platform.auth.example.oauth.OAuthApp;
7 | import one.jpro.platform.mdfx.MarkdownView;
8 |
9 | /**
10 | * Introspection token page.
11 | *
12 | * @author Besmir Beqiri
13 | */
14 | public class IntrospectionTokenPage extends Page {
15 |
16 | public IntrospectionTokenPage(OAuthApp loginApp) {
17 | final var headerLabel = new Label("Introspect token:");
18 | headerLabel.getStyleClass().add("header-label");
19 |
20 | MarkdownView markdownView = new MarkdownView();
21 | markdownView.mdStringProperty().bind(Bindings.createStringBinding(() -> {
22 | final var introspectionInfo = loginApp.getIntrospectionInfo();
23 | return introspectionInfo == null ? "" : loginApp.jsonToMarkdown(introspectionInfo);
24 | }, loginApp.introspectionInfoProperty()));
25 |
26 | final var pane = new VBox(headerLabel, markdownView);
27 | pane.getStyleClass().add("user-info-pane");
28 |
29 | getChildren().add(pane);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/jpro-auth/core/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Module descriptor for the Auth Core module.
3 | *
4 | * @author Besmir Beqiri
5 | */
6 | module one.jpro.platform.auth.core {
7 | requires transitive javafx.graphics;
8 | requires transitive javafx.controls;
9 | requires transitive org.json;
10 | requires transitive org.slf4j;
11 | requires transitive one.jpro.platform.utils;
12 |
13 | requires org.jetbrains.annotations;
14 | requires java.net.http;
15 | requires jpro.webapi;
16 | requires jjwt.api;
17 |
18 | opens one.jpro.platform.auth.core;
19 | opens one.jpro.platform.auth.core.authentication;
20 | opens one.jpro.platform.auth.core.basic;
21 |
22 | exports one.jpro.platform.auth.core;
23 | exports one.jpro.platform.auth.core.api;
24 | exports one.jpro.platform.auth.core.authentication;
25 | exports one.jpro.platform.auth.core.basic;
26 | exports one.jpro.platform.auth.core.basic.provider;
27 | exports one.jpro.platform.auth.core.crypto;
28 | exports one.jpro.platform.auth.core.crypto.bcrypt;
29 | exports one.jpro.platform.auth.core.http;
30 | exports one.jpro.platform.auth.core.jwt;
31 | exports one.jpro.platform.auth.core.oauth2;
32 | exports one.jpro.platform.auth.core.oauth2.provider;
33 | exports one.jpro.platform.auth.core.utils;
34 | }
--------------------------------------------------------------------------------
/jpro-mail/src/main/java/one/jpro/platform/mail/config/GoogleMailConfig.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.mail.config;
2 |
3 | import one.jpro.platform.mail.StartTLSOption;
4 | import one.jpro.platform.mail.impl.MailConfigImpl;
5 |
6 | /**
7 | * The GoogleMailConfig class provides a predefined configuration for connecting to the Google Mail (Gmail) SMTP server.
8 | * It sets specific properties required to use Gmail's SMTP server for sending emails.
9 | *
10 | *
Example usage:
11 | *{@code
12 | * MailConfig config = new GoogleMailConfig();
13 | * // Further configuration or usage of config
14 | * }
15 | *
16 | * @author Besmir Beqiri
17 | * @see StartTLSOption
18 | */
19 | public class GoogleMailConfig extends MailConfigImpl {
20 |
21 | /**
22 | * Constructs a new GoogleMailConfig instance with default settings for connecting to
23 | * Google's SMTP server. The configuration includes enabling SMTP authentication,
24 | * enabling STARTTLS, setting the SMTP host to Google's SMTP server, and setting the
25 | * SMTP port to the standard port for TLS/STARTTLS.
26 | */
27 | public GoogleMailConfig() {
28 | setMailSmtpAuth(true);
29 | setMailSmtpStartTLS(StartTLSOption.ENABLED);
30 | setMailSmtpHost("smtp.gmail.com");
31 | setMailSmtpPort(587);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/jpro-mdfx/README.md:
--------------------------------------------------------------------------------
1 |
2 | ## JPro MDFX
3 |
4 | ### Introduction
5 |
6 |
7 | JPro MDFX is a simple markdown-renderer for JavaFX.
8 | It's based on [flexmark-java](https://github.com/vsch/flexmark-java).
9 | It is used to render the [documentation for jpro](https://www.jpro.one/?page=docs/current/1.1/) at [jpro.one](https://www.jpro.one/).
10 |
11 |
12 | Usage:
13 | ```
14 | import one.jpro.platform.mdfx.MarkdownView;
15 |
16 | MarkdownView mdfx = new MarkdownView("your-markdown");
17 | ```
18 |
19 | Simple Application:
20 | [Source Code](https://github.com/jpro-one/markdown-javafx-renderer/blob/master/example/src/main/java/com/sandec/mdfx/ExampleMDFX.java)
21 |
22 | Feature Overview:
23 | [Reference-Markdown-File](https://github.com/jpro-one/markdown-javafx-renderer/blob/master/example/src/main/resources/com/sandec/mdfx/sample.md)
24 |
25 |
26 | You can personalize the looking of your markdown via css.
27 | [Minimal default-file](https://github.com/jpro-one/markdown-javafx-renderer/blob/master/src/main/resources/com/sandec/mdfx/mdfx-default.css)
28 | To use your own css, you have to overwrite the `getDefaultStylesheets`.
29 | ```java
30 | protected ListExample usage:
11 | *{@code
12 | * MailConfig config = new MailTrapConfig();
13 | * // Further configuration or usage of config
14 | * }
15 | *
16 | * @author Besmir Beqiri
17 | * @see StartTLSOption
18 | */
19 | public class MailTrapConfig extends MailConfigImpl {
20 |
21 | /**
22 | * Constructs a new MailTrapConfig instance with default settings for connecting to
23 | * MailTrap's SMTP server. The configuration includes enabling SMTP authentication,
24 | * enabling STARTTLS, setting the SMTP host to MailTrap's sandbox server, setting the
25 | * SMTP port and trusting the MailTrap sandbox host for SSL connections.
26 | */
27 | public MailTrapConfig() {
28 | setMailSmtpAuth(true);
29 | setMailSmtpStartTLS(StartTLSOption.ENABLED);
30 | setMailSmtpHost("sandbox.smtp.mailtrap.io");
31 | setMailSmtpPort(25);
32 | setMailSmtpSslTrust("sandbox.smtp.mailtrap.io");
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/jpro-auth/core/src/main/java/one/jpro/platform/auth/core/basic/UserNotFoundException.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.auth.core.basic;
2 |
3 | import one.jpro.platform.auth.core.authentication.User;
4 |
5 | /**
6 | * Represents an exception that is thrown when a {@link User} cannot be located.
7 | *
8 | * @author Besmir Beqiri
9 | */
10 | public class UserNotFoundException extends RuntimeException {
11 |
12 | /**
13 | * Constructs a new UserNotFoundException with the specified detail message.
14 | *
15 | * @param msg the detail message. The detail message is saved for
16 | * later retrieval by the {@link Throwable#getMessage()} method.
17 | */
18 | public UserNotFoundException(String msg) {
19 | super(msg);
20 | }
21 |
22 | /**
23 | * Constructs a new UserNotFoundException with the specified detail message and cause.
24 | *
25 | * @param msg the detail message. The detail message is saved for
26 | * later retrieval by the {@link Throwable#getMessage()} method.
27 | * @param cause the cause (which is saved for later retrieval by the
28 | * {@link Throwable#getCause()} method). (A null value is
29 | * permitted, and indicates that the cause is nonexistent or unknown.)
30 | */
31 | public UserNotFoundException(String msg, Throwable cause) {
32 | super(msg, cause);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/scala/one/jpro/platform/routing/RouteNode.scala:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing
2 |
3 | import com.jpro.webapi.WebAPI
4 | import one.jpro.platform.routing.sessionmanager.SessionManager
5 | import simplefx.core._
6 | import simplefx.all._
7 | import simplefx.experimental._
8 |
9 | import java.lang.ref.WeakReference
10 |
11 | class RouteNode(stage: Stage, route: Route) extends StackPane { THIS =>
12 |
13 | def this(stage: Stage) = {
14 | this(stage, Route.empty())
15 | }
16 |
17 | styleClass ::= "jpro-web-app"
18 | private[routing] var sessionManager: SessionManager = null
19 |
20 | def getSessionManager(): SessionManager = sessionManager
21 |
22 | @Bind private var layoutCounter = 0
23 | def getLayoutCounter(): Int = layoutCounter
24 |
25 | override def layoutChildren(): Unit = {
26 | layoutCounter += 1
27 | if ((this.scene ne null) && WebAPI.isBrowser) {
28 | webAPI.layoutRoot(this.scene)
29 | super.layoutChildren()
30 | } else {
31 | super.layoutChildren()
32 | }
33 | }
34 |
35 | lazy val webAPI: WebAPI = if(WebAPI.isBrowser) com.jpro.webapi.WebAPI.getWebAPI(stage) else null
36 |
37 | var newRoute: Route = route
38 | def getRoute(): Route = newRoute
39 | def setRoute(x: Route): Unit = newRoute = x
40 |
41 |
42 | def start(sessionManager: SessionManager): Response = {
43 | sessionManager.start()
44 | }
45 |
46 |
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/jpro-auth/example/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'org.javamodularity.moduleplugin' version "$MODULE_PLUGIN_VERSION"
3 | id 'org.openjfx.javafxplugin'
4 | id 'jpro-gradle-plugin'
5 | }
6 |
7 | dependencies {
8 | implementation project(':jpro-auth:core')
9 | implementation project(':jpro-auth:routing')
10 | implementation project(':jpro-routing:core')
11 | implementation project(':jpro-routing:dev')
12 | implementation project(':jpro-mdfx')
13 | implementation project(':jpro-session')
14 |
15 | implementation "org.controlsfx:controlsfx:$CONTROLSFX_VERSION"
16 | implementation "one.jpro.platform.jpms:cssfx:$CSSFX_VERSION"
17 | implementation "io.github.mkpaz:atlantafx-base:$ATLANTAFX_VERSION"
18 | runtimeOnly "ch.qos.logback:logback-classic:$LOGBACK_VERSION"
19 | }
20 |
21 | javafx {
22 | version = "$JAVAFX_EXAMPLES_VERSION"
23 | modules = ['javafx.controls', 'javafx.fxml', 'javafx.swing', 'javafx.web']
24 | }
25 |
26 | def examples = [
27 | 'basic-login' : 'one.jpro.platform.auth.example.basic.BasicLoginApp',
28 | 'google-login': 'one.jpro.platform.auth.example.login.GoogleLoginApp',
29 | 'oauth' : 'one.jpro.platform.auth.example.oauth.OAuthApp'
30 | ]
31 |
32 | application {
33 | mainClass = project.hasProperty("sample") ? examples[project.getProperties().get("sample")] : examples["google-login"]
34 | mainModule = "one.jpro.platform.auth.example"
35 | }
--------------------------------------------------------------------------------
/jpro-utils/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | implementation "org.jetbrains:annotations:$JETBRAINS_ANNOTATIONS_VERSION"
3 | implementation "org.slf4j:slf4j-api:$SLF4J_API_VERSION"
4 | implementation "one.jpro:jpro-webapi:$JPRO_VERSION"
5 |
6 | testImplementation "one.jpro:jmemorybuddy:$JMEMORYBUDDY_VERSION"
7 | }
8 |
9 | test {
10 | jvmArgs = [
11 | "-Dglass.platform=Monocle", "-Dmonocle.platform=Headless",
12 | "-Dtestfx.headless=true", "-Djava.awt.headless=true",
13 | "--add-opens", "javafx.graphics/com.sun.glass.ui=org.testfx.core",
14 | "--add-opens", "javafx.graphics/com.sun.javafx.application=org.testfx.core",
15 | "--add-exports", "javafx.graphics/com.sun.javafx.application=org.testfx.core",
16 | "--add-exports", "javafx.graphics/com.sun.glass.ui=org.testfx.monocle",
17 | "--add-exports", "javafx.graphics/com.sun.javafx.util=org.testfx.monocle",
18 | "--add-exports", "javafx.base/com.sun.javafx.logging=org.testfx.monocle"
19 | ]
20 | }
21 |
22 | publishing {
23 | publications {
24 | mavenJava(MavenPublication) {
25 | pom {
26 | name = 'JPro Utils'
27 | description = 'A utility module offering essential tools for various functionalities to enhance the ' +
28 | 'development of **JPro/JavaFX** applications'
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/jpro-auth/core/src/main/java/one/jpro/platform/auth/core/api/FluentMicrosoftAuth.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.auth.core.api;
2 |
3 | import javafx.stage.Stage;
4 | import one.jpro.platform.auth.core.oauth2.provider.MicrosoftAuthenticationProvider;
5 |
6 | /**
7 | * Fluent Microsoft Authentication interface.
8 | *
9 | * @author Besmir Beqiri
10 | */
11 | public interface FluentMicrosoftAuth {
12 |
13 | /**
14 | * Set the client id.
15 | *
16 | * @param clientId the client id
17 | * @return self
18 | */
19 | FluentMicrosoftAuth clientId(String clientId);
20 |
21 | /**
22 | * Set the client secret.
23 | *
24 | * @param clientSecret the client secret
25 | * @return self
26 | */
27 | FluentMicrosoftAuth clientSecret(String clientSecret);
28 |
29 | /**
30 | * Set the tenant.
31 | *
32 | * @param tenant the tenant
33 | * @return self
34 | */
35 | FluentMicrosoftAuth tenant(String tenant);
36 |
37 | /**
38 | * Set the redirect uri.
39 | *
40 | * @param redirectUri the redirect uri
41 | * @return self
42 | */
43 | FluentMicrosoftAuth redirectUri(String redirectUri);
44 |
45 | /**
46 | * Create a Microsoft authentication provider.
47 | *
48 | * @param stage the stage
49 | * @return a {@link MicrosoftAuthenticationProvider} instance
50 | */
51 | MicrosoftAuthenticationProvider create(Stage stage);
52 | }
53 |
--------------------------------------------------------------------------------
/jpro-auth/core/src/main/java/one/jpro/platform/auth/core/authentication/CredentialValidationException.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.auth.core.authentication;
2 |
3 | /**
4 | * Represents an exception that is thrown when {@link Credentials} validation fails.
5 | *
6 | * @author Besmir Beqiri
7 | */
8 | public class CredentialValidationException extends RuntimeException {
9 |
10 | /**
11 | * Constructs a new CredentialValidationException with the specified detail message.
12 | *
13 | * @param message the detail message. The detail message is saved for
14 | * later retrieval by the {@link Throwable#getMessage()} method.
15 | */
16 | public CredentialValidationException(String message) {
17 | super(message);
18 | }
19 |
20 | /**
21 | * Constructs a new CredentialValidationException with the specified detail message and cause.
22 | *
23 | * @param message the detail message. The detail message is saved for
24 | * later retrieval by the {@link Throwable#getMessage()} method.
25 | * @param cause the cause (which is saved for later retrieval by the
26 | * {@link Throwable#getCause()} method). (A null value is
27 | * permitted, and indicates that the cause is nonexistent or unknown.)
28 | */
29 | public CredentialValidationException(String message, Throwable cause) {
30 | super(message, cause);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/jpro-auth/core/src/main/java/one/jpro/platform/auth/core/authentication/Credentials.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.auth.core.authentication;
2 |
3 | import org.json.JSONObject;
4 |
5 | /**
6 | * Abstract representation of a Credentials object.
7 | *
8 | * @author Besmir Beqiri
9 | */
10 | public interface Credentials {
11 |
12 | /**
13 | * Convert the credential information to JSON format.
14 | *
15 | * @return a JSON object.
16 | */
17 | JSONObject toJSON();
18 |
19 | /**
20 | * Implementors should override this method to perform validation.
21 | * An argument is allowed to allow custom validation.
22 | *
23 | * @param arg optional argument or null.
24 | * @param
27 | * Note that the detail message associated with {@code cause} is not
28 | * automatically incorporated in this runtime exception's detail message.
29 | *
30 | * @param message the detail message (which is saved for later retrieval
31 | * by the {@link #getMessage()} method).
32 | * @param cause the cause which is saved for later retrieval by the
33 | * {@link #getCause()} method. A {@code null} value is
34 | * permitted, and indicates that the cause is nonexistent or
35 | * unknown.
36 | */
37 | public MailException(String message, Throwable cause) {
38 | super(message, cause);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/jpro-utils/src/test/java/one/jpro/platform/utils/test/FreezeDetectorTests.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.utils.test;
2 |
3 | import one.jpro.platform.utils.FreezeDetector;
4 | import org.junit.jupiter.api.Test;
5 | import org.testfx.framework.junit5.ApplicationTest;
6 |
7 | import java.time.Duration;
8 | import java.util.concurrent.atomic.AtomicInteger;
9 |
10 | import static org.assertj.core.api.Assertions.assertThat;
11 |
12 | /**
13 | * Tests the freeze detector.
14 | *
15 | * @author Florian Kirmaier
16 | */
17 | public class FreezeDetectorTests extends ApplicationTest {
18 |
19 | @Test
20 | public void testFreezeDetector() throws InterruptedException {
21 | AtomicInteger counter = new AtomicInteger(0);
22 | interact(() -> new FreezeDetector(Duration.ofMillis(100),
23 | (thread, duration) -> counter.incrementAndGet()));
24 |
25 | assertThat(counter.get()).isEqualTo(0);
26 | Thread.sleep(200);
27 | assertThat(counter.get()).isEqualTo(0);
28 | interact(() -> {
29 | try {
30 | Thread.sleep(150);
31 | } catch (InterruptedException ex) {
32 | ex.printStackTrace();
33 | }
34 | });
35 | assertThat(counter.get()).isEqualTo(1);
36 | Thread.sleep(200);
37 | assertThat(counter.get()).isEqualTo(1);
38 | interact(() -> {
39 | try {
40 | Thread.sleep(150);
41 | } catch (InterruptedException ex) {
42 | ex.printStackTrace();
43 | }
44 | });
45 | assertThat(counter.get()).isEqualTo(2);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/jpro-image-manager/src/test/java/one/jpro/platform/image/manager/source/ImageSourceURLTest.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.image.manager.source;
2 |
3 | import one.jpro.platform.image.manager.ImageUtils;
4 | import org.json.JSONObject;
5 | import org.junit.jupiter.api.Test;
6 |
7 | import java.awt.image.BufferedImage;
8 | import java.net.URL;
9 |
10 | import static org.junit.jupiter.api.Assertions.*;
11 |
12 | public class ImageSourceURLTest {
13 | @Test
14 | public void testLoadImageFromURL() {
15 | URL testURL = this.getClass().getResource("/testImage.png");
16 | ImageSourceURL source = new ImageSourceURL(testURL);
17 |
18 | BufferedImage image = source.loadImage();
19 | assertNotNull(image, "Image should be loaded from URL");
20 | }
21 |
22 | @Test
23 | public void testIdentityHashValue() {
24 | URL testURL = this.getClass().getResource("/testImage.png");
25 | ImageSourceURL source = new ImageSourceURL(testURL);
26 |
27 | long hashValue = source.identityHashValue();
28 | assertNotEquals(0, hashValue, "Hash value should be generated from URL");
29 | }
30 |
31 | @Test
32 | public void testJsonSerialization() {
33 | final URL testURL = this.getClass().getResource("/testImage.png");
34 | final ImageSourceURL source = new ImageSourceURL(testURL);
35 |
36 | JSONObject json = new JSONObject();
37 | json.put("type", ImageSourceURL.class.getSimpleName());
38 | json.put("url", ImageUtils.escapeJson(testURL.toString()));
39 |
40 | assertTrue(source.toJSON().similar(json), "JSON representation should contain the URL");
41 | }
42 | }
--------------------------------------------------------------------------------
/jpro-file/example/src/main/java/one/jpro/platform/file/example/upload/UploadIndicatorTableCell.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.file.example.upload;
2 |
3 | import atlantafx.base.theme.Styles;
4 | import javafx.geometry.Pos;
5 | import javafx.scene.control.ContentDisplay;
6 | import javafx.scene.control.ProgressBar;
7 | import javafx.scene.control.TableCell;
8 | import one.jpro.platform.file.FileSource;
9 |
10 | /**
11 | * Represents a custom table cell used to display an upload progress indicator.
12 | * After calling {@link FileSource#uploadFile()} method on the corresponding item,
13 | * the progress bar will indicate the current uploading progress.
14 | *
15 | * @param The type of the TableView items.
16 | * @author Besmir Beqiri
17 | */
18 | public class UploadIndicatorTableCell extends TableCell {
19 |
20 | private final ProgressBar progressBar;
21 |
22 | /**
23 | * Constructs a custom table cell that displays the upload progress bar.
24 | */
25 | public UploadIndicatorTableCell() {
26 | setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
27 | setAlignment(Pos.CENTER);
28 |
29 | progressBar = new ProgressBar();
30 | progressBar.getStyleClass().add(Styles.MEDIUM);
31 | }
32 |
33 | @Override
34 | protected void updateItem(Double progress, boolean empty) {
35 | super.updateItem(progress, empty);
36 |
37 | if (progress == null || empty) {
38 | progressBar.setProgress(0.0);
39 | setGraphic(null);
40 | } else {
41 | progressBar.setProgress(progress);
42 | setGraphic(progressBar);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/jpro-sipjs/example/src/main/java/one/jpro/platform/sipjs/example/page/SelectPage.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.sipjs.example.page;
2 |
3 | import javafx.scene.control.Button;
4 | import javafx.scene.control.Label;
5 | import javafx.scene.layout.HBox;
6 | import javafx.scene.layout.VBox;
7 | import one.jpro.platform.routing.LinkUtil;
8 |
9 | public class SelectPage extends VBox {
10 |
11 | public SelectPage() {
12 | var button1 = new Button("Echo");
13 | var button2 = new Button("Auto");
14 | var button3 = new Button("Alice and Bob");
15 | var button4 = new Button("Alice");
16 | var button5 = new Button("Bob");
17 | button1.getStyleClass().add("select-button");
18 | button2.getStyleClass().add("select-button");
19 | button3.getStyleClass().add("select-button");
20 | button4.getStyleClass().add("select-button");
21 | button5.getStyleClass().add("select-button");
22 | LinkUtil.setLink(button1, "/echo");
23 | LinkUtil.setLink(button2, "/auto");
24 | LinkUtil.setLink(button3, "/aliceAndBob");
25 | LinkUtil.setLink(button4, "/alice");
26 | LinkUtil.setLink(button5, "/bob");
27 |
28 | var hbox = new HBox();
29 | hbox.getStyleClass().add("select-page-hbox");
30 | hbox.setAlignment(javafx.geometry.Pos.CENTER);
31 | hbox.getChildren().addAll(button1, button2, button3, button4, button5);
32 |
33 | var title = new Label("Select a demo");
34 | title.getStyleClass().add("select-page-title");
35 |
36 | getChildren().add(title);
37 | getChildren().add(hbox);
38 | getStyleClass().add("jpro-sipjs-example-page");
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/jpro-auth/example/src/main/java/one/jpro/platform/auth/example/login/page/LoginPage.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.auth.example.login.page;
2 |
3 | import javafx.scene.control.Button;
4 | import javafx.scene.image.Image;
5 | import javafx.scene.image.ImageView;
6 | import one.jpro.platform.auth.core.oauth2.provider.GoogleAuthenticationProvider;
7 | import one.jpro.platform.auth.routing.AuthBasicOAuth2Filter;
8 | import one.jpro.platform.auth.routing.AuthUIProvider;
9 |
10 | import java.util.Optional;
11 |
12 | /**
13 | * Login page.
14 | *
15 | * @author Besmir Beqiri
16 | */
17 | public class LoginPage extends Page {
18 |
19 | public LoginPage(GoogleAuthenticationProvider authProvider, AuthUIProvider uiProvider) {
20 | getStyleClass().add("simple-page");
21 |
22 | final var googleProviderButton = uiProvider.createAuthenticationNode();
23 |
24 | getChildren().add(googleProviderButton);
25 | }
26 |
27 | /**
28 | * Create a button for the given provider.
29 | *
30 | * @param text the provider name
31 | * @return a button node
32 | */
33 | public Button createAuthProviderButton(String text) {
34 | final var iconView = new ImageView();
35 | iconView.setFitWidth(56);
36 | iconView.setFitHeight(56);
37 | Optional.ofNullable(getClass().getResourceAsStream("/images/" + text + "_Logo.png"))
38 | .map(inputStream -> new Image(inputStream, 0, 0, true, true))
39 | .ifPresent(iconView::setImage);
40 |
41 | final var loginButton = new Button("Login with\n" + text, iconView);
42 | loginButton.getStyleClass().addAll("login-button");
43 | return loginButton;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/jpro-routing/core/src/main/scala/one/jpro/platform/routing/RouteApp.scala:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.routing
2 |
3 | import com.jpro.webapi.WebAPI
4 | import javafx.application.Application
5 | import javafx.scene.Scene
6 | import javafx.scene.layout.StackPane
7 | import javafx.stage.{Stage, StageStyle}
8 | import one.jpro.platform.routing.sessionmanager.SessionManager
9 | import simplefx.core._
10 | import simplefx.all._
11 | import simplefx.experimental.FXFuture
12 |
13 | abstract class RouteApp extends Application {
14 |
15 | private var _stage: Stage = null
16 | private var routeNode: RouteNode = null
17 | private var _scene: Scene = null
18 | private var _sessionManager: SessionManager = null
19 | def stageStyle(): StageStyle = StageStyle.DECORATED
20 | def getStage(): Stage = _stage
21 | def getScene(): Scene = _scene
22 | def getSessionManager(): SessionManager = _sessionManager
23 | def getRouteNode(): RouteNode = routeNode
24 | def getWebAPI(): WebAPI = if(WebAPI.isBrowser) WebAPI.getWebAPI(getStage()) else null
25 |
26 | override def start(stage: Stage): Unit = {
27 | startFuture(stage)
28 | }
29 | def startFuture(stage: Stage): Response = {
30 | _stage = stage
31 | stage.initStyle(stageStyle())
32 | routeNode = new RouteNode(stage)
33 |
34 | // Add node between RouteNode and Scene, so Popups work correctly with ScenicView
35 | val root = new StackPane(routeNode)
36 |
37 | _scene = new Scene(root, 1400, 800)
38 | stage.setScene(_scene)
39 | _sessionManager = SessionManager.getDefault(routeNode, stage)
40 | routeNode.setRoute(createRoute())
41 | stage.show()
42 | routeNode.start(_sessionManager)
43 | }
44 |
45 | def createRoute(): Route
46 | }
47 |
--------------------------------------------------------------------------------
/jpro-file/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | implementation "one.jpro:jpro-webapi:$JPRO_VERSION"
3 | implementation "org.jetbrains:annotations:$JETBRAINS_ANNOTATIONS_VERSION"
4 | implementation "org.slf4j:slf4j-api:$SLF4J_API_VERSION"
5 | }
6 |
7 | compileJava {
8 | options.compilerArgs = ["--add-exports", "javafx.base/com.sun.javafx.event=one.jpro.platform.file"]
9 | }
10 |
11 | test {
12 | jvmArgs = [
13 | "--add-exports", "javafx.base/com.sun.javafx.event=one.jpro.platform.file"
14 | ]
15 | }
16 |
17 | javadoc {
18 | options {
19 | encoding = 'UTF-8'
20 | version = true
21 | author = true
22 | addMultilineStringsOption("-add-exports").setValue([
23 | "javafx.base/com.sun.javafx.event=one.jpro.platform.file"
24 | ])
25 | // addStringOption('Xdoclint:none', '-quiet')
26 | }
27 | }
28 |
29 | publishing {
30 | publications {
31 | mavenJava(MavenPublication) {
32 | // Add README.md as an artifact named DOCUMENTATION.md
33 | artifact(source: file('build/docs/DOCUMENTATION.md')) {
34 | classifier 'DOCUMENTATION'
35 | extension 'md'
36 | }
37 |
38 | pom {
39 | name = 'JPro File'
40 | description = 'A module for handling file related operations in JPro/JavaFX applications ' +
41 | 'running natively and via JPro server.'
42 | }
43 | }
44 | }
45 | }
46 |
47 | tasks.register('renameReadme', Copy) {
48 | from 'README.md'
49 | into layout.buildDirectory.dir('docs')
50 | rename 'README.md', 'DOCUMENTATION.md'
51 | }
52 |
53 | javadocJar.dependsOn renameReadme
54 |
--------------------------------------------------------------------------------
/jpro-image-manager/src/main/java/one/jpro/platform/image/manager/ImageUtils.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.image.manager;
2 |
3 | import java.nio.ByteBuffer;
4 | import java.security.MessageDigest;
5 |
6 | /**
7 | * This class provides utility methods for various image operations.
8 | *
9 | * @author Florian Kirmaier
10 | */
11 | public class ImageUtils {
12 |
13 | /**
14 | * Computes the MD5 hash of the given data and returns the first 8 bytes
15 | * of the hash as a long value.
16 | *
17 | * @param data The input data for which the hash needs to be computed.
18 | * @return The first 8 bytes of the MD5 hash as a long value.
19 | * @throws RuntimeException if there's an error computing the hash.
20 | */
21 | public static long computeHashValue(byte[] data) {
22 | try {
23 | MessageDigest md = MessageDigest.getInstance("MD5");
24 | byte[] digest = md.digest(data);
25 |
26 | // Using ByteBuffer to transform the first 8 bytes of the hash into a long value.
27 | return ByteBuffer.wrap(digest, 0, 8).getLong();
28 | } catch (Exception ex) {
29 | throw new RuntimeException("Error computing hash value", ex);
30 | }
31 | }
32 |
33 | /**
34 | * Escapes certain special characters in a JSON string to ensure it's valid.
35 | * Specifically, it escapes backslashes and double quotes.
36 | *
37 | * @param str The input JSON string that might contain characters to be escaped.
38 | * @return The input string with necessary characters escaped.
39 | */
40 | public static String escapeJson(String str) {
41 | return str.replace("\\", "\\\\").replace("\"", "\\\"");
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/jpro-media/example/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'org.bytedeco.gradle-javacpp-platform' version "$JAVACPP_VERSION"
3 | id 'org.openjfx.javafxplugin'
4 | id 'jpro-gradle-plugin'
5 | }
6 |
7 | ext {
8 | // Add more needed platforms here
9 | javacppPlatform = 'linux-x86_64,linux-arm64,macosx-x86_64,macosx-arm64,windows-x86_64'
10 | }
11 |
12 | dependencies {
13 | implementation project(":jpro-media")
14 | implementation project(":jpro-file")
15 | implementation "one.jpro:jpro-webapi:$JPRO_VERSION"
16 | implementation "org.slf4j:slf4j-api:$SLF4J_API_VERSION"
17 | runtimeOnly "ch.qos.logback:logback-classic:$LOGBACK_VERSION"
18 |
19 | implementation "org.bytedeco:javacv-platform:$JAVACV_VERSION"
20 | // compileOnly "org.bytedeco:javacv-platform:$JAVACV_VERSION" // when running on JPro
21 | implementation "io.github.mkpaz:atlantafx-base:$ATLANTAFX_VERSION"
22 | }
23 |
24 | javafx {
25 | version = "$JAVAFX_EXAMPLES_VERSION"
26 | modules = ['javafx.controls', 'javafx.swing', 'javafx.media']
27 | }
28 |
29 | def examples = [
30 | 'media-player' : 'one.jpro.platform.media.example.MediaPlayerSample',
31 | 'media-recorder' : 'one.jpro.platform.media.example.MediaRecorderSample',
32 | 'media-recorder-and-player': 'one.jpro.platform.media.example.MediaRecorderAndPlayerSample'
33 | ]
34 |
35 | application {
36 | mainClass = project.hasProperty("sample") ? examples[project.getProperties().get("sample")] : examples["media-recorder-and-player"]
37 | mainModule = 'one.jpro.platform.media.example'
38 | applicationDefaultJvmArgs = [
39 | "--add-exports", "javafx.base/com.sun.javafx.event=one.jpro.platform.media"
40 | ]
41 | }
42 |
--------------------------------------------------------------------------------
/jpro-auth/example/src/main/java/one/jpro/platform/auth/example/basic/page/SignedInPage.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.auth.example.basic.page;
2 |
3 | import javafx.scene.control.Button;
4 | import javafx.scene.control.Label;
5 | import javafx.scene.control.TextArea;
6 | import javafx.scene.layout.VBox;
7 | import one.jpro.platform.auth.example.basic.BasicLoginApp;
8 |
9 | /**
10 | * Signed in page.
11 | *
12 | * @author Besmir Beqiri
13 | */
14 | public class SignedInPage extends Page {
15 |
16 | public SignedInPage(BasicLoginApp app) {
17 | final var headerLabel = new Label("Not signed in.");
18 | headerLabel.getStyleClass().add("header-label");
19 |
20 | final var user = app.userSession.getUser();
21 | if (user == null) {
22 | getChildren().add(headerLabel);
23 | } else {
24 | headerLabel.setText("Signed in as: " + user.getName());
25 |
26 | final var userInfoTextArea = new TextArea();
27 | userInfoTextArea.setWrapText(true);
28 | userInfoTextArea.setEditable(false);
29 | userInfoTextArea.setPrefHeight(600.0);
30 | userInfoTextArea.setText(user.toJSON().toString());
31 |
32 | final var signOutButton = new Button("Sign out");
33 | signOutButton.setOnAction(event -> {
34 | app.userSession.setUser(null);
35 | app.getSessionManager().gotoURL("/");
36 | });
37 | signOutButton.setDefaultButton(true);
38 |
39 | final var pane = new VBox(headerLabel, userInfoTextArea, signOutButton);
40 | pane.getStyleClass().add("signed-in-user-pane");
41 |
42 | getChildren().add(pane);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/jpro-auth/core/src/main/java/one/jpro/platform/auth/core/api/FluentBasicAuthAPI.java:
--------------------------------------------------------------------------------
1 | package one.jpro.platform.auth.core.api;
2 |
3 | import one.jpro.platform.auth.core.basic.UserManager;
4 | import one.jpro.platform.auth.core.basic.provider.BasicAuthenticationProvider;
5 |
6 | import java.util.Map;
7 | import java.util.Set;
8 |
9 | /**
10 | * Fluent Basic (username and password) Authentication API.
11 | *
12 | * @author Besmir Beqiri
13 | */
14 | public class FluentBasicAuthAPI implements FluentBasicAuth {
15 |
16 | private UserManager userManager;
17 | private SetMailClient instance
19 | */
20 | @NotNull
21 | static MailClient create(@NotNull MailConfig mailConfig) {
22 | return new MailClientImpl(mailConfig);
23 | }
24 |
25 | /**
26 | * Creates a new MailClient instance with the given mail configuration, username, and password.
27 | *
28 | * @param mailConfig the {@link MailConfig} object containing the mail configuration
29 | * @param username the username for authentication
30 | * @param password the password for authentication
31 | * @return a new MailClient instance
32 | */
33 | @NotNull
34 | static MailClient create(@NotNull MailConfig mailConfig,
35 | @NotNull String username,
36 | @NotNull String password) {
37 | return new MailClientImpl(mailConfig, username, password);
38 | }
39 |
40 | /**
41 | * Creates a new mail message.
42 | *
43 | * @return a new MailMessage instance
44 | */
45 | @NotNull
46 | MailMessage createMessage();
47 | }
48 |
--------------------------------------------------------------------------------