├── ext ├── uitest │ ├── .gitignore │ ├── .settings │ │ ├── org.eclipse.m2e.core.prefs │ │ └── org.eclipse.jdt.core.prefs │ ├── src │ │ ├── test │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── minimalj │ │ │ │ └── test │ │ │ │ └── TestApplication.properties │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── minimalj │ │ │ └── test │ │ │ ├── LoginFrameFacade.java │ │ │ ├── headless │ │ │ └── HeadlessActionTestFacade.java │ │ │ └── UiTestFacade.java │ ├── .project │ └── README.adoc ├── vaadin │ ├── frontend │ │ └── .gitignore │ ├── src │ │ └── main │ │ │ ├── resources │ │ │ ├── META-INF │ │ │ │ ├── services │ │ │ │ │ └── com.vaadin.flow.server.VaadinServiceInitListener │ │ │ │ └── resources │ │ │ │ │ └── icons │ │ │ │ │ └── icon.png │ │ │ ├── application.properties │ │ │ └── banner.txt │ │ │ └── java │ │ │ └── org │ │ │ └── minimalj │ │ │ └── frontend │ │ │ └── impl │ │ │ └── vaadin │ │ │ └── toolkit │ │ │ ├── VaadinComponentWithWidth.java │ │ │ ├── VaadinTitle.java │ │ │ ├── VaadinHorizontalLayout.java │ │ │ ├── VaadinHtmlContent.java │ │ │ └── VaadinCheckBox.java │ ├── .npmrc │ ├── .gitignore │ └── .project ├── historized │ ├── .gitignore │ ├── logging.properties │ ├── src │ │ ├── test │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── minimalj │ │ │ │ └── repository │ │ │ │ └── sql │ │ │ │ ├── E.java │ │ │ │ ├── F.java │ │ │ │ ├── B.java │ │ │ │ ├── C.java │ │ │ │ ├── relationhist │ │ │ │ ├── TestElementC.java │ │ │ │ ├── TestElementHistorized.java │ │ │ │ └── TestEntity.java │ │ │ │ └── A.java │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── minimalj │ │ │ └── repository │ │ │ └── sql │ │ │ └── HistorizedListTable.java │ └── .settings │ │ └── org.eclipse.jdt.core.prefs ├── memory │ ├── .gitignore │ ├── .settings │ │ └── .gitignore │ └── src │ │ └── test │ │ └── java │ │ └── org │ │ └── minimalj │ │ └── repository │ │ └── memory │ │ ├── AView.java │ │ ├── E.java │ │ ├── M.java │ │ ├── I.java │ │ ├── K.java │ │ ├── B.java │ │ ├── C.java │ │ ├── H.java │ │ ├── G.java │ │ └── A.java ├── .gitignore ├── servlet │ ├── example │ │ ├── 001_HelloWorld │ │ │ ├── .gitignore │ │ │ ├── .settings │ │ │ │ ├── org.eclipse.wst.jsdt.ui.superType.name │ │ │ │ ├── org.eclipse.wst.validation.prefs │ │ │ │ ├── org.eclipse.wst.jsdt.ui.superType.container │ │ │ │ ├── org.eclipse.m2e.core.prefs │ │ │ │ ├── org.eclipse.wst.common.project.facet.core.xml │ │ │ │ ├── .jsdtscope │ │ │ │ └── org.eclipse.jdt.core.prefs │ │ │ └── src │ │ │ │ └── org │ │ │ │ └── minimalj │ │ │ │ └── example │ │ │ │ └── helloworld │ │ │ │ ├── HelloWorldApplication.java │ │ │ │ └── HelloWorldPage.java │ │ ├── 002_WebApplication │ │ │ ├── .gitignore │ │ │ ├── .settings │ │ │ │ ├── org.eclipse.wst.jsdt.ui.superType.name │ │ │ │ ├── org.eclipse.wst.validation.prefs │ │ │ │ ├── org.eclipse.wst.jsdt.ui.superType.container │ │ │ │ ├── org.eclipse.m2e.core.prefs │ │ │ │ ├── org.eclipse.wst.common.project.facet.core.xml │ │ │ │ ├── .jsdtscope │ │ │ │ └── org.eclipse.jdt.core.prefs │ │ │ └── src │ │ │ │ └── org │ │ │ │ └── minimalj │ │ │ │ └── example │ │ │ │ └── helloworld2 │ │ │ │ └── HelloWorldPage.java │ │ └── 003_XmlConfiguration │ │ │ ├── .gitignore │ │ │ ├── .settings │ │ │ ├── org.eclipse.wst.jsdt.ui.superType.name │ │ │ ├── org.eclipse.wst.jsdt.ui.superType.container │ │ │ ├── org.eclipse.wst.validation.prefs │ │ │ ├── org.eclipse.m2e.core.prefs │ │ │ ├── org.eclipse.wst.common.project.facet.core.xml │ │ │ ├── .jsdtscope │ │ │ └── org.eclipse.jdt.core.prefs │ │ │ └── src │ │ │ └── org │ │ │ └── minimalj │ │ │ └── example │ │ │ └── helloworld │ │ │ └── HelloWorldApplication.java │ ├── .gitignore │ ├── doc │ │ └── war-structure.png │ └── src │ │ └── main │ │ └── java │ │ └── META-INF │ │ └── services │ │ └── javax.servlet.ServletContainerInitializer ├── soft │ ├── .gitignore │ ├── doc │ │ └── screenshot_flotte_sohle.png │ └── README.adoc ├── ignite │ ├── .gitignore │ ├── .settings │ │ └── .gitignore │ └── src │ │ └── test │ │ └── java │ │ └── org │ │ └── minimalj │ │ └── repository │ │ └── ignite │ │ ├── AView.java │ │ ├── E.java │ │ ├── M.java │ │ ├── I.java │ │ ├── K.java │ │ ├── B.java │ │ ├── C.java │ │ ├── H.java │ │ ├── G.java │ │ └── A.java ├── nanohttpd │ └── .gitignore ├── rest │ ├── .gitignore │ └── src │ │ └── main │ │ └── resources │ │ └── swagger-ui │ │ ├── swagger-ui.css.map │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── swagger-ui.js.map │ │ ├── swagger-ui-standalone-preset.js.map │ │ └── swagger-ui-bundle.js.map ├── vaadin8 │ ├── src │ │ └── main │ │ │ ├── webapp │ │ │ └── VAADIN │ │ │ │ └── themes │ │ │ │ └── mjtheme │ │ │ │ ├── .gitignore │ │ │ │ ├── addons.scss │ │ │ │ └── styles.scss │ │ │ └── java │ │ │ ├── org │ │ │ └── minimalj │ │ │ │ └── frontend │ │ │ │ └── impl │ │ │ │ └── vaadin │ │ │ │ ├── package-info.html │ │ │ │ ├── toolkit │ │ │ │ ├── VaadinComponentWithWidth.java │ │ │ │ ├── VaadinTitle.java │ │ │ │ ├── VaadinVerticalLayout.java │ │ │ │ ├── VaadinHorizontalLayout.java │ │ │ │ └── VaadinCheckBox.java │ │ │ │ └── MjWidgetSet.gwt.xml │ │ │ └── META-INF │ │ │ └── MANIFEST.MF │ └── .gitignore ├── javafx │ ├── .gitignore │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── minimalj │ │ └── frontend │ │ └── impl │ │ └── javafx │ │ ├── toolkit │ │ ├── FxText.java │ │ ├── FxAction.java │ │ └── FxComboBox.java │ │ └── FxNavigationTree.java ├── lanterna │ ├── .gitignore │ └── src │ │ └── main │ │ └── java │ │ ├── META-INF │ │ └── MANIFEST.MF │ │ ├── com │ │ └── googlecode │ │ │ └── lanterna │ │ │ └── gui2 │ │ │ └── menu │ │ │ └── package-info.java │ │ └── org │ │ └── minimalj │ │ └── frontend │ │ └── impl │ │ └── lanterna │ │ ├── package.html │ │ └── toolkit │ │ ├── LanternaLayout.java │ │ ├── LanternaText.java │ │ └── LanternaReadOnlyTextField.java ├── metamodel │ ├── .gitignore │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── minimalj │ │ │ └── metamodel │ │ │ └── model │ │ │ └── MjEnumValue.java │ │ └── resources │ │ └── MjModel.properties ├── resources │ └── .gitignore ├── swingfxbrowser │ ├── .gitignore │ └── src │ │ └── test │ │ └── java │ │ └── org │ │ └── minimalj │ │ └── frontend │ │ └── impl │ │ └── swing │ │ └── component │ │ └── FxHtmlContentTest.java ├── thymeleaf │ └── .gitignore ├── undertow │ └── .gitignore ├── ubersetzung │ ├── .gitignore │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── minimalj │ │ │ └── ubersetzung │ │ │ ├── model │ │ │ ├── UbersetzungView.java │ │ │ ├── UbersetzungEntry.java │ │ │ └── Ubersetzung.java │ │ │ └── frontend │ │ │ └── UbersetzungPage.java │ ├── .project │ └── bin │ │ └── .project ├── vaadin8-servlet │ ├── .gitignore │ └── src │ │ └── main │ │ └── webapp │ │ └── META-INF │ │ └── services │ │ └── javax.servlet.ServletContainerInitializer ├── vaadin8_springboot │ ├── .gitignore │ └── src │ │ └── main │ │ └── java │ │ ├── META-INF │ │ └── MANIFEST.MF │ │ └── org │ │ └── minimalj │ │ └── frontend │ │ └── impl │ │ └── vaadin │ │ └── VaadinSpringUI.java └── cheerpj │ └── .gitignore ├── _config.yml ├── example ├── heroku │ ├── .gitignore │ └── .project ├── .gitignore ├── Minimal-J_Currencies │ ├── .gitignore │ ├── .settings │ │ └── .gitignore │ ├── src │ │ └── org │ │ │ └── minimalj │ │ │ └── example │ │ │ └── currencies │ │ │ ├── frontend │ │ │ ├── ImportIsoCurrencyInformationAction.java │ │ │ └── CurrencyTablePage.java │ │ │ └── model │ │ │ ├── Currency.java │ │ │ └── IsoCurrencyInformation.java │ └── .project ├── 019_MiniMail │ ├── .gitignore │ ├── src │ │ └── main │ │ │ ├── resources │ │ │ ├── mail.properties │ │ │ └── org │ │ │ │ └── minimalj │ │ │ │ └── example │ │ │ │ └── minimail │ │ │ │ ├── MiniMail_de.properties │ │ │ │ └── MiniMail.properties │ │ │ └── java │ │ │ └── org │ │ │ └── minimalj │ │ │ └── example │ │ │ └── minimail │ │ │ ├── model │ │ │ ├── MailHeader.java │ │ │ └── Mail.java │ │ │ └── frontend │ │ │ └── MailTable.java │ └── .settings │ │ └── .gitignore ├── 022_OpenApiClient │ ├── .gitignore │ └── .settings │ │ └── .gitignore ├── 014_TimeSheet │ └── timesheet │ │ ├── .gitignore │ │ └── src │ │ └── org │ │ └── minimalj │ │ └── example │ │ └── timesheet │ │ ├── model │ │ ├── Employee.java │ │ ├── WorkForProject.java │ │ ├── Project.java │ │ └── Work.java │ │ └── frontend │ │ ├── NewProjectEditor.java │ │ └── NewWorkEditor.java ├── 009_eBanking │ ├── .gitignore │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── minimalj │ │ └── example │ │ └── ebanking │ │ └── model │ │ ├── Account.java │ │ └── AccountPosition.java ├── 015_BookPub │ ├── .gitignore │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── minimalj │ │ └── example │ │ └── bookpub │ │ ├── entity │ │ ├── Reviewer.java │ │ ├── Publisher.java │ │ ├── Author.java │ │ └── Book.java │ │ ├── CountBooksPage.java │ │ └── BookpubApplication.java ├── 016_Weather │ ├── .gitignore │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── minimalj │ │ │ └── example │ │ │ └── weather │ │ │ └── model │ │ │ ├── Rain.java │ │ │ ├── Sys_.java │ │ │ ├── Clouds.java │ │ │ ├── Sys.java │ │ │ ├── Coord.java │ │ │ ├── Wind.java │ │ │ ├── WeatherDescription.java │ │ │ ├── City.java │ │ │ ├── Main.java │ │ │ ├── Weather.java │ │ │ └── WeatherList.java │ │ └── test │ │ └── java │ │ └── JsonReaderTest.java ├── CloudFoundry │ ├── .gitignore │ └── WebContent │ │ └── META-INF │ │ └── MANIFEST.MF ├── 003_Notes │ ├── WebContent │ │ └── META-INF │ │ │ └── MANIFEST.MF │ ├── .gitignore │ ├── doc │ │ └── 003_eclipse_build_path.png │ ├── src │ │ └── org │ │ │ └── minimalj │ │ │ └── example │ │ │ └── notes │ │ │ ├── NotesApplication.properties │ │ │ ├── NotesApplication_de.properties │ │ │ ├── Note.java │ │ │ ├── NoteTablePage.java │ │ │ ├── NotesApplication.java │ │ │ └── NewNoteEditor.java │ └── logging.properties ├── 007_PetClinic │ ├── src │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ ├── tiger.jpg │ │ ├── org │ │ │ └── minimalj │ │ │ │ └── example │ │ │ │ └── petclinic │ │ │ │ ├── model │ │ │ │ ├── PetType.csv │ │ │ │ ├── Specialty.java │ │ │ │ ├── Visit.java │ │ │ │ ├── PetType.java │ │ │ │ └── Vet.java │ │ │ │ ├── PetClinicApplication_de.properties │ │ │ │ ├── frontend │ │ │ │ ├── OwnerForm.java │ │ │ │ ├── VetTablePage.java │ │ │ │ └── AddOwnerEditor.java │ │ │ │ └── PetClinicApplication.properties │ │ └── intro.html │ └── .gitignore ├── 002_HelloWorld │ ├── .gitignore │ ├── doc │ │ ├── 002_Greeting.png │ │ └── 002_HelloWorld.png │ └── src │ │ └── org │ │ └── minimalj │ │ └── example │ │ ├── helloworld │ │ ├── HelloWorldApplication.java │ │ └── HelloWorldPage.java │ │ ├── helloworld2 │ │ ├── User.java │ │ ├── GreetingApplication.java │ │ └── GreetingPage.java │ │ └── helloworld3 │ │ ├── User.java │ │ └── GreetingApplication.java ├── 004_Library │ ├── .gitignore │ ├── src │ │ └── main │ │ │ ├── webapp │ │ │ └── META-INF │ │ │ │ └── MANIFEST.MF │ │ │ └── java │ │ │ └── org │ │ │ └── minimalj │ │ │ └── example │ │ │ └── library │ │ │ ├── model │ │ │ ├── Media.properties │ │ │ ├── Media.java │ │ │ ├── ExampleFormats.java │ │ │ ├── Lend.java │ │ │ └── Customer.java │ │ │ ├── MjExampleApplication_de.properties │ │ │ ├── transaction │ │ │ └── ProlongTransaction.java │ │ │ ├── frontend │ │ │ ├── form │ │ │ │ ├── BookForm.java │ │ │ │ └── LendForm.java │ │ │ └── page │ │ │ │ └── BookPage.java │ │ │ └── MjExampleApplication.properties │ └── doc │ │ └── 004_buch_eingeben.png ├── 005_Numbers │ ├── .gitignore │ ├── doc │ │ └── 005_numbers.png │ └── src │ │ └── org │ │ └── minimalj │ │ └── example │ │ └── numbers │ │ ├── NumbersForm.java │ │ ├── NumbersApplication.java │ │ └── NumbersEditor.java ├── 006_Persistence │ └── .gitignore ├── 001_EmptyApplication │ ├── .gitignore │ ├── doc │ │ ├── 001_EmptyApplication.png │ │ ├── 001_EclipseRunSettingsMain.png │ │ └── 001_EclipseRunSettingsClasspath.png │ └── src │ │ └── org │ │ └── minimalj │ │ └── example │ │ └── empty │ │ └── EmptyApplication.java ├── 013_NewsFeed │ ├── .gitignore │ └── src │ │ └── org │ │ └── minimalj │ │ └── example │ │ └── newsfeed │ │ ├── RssNewsApplication_de.properties │ │ ├── RssNewsApplication.properties │ │ └── model │ │ ├── Channel.java │ │ └── Item.java ├── 012_MiniBoost │ ├── .gitignore │ └── src │ │ └── org │ │ └── minimalj │ │ └── example │ │ └── miniboost │ │ ├── model │ │ ├── Contact.java │ │ ├── CustomerLookup.java │ │ ├── Role.java │ │ ├── EmployeeLookup.java │ │ ├── Address.java │ │ └── ProjectCost.java │ │ └── frontend │ │ ├── CustomerForm.java │ │ ├── AddProjectEditor.java │ │ └── AddCustomerEditor.java └── 020_MinimalClinic │ ├── src │ └── org │ │ └── minimalj │ │ └── example │ │ └── minimalclinic │ │ ├── model │ │ ├── Specialty.properties │ │ ├── Specialty_de.properties │ │ ├── PetType.csv │ │ ├── Specialty.java │ │ ├── PetType.java │ │ └── Visit.java │ │ ├── web │ │ ├── tiger.jpg │ │ └── intro.html │ │ ├── MinimalClinicApplication_de.properties │ │ ├── package.html │ │ └── frontend │ │ ├── VetForm.java │ │ ├── OwnerForm.java │ │ ├── PetTablePage.java │ │ ├── AddVetEditor.java │ │ └── AddOwnerEditor.java │ └── .gitignore ├── src ├── test │ ├── java │ │ └── org │ │ │ └── minimalj │ │ │ ├── model │ │ │ ├── EnumHackTestEnum.properties │ │ │ ├── EnumHackTestEnum.java │ │ │ └── EnumHackTest.java │ │ │ ├── security │ │ │ └── permissiontest │ │ │ │ ├── TestEntityA.java │ │ │ │ ├── pkgrole │ │ │ │ ├── package-info.java │ │ │ │ ├── TestEntityG.java │ │ │ │ └── TestEntityH.java │ │ │ │ ├── TestEntityB.java │ │ │ │ ├── TestEntityBView.java │ │ │ │ ├── TestTransaction.java │ │ │ │ └── TestTransactionU.java │ │ │ ├── repository │ │ │ └── sql │ │ │ │ ├── AView.java │ │ │ │ ├── E.java │ │ │ │ ├── M.java │ │ │ │ ├── I.java │ │ │ │ ├── relation │ │ │ │ ├── TestElementCodeView.java │ │ │ │ ├── TestElementC.java │ │ │ │ ├── TestElementCode.java │ │ │ │ ├── TestElementB.java │ │ │ │ └── TestEntity.java │ │ │ │ ├── B.java │ │ │ │ ├── C.java │ │ │ │ ├── K.java │ │ │ │ ├── H.java │ │ │ │ ├── view │ │ │ │ ├── TestView.java │ │ │ │ └── TestEntity.java │ │ │ │ ├── SqlReadWithStringIdTest.java │ │ │ │ ├── G.java │ │ │ │ ├── SqlTest.java │ │ │ │ └── A.java │ │ │ ├── resources │ │ │ ├── ResourceTestApplication2.java │ │ │ ├── ResourceTestApplication1.java │ │ │ └── ApplicationResourceBundleTest.java │ │ │ └── backend │ │ │ └── BackendTest.java │ └── resources │ │ ├── ResourceTestApplication2.properties │ │ ├── TestApplication.properties │ │ ├── ResourceTestApplication1.properties │ │ └── org │ │ └── minimalj │ │ └── util │ │ └── resources │ │ └── ResourcesTest.properties └── main │ ├── resources │ ├── application_16.png │ └── org │ │ └── minimalj │ │ └── frontend │ │ └── impl │ │ ├── web │ │ └── roboto.woff2 │ │ └── swing │ │ ├── favorit.png │ │ ├── favorite_no.png │ │ ├── field_error.png │ │ ├── favorite_yes.png │ │ ├── favorite_disabled.png │ │ ├── fieldAction.svg │ │ ├── fieldMenu.svg │ │ ├── lookAndFeel │ │ ├── PrintLookAndFeel.properties │ │ └── TerminalLookAndFeel.properties │ │ ├── filter.svg │ │ ├── back.svg │ │ └── forward.svg │ └── java │ └── org │ └── minimalj │ ├── frontend │ ├── page │ │ ├── WheelListener.java │ │ ├── ProgressListener.java │ │ ├── EmptyPage.java │ │ ├── ExpiredPage.java │ │ ├── SimpleTableEditorPage.java │ │ ├── DetailPageAction.java │ │ └── ExceptionPage.java │ ├── impl │ │ ├── json │ │ │ ├── JsonPush.java │ │ │ ├── JsonQueryContent.java │ │ │ ├── JsonHtmlContent.java │ │ │ ├── JsonCheckBox.java │ │ │ ├── JsonLoginContent.java │ │ │ └── JsonDashboardContent.java │ │ ├── web │ │ │ └── MjHttpHandler.java │ │ ├── swing │ │ │ ├── lookAndFeel │ │ │ │ ├── MetalThemeProvider.java │ │ │ │ ├── TerminalLargeFontLookAndFeel.java │ │ │ │ └── TerminalTextFieldUI.java │ │ │ └── toolkit │ │ │ │ ├── SwingTitle.java │ │ │ │ └── SwingHorizontalLayout.java │ │ └── util │ │ │ └── FavoritesManager.java │ ├── editor │ │ ├── Result.java │ │ └── WizardStep.java │ ├── action │ │ └── Separator.java │ ├── form │ │ └── element │ │ │ ├── Indication.java │ │ │ ├── Enable.java │ │ │ ├── UnknownFormElement.java │ │ │ └── CodeFormElement.java │ └── util │ │ └── LazyLoadingList.java │ ├── model │ ├── Dependable.java │ ├── annotation │ │ ├── AutoIncrement.java │ │ ├── Signed.java │ │ ├── Materialized.java │ │ ├── Visible.java │ │ ├── Searched.java │ │ ├── Comment.java │ │ ├── Enabled.java │ │ ├── NotEmpty.java │ │ ├── Width.java │ │ ├── SelfReferenceAllowed.java │ │ └── Decimal.java │ └── View.java │ ├── security │ ├── AccessControl.java │ ├── RememberMeAuthentication.java │ └── model │ │ ├── RememberMeToken.java │ │ ├── UserPassword.java │ │ └── UserRole.java │ ├── repository │ ├── TransactionalRepository.java │ ├── query │ │ ├── AllCriteria.java │ │ ├── FieldOperator.java │ │ └── Order.java │ └── sql │ │ ├── ListTable.java │ │ └── TableCreator.java │ ├── util │ ├── ChangeListener.java │ ├── LoggingRuntimeException.java │ └── NonNull.java │ ├── transaction │ ├── Role.java │ ├── InputStreamTransaction.java │ └── OutputStreamTransaction.java │ └── backend │ └── repository │ ├── InsertTransaction.java │ ├── ReadTransaction.java │ ├── UpdateTransaction.java │ ├── ReadEntityTransaction.java │ ├── CountTransaction.java │ ├── EntityTransaction.java │ └── ReadCriteriaTransaction.java ├── doc ├── frontends.png ├── routing_person.png ├── frontend_backend.png ├── client_server_split.png ├── user_guide │ ├── dialog.png │ ├── navigation.png │ ├── page_actions.png │ ├── application_blocks.png │ ├── greet_application.png │ ├── petclinic_application.png │ └── petclinic_application_zoom.png ├── frontend_backend_components.png ├── page_with_detail_large_device.png ├── page_with_detail_small_device.png └── mj_classes.adoc ├── logging.properties └── .gitignore /ext/uitest/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-minimal -------------------------------------------------------------------------------- /example/heroku/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /bin/ 3 | -------------------------------------------------------------------------------- /ext/vaadin/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | /index.html 2 | -------------------------------------------------------------------------------- /example/Minimal-J_Currencies/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /target/ 3 | -------------------------------------------------------------------------------- /ext/historized/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | -------------------------------------------------------------------------------- /ext/memory/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | -------------------------------------------------------------------------------- /ext/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | /.settings/ 5 | -------------------------------------------------------------------------------- /ext/servlet/example/001_HelloWorld/.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /target/ 3 | -------------------------------------------------------------------------------- /ext/soft/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | /.settings/ -------------------------------------------------------------------------------- /src/test/java/org/minimalj/model/EnumHackTestEnum.properties: -------------------------------------------------------------------------------- 1 | a = Test 2 | -------------------------------------------------------------------------------- /src/test/resources/ResourceTestApplication2.properties: -------------------------------------------------------------------------------- 1 | Property1and2 = in2 -------------------------------------------------------------------------------- /example/019_MiniMail/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | -------------------------------------------------------------------------------- /ext/ignite/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | /ignite/ 5 | -------------------------------------------------------------------------------- /ext/nanohttpd/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.project 3 | /.settings 4 | /.classpath -------------------------------------------------------------------------------- /ext/rest/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | -------------------------------------------------------------------------------- /ext/servlet/example/002_WebApplication/.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /target/ 3 | -------------------------------------------------------------------------------- /ext/servlet/example/003_XmlConfiguration/.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /target/ 3 | -------------------------------------------------------------------------------- /ext/vaadin8/src/main/webapp/VAADIN/themes/mjtheme/.gitignore: -------------------------------------------------------------------------------- 1 | /styles.css 2 | -------------------------------------------------------------------------------- /example/022_OpenApiClient/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | -------------------------------------------------------------------------------- /example/Minimal-J_Currencies/.settings/.gitignore: -------------------------------------------------------------------------------- 1 | /org.eclipse.m2e.core.prefs 2 | -------------------------------------------------------------------------------- /ext/javafx/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | -------------------------------------------------------------------------------- /ext/lanterna/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | -------------------------------------------------------------------------------- /ext/metamodel/.gitignore: -------------------------------------------------------------------------------- 1 | /.classpath 2 | /.project 3 | /target/ 4 | /.settings/ 5 | -------------------------------------------------------------------------------- /ext/resources/.gitignore: -------------------------------------------------------------------------------- 1 | /.classpath 2 | /.project 3 | /target/ 4 | /.settings/ 5 | -------------------------------------------------------------------------------- /ext/servlet/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | -------------------------------------------------------------------------------- /ext/swingfxbrowser/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | /.settings/ -------------------------------------------------------------------------------- /ext/thymeleaf/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | /.settings 5 | -------------------------------------------------------------------------------- /ext/undertow/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | /.settings 5 | -------------------------------------------------------------------------------- /ext/vaadin8/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | -------------------------------------------------------------------------------- /src/test/resources/TestApplication.properties: -------------------------------------------------------------------------------- 1 | Application.name = Test Application -------------------------------------------------------------------------------- /example/014_TimeSheet/timesheet/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | -------------------------------------------------------------------------------- /ext/ubersetzung/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | /.settings/ 5 | -------------------------------------------------------------------------------- /doc/frontends.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/doc/frontends.png -------------------------------------------------------------------------------- /example/009_eBanking/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | -------------------------------------------------------------------------------- /example/015_BookPub/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | /.settings/ 5 | -------------------------------------------------------------------------------- /example/016_Weather/.gitignore: -------------------------------------------------------------------------------- 1 | /.settings/ 2 | /target/ 3 | /.classpath 4 | /.project 5 | -------------------------------------------------------------------------------- /example/CloudFoundry/.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /.classpath 3 | /.project 4 | /.settings/ 5 | -------------------------------------------------------------------------------- /ext/servlet/example/001_HelloWorld/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /ext/servlet/example/002_WebApplication/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /ext/vaadin8-servlet/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | -------------------------------------------------------------------------------- /ext/vaadin8_springboot/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | -------------------------------------------------------------------------------- /example/003_Notes/WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /example/007_PetClinic/src/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /ext/ignite/.settings/.gitignore: -------------------------------------------------------------------------------- 1 | /org.eclipse.jdt.core.prefs 2 | /org.eclipse.m2e.core.prefs 3 | -------------------------------------------------------------------------------- /ext/lanterna/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /ext/memory/.settings/.gitignore: -------------------------------------------------------------------------------- 1 | /org.eclipse.jdt.core.prefs 2 | /org.eclipse.m2e.core.prefs 3 | -------------------------------------------------------------------------------- /ext/servlet/example/003_XmlConfiguration/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /doc/routing_person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/doc/routing_person.png -------------------------------------------------------------------------------- /example/002_HelloWorld/.gitignore: -------------------------------------------------------------------------------- 1 | /.classpath 2 | /.project 3 | /.settings/ 4 | /target/ 5 | /bin/ 6 | -------------------------------------------------------------------------------- /example/004_Library/.gitignore: -------------------------------------------------------------------------------- 1 | /.classpath 2 | /.project 3 | /.settings/ 4 | /target/ 5 | /bin/ 6 | -------------------------------------------------------------------------------- /example/005_Numbers/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /.classpath 3 | /.project 4 | /target/ 5 | /.settings/ 6 | -------------------------------------------------------------------------------- /example/006_Persistence/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /.classpath 3 | /.project 4 | /target/ 5 | /.settings/ 6 | -------------------------------------------------------------------------------- /example/019_MiniMail/src/main/resources/mail.properties: -------------------------------------------------------------------------------- 1 | mail.smtp.host=127.0.0.1 2 | mail.smtp.port=2500 -------------------------------------------------------------------------------- /example/CloudFoundry/WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /src/test/resources/ResourceTestApplication1.properties: -------------------------------------------------------------------------------- 1 | PropertyOnly1 = Only1 2 | Property1and2 = in1 -------------------------------------------------------------------------------- /doc/frontend_backend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/doc/frontend_backend.png -------------------------------------------------------------------------------- /example/001_EmptyApplication/.gitignore: -------------------------------------------------------------------------------- 1 | /.classpath 2 | /.project 3 | /.settings/ 4 | /target/ 5 | /bin/ 6 | -------------------------------------------------------------------------------- /example/003_Notes/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | /target/ 6 | /data/ 7 | -------------------------------------------------------------------------------- /example/004_Library/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /example/019_MiniMail/.settings/.gitignore: -------------------------------------------------------------------------------- 1 | /org.eclipse.jdt.core.prefs 2 | /org.eclipse.m2e.core.prefs 3 | -------------------------------------------------------------------------------- /doc/client_server_split.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/doc/client_server_split.png -------------------------------------------------------------------------------- /doc/user_guide/dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/doc/user_guide/dialog.png -------------------------------------------------------------------------------- /example/013_NewsFeed/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | /testdb/ 6 | /target/ 7 | -------------------------------------------------------------------------------- /example/022_OpenApiClient/.settings/.gitignore: -------------------------------------------------------------------------------- 1 | /org.eclipse.jdt.core.prefs 2 | /org.eclipse.m2e.core.prefs 3 | -------------------------------------------------------------------------------- /ext/cheerpj/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.classpath 3 | /.project 4 | /dependency-reduced-pom.xml 5 | /.settings/ 6 | -------------------------------------------------------------------------------- /doc/user_guide/navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/doc/user_guide/navigation.png -------------------------------------------------------------------------------- /example/007_PetClinic/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | /testdb/ 6 | /target/ 7 | -------------------------------------------------------------------------------- /example/012_MiniBoost/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | /testdb/ 6 | /target/ 7 | -------------------------------------------------------------------------------- /doc/user_guide/page_actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/doc/user_guide/page_actions.png -------------------------------------------------------------------------------- /ext/servlet/doc/war-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/ext/servlet/doc/war-structure.png -------------------------------------------------------------------------------- /doc/frontend_backend_components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/doc/frontend_backend_components.png -------------------------------------------------------------------------------- /doc/page_with_detail_large_device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/doc/page_with_detail_large_device.png -------------------------------------------------------------------------------- /doc/page_with_detail_small_device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/doc/page_with_detail_small_device.png -------------------------------------------------------------------------------- /doc/user_guide/application_blocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/doc/user_guide/application_blocks.png -------------------------------------------------------------------------------- /doc/user_guide/greet_application.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/doc/user_guide/greet_application.png -------------------------------------------------------------------------------- /example/007_PetClinic/src/tiger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/example/007_PetClinic/src/tiger.jpg -------------------------------------------------------------------------------- /ext/servlet/example/001_HelloWorld/.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /ext/vaadin8/src/main/java/org/minimalj/frontend/impl/vaadin/package-info.html: -------------------------------------------------------------------------------- 1 | To compile vaadin execute 2 | 3 | mvn vaadin:compile -------------------------------------------------------------------------------- /src/main/resources/application_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/src/main/resources/application_16.png -------------------------------------------------------------------------------- /src/test/java/org/minimalj/model/EnumHackTestEnum.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model; 2 | 3 | enum EnumHackTestEnum { 4 | a, b; 5 | } -------------------------------------------------------------------------------- /example/005_Numbers/doc/005_numbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/example/005_Numbers/doc/005_numbers.png -------------------------------------------------------------------------------- /ext/rest/src/main/resources/swagger-ui/swagger-ui.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"swagger-ui.css","sources":[],"mappings":"","sourceRoot":""} -------------------------------------------------------------------------------- /ext/servlet/example/001_HelloWorld/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /ext/servlet/example/002_WebApplication/.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /doc/user_guide/petclinic_application.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/doc/user_guide/petclinic_application.png -------------------------------------------------------------------------------- /ext/servlet/example/002_WebApplication/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /ext/servlet/example/003_XmlConfiguration/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /ext/servlet/example/003_XmlConfiguration/.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /ext/servlet/src/main/java/META-INF/services/javax.servlet.ServletContainerInitializer: -------------------------------------------------------------------------------- 1 | org.minimalj.frontend.impl.servlet.MjServletInitializer -------------------------------------------------------------------------------- /ext/soft/doc/screenshot_flotte_sohle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/ext/soft/doc/screenshot_flotte_sohle.png -------------------------------------------------------------------------------- /example/002_HelloWorld/doc/002_Greeting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/example/002_HelloWorld/doc/002_Greeting.png -------------------------------------------------------------------------------- /ext/vaadin8-servlet/src/main/webapp/META-INF/services/javax.servlet.ServletContainerInitializer: -------------------------------------------------------------------------------- 1 | org.minimalj.frontend.impl.vaadin.MjVaadinServlet -------------------------------------------------------------------------------- /doc/user_guide/petclinic_application_zoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/doc/user_guide/petclinic_application_zoom.png -------------------------------------------------------------------------------- /example/002_HelloWorld/doc/002_HelloWorld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/example/002_HelloWorld/doc/002_HelloWorld.png -------------------------------------------------------------------------------- /example/004_Library/doc/004_buch_eingeben.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/example/004_Library/doc/004_buch_eingeben.png -------------------------------------------------------------------------------- /example/004_Library/src/main/java/org/minimalj/example/library/model/Media.properties: -------------------------------------------------------------------------------- 1 | hardcover=Hardcover 2 | paperback=Paperback 3 | ebook=eBook 4 | -------------------------------------------------------------------------------- /ext/uitest/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /ext/uitest/src/test/java/org/minimalj/test/TestApplication.properties: -------------------------------------------------------------------------------- 1 | ActionWithLogin = Action with login 2 | ActionWithoutLogin = Action without login -------------------------------------------------------------------------------- /example/003_Notes/doc/003_eclipse_build_path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/example/003_Notes/doc/003_eclipse_build_path.png -------------------------------------------------------------------------------- /ext/vaadin/src/main/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener: -------------------------------------------------------------------------------- 1 | org.minimalj.frontend.impl.vaadin.VaadinSubjectRequestHandler -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/model/Specialty.properties: -------------------------------------------------------------------------------- 1 | radiology = Radiology 2 | surgery = Surgery 3 | dentistry = Dentistry 4 | -------------------------------------------------------------------------------- /example/001_EmptyApplication/doc/001_EmptyApplication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/example/001_EmptyApplication/doc/001_EmptyApplication.png -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/model/Specialty_de.properties: -------------------------------------------------------------------------------- 1 | radiology = Radiologie 2 | surgery = Chirurgie 3 | dentistry = Zahnkunde 4 | -------------------------------------------------------------------------------- /ext/rest/src/main/resources/swagger-ui/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/ext/rest/src/main/resources/swagger-ui/favicon-16x16.png -------------------------------------------------------------------------------- /ext/rest/src/main/resources/swagger-ui/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/ext/rest/src/main/resources/swagger-ui/favicon-32x32.png -------------------------------------------------------------------------------- /ext/servlet/example/001_HelloWorld/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /example/003_Notes/src/org/minimalj/example/notes/NotesApplication.properties: -------------------------------------------------------------------------------- 1 | Note.text=Note 2 | Note.date=Date 3 | 4 | NewNoteEditor=New note 5 | 6 | NoteTablePage=Notes 7 | -------------------------------------------------------------------------------- /ext/rest/src/main/resources/swagger-ui/swagger-ui.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;;;;;;AAs9eA","sourceRoot":""} -------------------------------------------------------------------------------- /ext/servlet/example/002_WebApplication/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /ext/vaadin/.npmrc: -------------------------------------------------------------------------------- 1 | # 2 | # NOTICE: this is an auto-generated file 3 | # 4 | # This file sets the default parameters for manual `pnpm install`. 5 | # 6 | shamefully-hoist=true 7 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/page/WheelListener.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.page; 2 | 3 | public interface WheelListener { 4 | public void wheel(int amount); 5 | } -------------------------------------------------------------------------------- /src/main/java/org/minimalj/model/Dependable.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model; 2 | 3 | public interface Dependable { 4 | 5 | public PARENT getParent(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ext/servlet/example/003_XmlConfiguration/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /src/main/resources/org/minimalj/frontend/impl/web/roboto.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/src/main/resources/org/minimalj/frontend/impl/web/roboto.woff2 -------------------------------------------------------------------------------- /example/001_EmptyApplication/doc/001_EclipseRunSettingsMain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/example/001_EmptyApplication/doc/001_EclipseRunSettingsMain.png -------------------------------------------------------------------------------- /example/003_Notes/src/org/minimalj/example/notes/NotesApplication_de.properties: -------------------------------------------------------------------------------- 1 | Note.text=Notiz 2 | Note.date=Datum 3 | 4 | NewNoteEditor=Neue Notiz 5 | 6 | NoteTablePage=Notizen 7 | -------------------------------------------------------------------------------- /ext/vaadin/src/main/resources/META-INF/resources/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/ext/vaadin/src/main/resources/META-INF/resources/icons/icon.png -------------------------------------------------------------------------------- /src/main/java/org/minimalj/security/AccessControl.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.security; 2 | 3 | public interface AccessControl { 4 | 5 | boolean hasAccess(Subject subject); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/org/minimalj/frontend/impl/swing/favorit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/src/main/resources/org/minimalj/frontend/impl/swing/favorit.png -------------------------------------------------------------------------------- /src/test/java/org/minimalj/security/permissiontest/TestEntityA.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.security.permissiontest; 2 | 3 | public class TestEntityA { 4 | 5 | public Object id; 6 | } 7 | -------------------------------------------------------------------------------- /ext/lanterna/src/main/java/com/googlecode/lanterna/gui2/menu/package-info.java: -------------------------------------------------------------------------------- 1 | // these classes can be removed if lanterna accepts pull request 2 | package com.googlecode.lanterna.gui2.menu; -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/impl/json/JsonPush.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.json; 2 | 3 | public interface JsonPush { 4 | 5 | void push(String message); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/org/minimalj/frontend/impl/swing/favorite_no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/src/main/resources/org/minimalj/frontend/impl/swing/favorite_no.png -------------------------------------------------------------------------------- /src/main/resources/org/minimalj/frontend/impl/swing/field_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/src/main/resources/org/minimalj/frontend/impl/swing/field_error.png -------------------------------------------------------------------------------- /example/001_EmptyApplication/doc/001_EclipseRunSettingsClasspath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/example/001_EmptyApplication/doc/001_EclipseRunSettingsClasspath.png -------------------------------------------------------------------------------- /example/007_PetClinic/src/org/minimalj/example/petclinic/model/PetType.csv: -------------------------------------------------------------------------------- 1 | name, nameDe 2 | Cat, Katze 3 | Dog, Hund 4 | Lizard, Eidechse 5 | Snake, Schlange 6 | Bird, Vogel 7 | Hamster, Hamster 8 | -------------------------------------------------------------------------------- /src/main/resources/org/minimalj/frontend/impl/swing/favorite_yes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/src/main/resources/org/minimalj/frontend/impl/swing/favorite_yes.png -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/AView.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.minimalj.model.View; 4 | 5 | public class AView implements View { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/resources/ResourceTestApplication2.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.resources; 2 | 3 | public class ResourceTestApplication2 extends ResourceTestApplication1 { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /example/004_Library/src/main/java/org/minimalj/example/library/model/Media.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.library.model; 2 | 3 | 4 | public enum Media { 5 | hardcover, paperback, ebook, 6 | } 7 | -------------------------------------------------------------------------------- /example/013_NewsFeed/src/org/minimalj/example/newsfeed/RssNewsApplication_de.properties: -------------------------------------------------------------------------------- 1 | Application.name = Rss News 2 | 3 | ChannelPage = Artikel 4 | 5 | Item.title = Artikel 6 | Item.pubDate = Datum -------------------------------------------------------------------------------- /src/test/java/org/minimalj/security/permissiontest/pkgrole/package-info.java: -------------------------------------------------------------------------------- 1 | @Role("pkgRole") 2 | package org.minimalj.security.permissiontest.pkgrole; 3 | 4 | import org.minimalj.transaction.Role; 5 | -------------------------------------------------------------------------------- /example/013_NewsFeed/src/org/minimalj/example/newsfeed/RssNewsApplication.properties: -------------------------------------------------------------------------------- 1 | Application.name = Rss News 2 | 3 | ChannelPage = Articles 4 | 5 | Item.title = Article 6 | Item.pubDate = Publishing Date -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/model/PetType.csv: -------------------------------------------------------------------------------- 1 | name, nameDe 2 | Cat, Katze 3 | Dog, Hund 4 | Lizard, Eidechse 5 | Snake, Schlange 6 | Bird, Vogel 7 | Hamster, Hamster 8 | -------------------------------------------------------------------------------- /ext/vaadin/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8080 2 | # Ensure application is run in Vaadin 14/npm mode 3 | vaadin.compatibilityMode = false 4 | logging.level.org.atmosphere = warn 5 | -------------------------------------------------------------------------------- /src/main/resources/org/minimalj/frontend/impl/swing/favorite_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/src/main/resources/org/minimalj/frontend/impl/swing/favorite_disabled.png -------------------------------------------------------------------------------- /src/test/java/org/minimalj/security/permissiontest/pkgrole/TestEntityG.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.security.permissiontest.pkgrole; 2 | 3 | public class TestEntityG { 4 | 5 | public Object id; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /example/007_PetClinic/src/org/minimalj/example/petclinic/model/Specialty.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.petclinic.model; 2 | 3 | public enum Specialty { 4 | 5 | radiology, surgery, dentistry; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ext/ignite/src/test/java/org/minimalj/repository/ignite/AView.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.ignite; 2 | 3 | import org.minimalj.model.View; 4 | 5 | public class AView implements View { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ext/memory/src/test/java/org/minimalj/repository/memory/AView.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.memory; 2 | 3 | import org.minimalj.model.View; 4 | 5 | public class AView implements View { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/page/ProgressListener.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.page; 2 | 3 | public interface ProgressListener { 4 | 5 | void showProgress(int value, int maximum); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/security/RememberMeAuthentication.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.security; 2 | 3 | public interface RememberMeAuthentication { 4 | 5 | Subject remember(String rememberMeCookie); 6 | 7 | } -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/web/tiger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/web/tiger.jpg -------------------------------------------------------------------------------- /logging.properties: -------------------------------------------------------------------------------- 1 | # -Djava.util.logging.config.file=logging.properties 2 | handlers = java.util.logging.ConsoleHandler 3 | java.util.logging.ConsoleHandler.level = FINEST 4 | SQL.level = FINE 5 | # SQL.level = INFO -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/impl/web/MjHttpHandler.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.web; 2 | 3 | public interface MjHttpHandler { 4 | 5 | public void handle(MjHttpExchange exchange); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/model/Specialty.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.minimalclinic.model; 2 | 3 | public enum Specialty { 4 | 5 | radiology, surgery, dentistry; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/E.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | public class E { 6 | 7 | @Size(20) 8 | public String e; 9 | } 10 | -------------------------------------------------------------------------------- /example/003_Notes/logging.properties: -------------------------------------------------------------------------------- 1 | # add to cmd line: -Djava.util.logging.config.file=logging.properties 2 | handlers = java.util.logging.ConsoleHandler 3 | java.util.logging.ConsoleHandler.level = FINEST 4 | SQL.level = FINEST 5 | -------------------------------------------------------------------------------- /ext/historized/logging.properties: -------------------------------------------------------------------------------- 1 | # -Djava.util.logging.config.file=logging.properties 2 | handlers = java.util.logging.ConsoleHandler 3 | java.util.logging.ConsoleHandler.level = FINEST 4 | SQL.level = FINE 5 | # SQL.level = INFO -------------------------------------------------------------------------------- /example/004_Library/src/main/java/org/minimalj/example/library/model/ExampleFormats.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.library.model; 2 | 3 | 4 | public class ExampleFormats { 5 | 6 | public static final int NAME = 30; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/resources/ResourceTestApplication1.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.resources; 2 | 3 | import org.minimalj.application.Application; 4 | 5 | public class ResourceTestApplication1 extends Application { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /example/007_PetClinic/src/org/minimalj/example/petclinic/PetClinicApplication_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/example/007_PetClinic/src/org/minimalj/example/petclinic/PetClinicApplication_de.properties -------------------------------------------------------------------------------- /example/019_MiniMail/src/main/resources/org/minimalj/example/minimail/MiniMail_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/example/019_MiniMail/src/main/resources/org/minimalj/example/minimail/MiniMail_de.properties -------------------------------------------------------------------------------- /ext/historized/src/test/java/org/minimalj/repository/sql/E.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | public class E { 6 | 7 | @Size(20) 8 | public String e; 9 | } 10 | -------------------------------------------------------------------------------- /ext/ignite/src/test/java/org/minimalj/repository/ignite/E.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.ignite; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | public class E { 6 | 7 | @Size(20) 8 | public String e; 9 | } 10 | -------------------------------------------------------------------------------- /ext/memory/src/test/java/org/minimalj/repository/memory/E.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.memory; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | public class E { 6 | 7 | @Size(20) 8 | public String e; 9 | } 10 | -------------------------------------------------------------------------------- /ext/rest/src/main/resources/swagger-ui/swagger-ui-standalone-preset.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"swagger-ui-standalone-preset.js","sources":["webpack:///swagger-ui-standalone-preset.js"],"mappings":"AAAA;;;;;AA6mCA;;;;;;AA41FA","sourceRoot":""} -------------------------------------------------------------------------------- /ext/vaadin8_springboot/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Implementation-Title: Minimal-J Vaadin Springboot 3 | Implementation-Version: 0.1.0.6 4 | Vaadin-Package-Version: 1 5 | License-title: Apache License 2.0 6 | -------------------------------------------------------------------------------- /example/001_EmptyApplication/src/org/minimalj/example/empty/EmptyApplication.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.empty; 2 | 3 | import org.minimalj.application.Application; 4 | 5 | public class EmptyApplication extends Application { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /example/004_Library/src/main/java/org/minimalj/example/library/MjExampleApplication_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/example/004_Library/src/main/java/org/minimalj/example/library/MjExampleApplication_de.properties -------------------------------------------------------------------------------- /ext/vaadin/src/main/java/org/minimalj/frontend/impl/vaadin/toolkit/VaadinComponentWithWidth.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.vaadin.toolkit; 2 | 3 | public interface VaadinComponentWithWidth { 4 | 5 | public int getDialogWidth(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ext/vaadin8/src/main/java/org/minimalj/frontend/impl/vaadin/toolkit/VaadinComponentWithWidth.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.vaadin.toolkit; 2 | 3 | public interface VaadinComponentWithWidth { 4 | 5 | public int getDialogWidth(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /ext/soft/README.adoc: -------------------------------------------------------------------------------- 1 | = Soft Theme 2 | 3 | This css theme is inspired by https://krockds.com/ 4 | 5 | image::doc/screenshot_flotte_sohle.png[] 6 | 7 | == How to use 8 | 9 | Just add -DMjCss=soft.css when you start a Minimal-J application with html frontend. -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/MinimalClinicApplication_de.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrunoEberhard/minimal-j/HEAD/example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/MinimalClinicApplication_de.properties -------------------------------------------------------------------------------- /example/019_MiniMail/src/main/resources/org/minimalj/example/minimail/MiniMail.properties: -------------------------------------------------------------------------------- 1 | Mail.from.address=From 2 | Mail.to.address=To 3 | Mail.date=Date 4 | Mail.subject=Subject 5 | Mail.text=Content 6 | Mail.address.validation.error=The input is not a valid email address -------------------------------------------------------------------------------- /src/test/java/org/minimalj/security/permissiontest/TestEntityB.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.security.permissiontest; 2 | 3 | import org.minimalj.transaction.Role; 4 | 5 | @Role("RoleB") 6 | public class TestEntityB { 7 | 8 | public Object id; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /ext/lanterna/src/main/java/org/minimalj/frontend/impl/lanterna/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | This package contains an experimental frontend. It's a terminal frontend. 4 | At the moment it's not complete. Not implemented are dialogs and a ScrollPane. 5 | 6 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/editor/Result.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.editor; 2 | 3 | import java.util.function.Consumer; 4 | 5 | public interface Result { 6 | 7 | public void setFinishedListener(Consumer finishedListener); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /example/020_MinimalClinic/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | /testdb/ 6 | /target/ 7 | /node_modules/ 8 | /pnpm-lock.yaml 9 | /pnpmfile.js 10 | /tsconfig.json 11 | /types.d.ts 12 | /webpack.config.js 13 | /package.json 14 | /webpack.generated.js 15 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/M.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.minimalj.model.Keys; 4 | 5 | public class M { 6 | public static final M $ = Keys.of(M.class); 7 | 8 | public Object id; 9 | 10 | public byte[] bytes; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/security/permissiontest/pkgrole/TestEntityH.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.security.permissiontest.pkgrole; 2 | 3 | import org.minimalj.transaction.Role; 4 | 5 | @Role("ClassRole") 6 | public class TestEntityH { 7 | 8 | public Object id; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /example/016_Weather/src/main/java/org/minimalj/example/weather/model/Rain.java: -------------------------------------------------------------------------------- 1 | 2 | package org.minimalj.example.weather.model; 3 | 4 | import javax.annotation.Generated; 5 | 6 | @Generated("org.jsonschema2pojo") 7 | public class Rain { 8 | 9 | public Double _3h; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /example/016_Weather/src/main/java/org/minimalj/example/weather/model/Sys_.java: -------------------------------------------------------------------------------- 1 | 2 | package org.minimalj.example.weather.model; 3 | 4 | import javax.annotation.Generated; 5 | 6 | @Generated("org.jsonschema2pojo") 7 | public class Sys_ { 8 | 9 | public String pod; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /example/016_Weather/src/main/java/org/minimalj/example/weather/model/Clouds.java: -------------------------------------------------------------------------------- 1 | 2 | package org.minimalj.example.weather.model; 3 | 4 | import javax.annotation.Generated; 5 | 6 | @Generated("org.jsonschema2pojo") 7 | public class Clouds { 8 | 9 | public Integer all; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /example/016_Weather/src/main/java/org/minimalj/example/weather/model/Sys.java: -------------------------------------------------------------------------------- 1 | 2 | package org.minimalj.example.weather.model; 3 | 4 | import javax.annotation.Generated; 5 | 6 | @Generated("org.jsonschema2pojo") 7 | public class Sys { 8 | 9 | public Integer population; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /ext/ignite/src/test/java/org/minimalj/repository/ignite/M.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.ignite; 2 | 3 | import org.minimalj.model.Keys; 4 | 5 | public class M { 6 | public static final M $ = Keys.of(M.class); 7 | 8 | public Object id; 9 | 10 | public byte[] bytes; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /ext/memory/src/test/java/org/minimalj/repository/memory/M.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.memory; 2 | 3 | import org.minimalj.model.Keys; 4 | 5 | public class M { 6 | public static final M $ = Keys.of(M.class); 7 | 8 | public Object id; 9 | 10 | public byte[] bytes; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/impl/swing/lookAndFeel/MetalThemeProvider.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.swing.lookAndFeel; 2 | 3 | import javax.swing.plaf.metal.MetalTheme; 4 | 5 | public interface MetalThemeProvider { 6 | 7 | public MetalTheme getMetalTheme(); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /example/015_BookPub/src/main/java/org/minimalj/example/bookpub/entity/Reviewer.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.bookpub.entity; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | public class Reviewer { 6 | public Object id; 7 | 8 | @Size(255) 9 | public String firstName, lastName; 10 | } 11 | -------------------------------------------------------------------------------- /ext/vaadin8/src/main/webapp/VAADIN/themes/mjtheme/addons.scss: -------------------------------------------------------------------------------- 1 | /* This file is automatically managed and will be overwritten from time to time. */ 2 | /* Do not manually edit this file. */ 3 | 4 | /* Import and include this mixin into your project theme to include the addon themes */ 5 | @mixin addons { 6 | } 7 | 8 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/repository/TransactionalRepository.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository; 2 | 3 | public interface TransactionalRepository extends Repository { 4 | 5 | public void startTransaction(int transactionIsolationLevel); 6 | 7 | public void endTransaction(boolean commit); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /example/016_Weather/src/main/java/org/minimalj/example/weather/model/Coord.java: -------------------------------------------------------------------------------- 1 | 2 | package org.minimalj.example.weather.model; 3 | 4 | import javax.annotation.Generated; 5 | 6 | @Generated("org.jsonschema2pojo") 7 | public class Coord { 8 | 9 | public Double lon; 10 | public Double lat; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /example/016_Weather/src/main/java/org/minimalj/example/weather/model/Wind.java: -------------------------------------------------------------------------------- 1 | 2 | package org.minimalj.example.weather.model; 3 | 4 | import javax.annotation.Generated; 5 | 6 | @Generated("org.jsonschema2pojo") 7 | public class Wind { 8 | 9 | public Double speed; 10 | public Double deg; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/I.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.minimalj.model.Keys; 4 | 5 | public class I { 6 | 7 | public static final I $ = Keys.of(I.class); 8 | 9 | public I() { 10 | // needed for reflection constructor 11 | } 12 | 13 | public G rG; 14 | } 15 | -------------------------------------------------------------------------------- /ext/historized/src/test/java/org/minimalj/repository/sql/F.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | public class F { 6 | 7 | public Object id; 8 | public int version; 9 | public boolean historized; 10 | 11 | @Size(20) 12 | public String f; 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/util/ChangeListener.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.util; 2 | 3 | /** 4 | * Minimal-J internal. May be moved or removed. Don't use it directly. 5 | * 6 | * @param Type of event source 7 | */ 8 | public interface ChangeListener { 9 | 10 | public void changed(T source); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /ext/vaadin8_springboot/src/main/java/org/minimalj/frontend/impl/vaadin/VaadinSpringUI.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.vaadin; 2 | 3 | import com.vaadin.spring.annotation.SpringUI; 4 | 5 | @SpringUI 6 | public class VaadinSpringUI extends Vaadin { 7 | private static final long serialVersionUID = 1L; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /example/012_MiniBoost/src/org/minimalj/example/miniboost/model/Contact.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.miniboost.model; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | public class Contact { 6 | 7 | @Size(20) 8 | public String phone1, phone2, fax; 9 | 10 | @Size(100) 11 | public String email; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/model/annotation/AutoIncrement.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model.annotation; 2 | 3 | import java.lang.annotation.Retention; 4 | import java.lang.annotation.RetentionPolicy; 5 | 6 | @Retention(RetentionPolicy.RUNTIME) 7 | public @interface AutoIncrement { 8 | 9 | boolean value() default true; 10 | } 11 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/security/permissiontest/TestEntityBView.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.security.permissiontest; 2 | 3 | import org.minimalj.model.View; 4 | import org.minimalj.transaction.Role; 5 | 6 | @Role("RoleA") 7 | public class TestEntityBView implements View { 8 | 9 | public Object id; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /ext/ignite/src/test/java/org/minimalj/repository/ignite/I.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.ignite; 2 | 3 | import org.minimalj.model.Keys; 4 | 5 | public class I { 6 | 7 | public static final I $ = Keys.of(I.class); 8 | 9 | public I() { 10 | // needed for reflection constructor 11 | } 12 | 13 | public G rG; 14 | } 15 | -------------------------------------------------------------------------------- /ext/memory/src/test/java/org/minimalj/repository/memory/I.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.memory; 2 | 3 | import org.minimalj.model.Keys; 4 | 5 | public class I { 6 | 7 | public static final I $ = Keys.of(I.class); 8 | 9 | public I() { 10 | // needed for reflection constructor 11 | } 12 | 13 | public G rG; 14 | } 15 | -------------------------------------------------------------------------------- /ext/rest/src/main/resources/swagger-ui/swagger-ui-bundle.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;;;;;AAsnMA;;;;;;AAm5DA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0kUA;;;;;;;;;;;;;;AAq4JA;AA4/iBA;;;;;;;;;AA+vIA;;;;;AAk8QA;;;;;AAynBA;AAo0CA;;;;;;AAuqxBA;AAixYA;;;;;;AA6gbA","sourceRoot":""} -------------------------------------------------------------------------------- /ext/vaadin8/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Vaadin-Stylesheets: VAADIN/themes/mjtheme/mjtheme.scss 3 | Implementation-Title: Minimal-J Vaadin 4 | Implementation-Version: 0.1.0.6 5 | Vaadin-Widgetsets: org.minimalj.frontend.impl.vaadin.MjWidgetSet 6 | Vaadin-Package-Version: 1 7 | License-title: Apache License 2.0 8 | 9 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/page/EmptyPage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.page; 2 | 3 | import org.minimalj.frontend.Frontend.IContent; 4 | 5 | public class EmptyPage implements Page { 6 | 7 | public EmptyPage() { 8 | } 9 | 10 | @Override 11 | public IContent getContent() { 12 | return null; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /ext/javafx/src/main/java/org/minimalj/frontend/impl/javafx/toolkit/FxText.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.javafx.toolkit; 2 | 3 | import org.minimalj.frontend.Frontend.IComponent; 4 | 5 | public class FxText extends javafx.scene.control.Label implements IComponent { 6 | 7 | public FxText(String string) { 8 | super(string); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ext/vaadin8/src/main/webapp/VAADIN/themes/mjtheme/styles.scss: -------------------------------------------------------------------------------- 1 | @import "addons.scss"; 2 | @import "mjtheme.scss"; 3 | 4 | /* This file prefixes all rules with the theme name to avoid causing conflicts with other themes. */ 5 | /* The actual styles should be defined in mjtheme.scss */ 6 | .mjtheme { 7 | @include addons; 8 | @include mjtheme; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/action/Separator.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.action; 2 | 3 | public final class Separator extends Action { 4 | 5 | public Separator() { 6 | super(null); 7 | } 8 | 9 | @Override 10 | public void run() { 11 | throw new IllegalStateException("Separator should not trigger action"); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/relation/TestElementCodeView.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql.relation; 2 | 3 | import org.minimalj.model.Code; 4 | import org.minimalj.model.View; 5 | 6 | 7 | public class TestElementCodeView implements View, Code { 8 | 9 | public Integer id; 10 | 11 | public Integer value; 12 | } 13 | -------------------------------------------------------------------------------- /example/015_BookPub/src/main/java/org/minimalj/example/bookpub/entity/Publisher.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.bookpub.entity; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.model.annotation.Size; 6 | 7 | public class Publisher { 8 | public Object id; 9 | 10 | @Size(255) 11 | public String name; 12 | 13 | public List books; 14 | } 15 | -------------------------------------------------------------------------------- /ext/ignite/src/test/java/org/minimalj/repository/ignite/K.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.ignite; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | public class K { 6 | 7 | public K() { 8 | // needed for reflection constructor 9 | } 10 | 11 | public K(String k) { 12 | this.k = k; 13 | } 14 | 15 | @Size(20) 16 | public String k; 17 | } 18 | -------------------------------------------------------------------------------- /ext/memory/src/test/java/org/minimalj/repository/memory/K.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.memory; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | public class K { 6 | 7 | public K() { 8 | // needed for reflection constructor 9 | } 10 | 11 | public K(String k) { 12 | this.k = k; 13 | } 14 | 15 | @Size(20) 16 | public String k; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/impl/json/JsonQueryContent.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.json; 2 | 3 | import org.minimalj.frontend.Frontend.IContent; 4 | 5 | public class JsonQueryContent extends JsonComponent implements IContent { 6 | 7 | public JsonQueryContent(String caption) { 8 | super("Query"); 9 | put("caption", caption); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /example/015_BookPub/src/main/java/org/minimalj/example/bookpub/entity/Author.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.bookpub.entity; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.model.annotation.Size; 6 | 7 | public class Author { 8 | public Object id; 9 | 10 | @Size(255) 11 | public String firstName, lastName; 12 | 13 | public List books; 14 | } 15 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/B.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | 6 | public class B { 7 | 8 | public B() { 9 | // needed for reflection constructor 10 | } 11 | 12 | public B(String bName) { 13 | this.bName = bName; 14 | } 15 | 16 | @Size(30) 17 | public String bName; 18 | } 19 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/C.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | public class C { 6 | 7 | public C() { 8 | // needed for reflection constructor 9 | } 10 | 11 | public C(String cName) { 12 | this.cName = cName; 13 | } 14 | 15 | @Size(30) 16 | public String cName; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/repository/query/AllCriteria.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.query; 2 | 3 | public class AllCriteria extends Criteria { 4 | private static final long serialVersionUID = 1L; 5 | 6 | @Override 7 | public boolean test(Object t) { 8 | return true; 9 | } 10 | 11 | @Override 12 | public String toString() { 13 | return "all"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ext/historized/src/test/java/org/minimalj/repository/sql/B.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | 6 | public class B { 7 | 8 | public B() { 9 | // needed for reflection constructor 10 | } 11 | 12 | public B(String bName) { 13 | this.bName = bName; 14 | } 15 | 16 | @Size(30) 17 | public String bName; 18 | } 19 | -------------------------------------------------------------------------------- /ext/historized/src/test/java/org/minimalj/repository/sql/C.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | public class C { 6 | 7 | public C() { 8 | // needed for reflection constructor 9 | } 10 | 11 | public C(String cName) { 12 | this.cName = cName; 13 | } 14 | 15 | @Size(30) 16 | public String cName; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /ext/ignite/src/test/java/org/minimalj/repository/ignite/B.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.ignite; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | 6 | public class B { 7 | 8 | public B() { 9 | // needed for reflection constructor 10 | } 11 | 12 | public B(String bName) { 13 | this.bName = bName; 14 | } 15 | 16 | @Size(30) 17 | public String bName; 18 | } 19 | -------------------------------------------------------------------------------- /ext/memory/src/test/java/org/minimalj/repository/memory/B.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.memory; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | 6 | public class B { 7 | 8 | public B() { 9 | // needed for reflection constructor 10 | } 11 | 12 | public B(String bName) { 13 | this.bName = bName; 14 | } 15 | 16 | @Size(30) 17 | public String bName; 18 | } 19 | -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The application in petclinic package tries to mimic the original spring application as perfect as possible. 4 | But the original UI is not very consistent and I wanted to do a cleaner, more minimalistic version. 5 | The minimal clinic is a fork of the pet clinic to try new things out. 6 | 7 | -------------------------------------------------------------------------------- /ext/ignite/src/test/java/org/minimalj/repository/ignite/C.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.ignite; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | public class C { 6 | 7 | public C() { 8 | // needed for reflection constructor 9 | } 10 | 11 | public C(String cName) { 12 | this.cName = cName; 13 | } 14 | 15 | @Size(30) 16 | public String cName; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /ext/memory/src/test/java/org/minimalj/repository/memory/C.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.memory; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | public class C { 6 | 7 | public C() { 8 | // needed for reflection constructor 9 | } 10 | 11 | public C(String cName) { 12 | this.cName = cName; 13 | } 14 | 15 | @Size(30) 16 | public String cName; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /ext/metamodel/src/main/java/org/minimalj/metamodel/model/MjEnumValue.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.metamodel.model; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.annotation.Size; 5 | 6 | public class MjEnumValue { 7 | public static final MjEnumValue $ = Keys.of(MjEnumValue.class); 8 | 9 | public Integer ord; 10 | 11 | @Size(1024) 12 | public String name; 13 | } 14 | -------------------------------------------------------------------------------- /ext/vaadin/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | __ __ _ _ _ _ 2 | | \/ |(_) _ __ (_) _ __ ___ __ _ | | | | 3 | | |\/| || || '_ \ | || '_ ` _ \ / _` || | _____ _ | | 4 | | | | || || | | || || | | | | || (_| || ||_____|| |_| | 5 | |_| |_||_||_| |_||_||_| |_| |_| \__,_||_| \___/ 6 | 7 | -------------------------------------------------------------------------------- /example/002_HelloWorld/src/org/minimalj/example/helloworld/HelloWorldApplication.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.helloworld; 2 | 3 | import org.minimalj.application.Application; 4 | import org.minimalj.frontend.page.Page; 5 | 6 | public class HelloWorldApplication extends Application { 7 | 8 | @Override 9 | public Page createDefaultPage() { 10 | return new HelloWorldPage(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /example/002_HelloWorld/src/org/minimalj/example/helloworld2/User.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.helloworld2; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.annotation.NotEmpty; 5 | import org.minimalj.model.annotation.Size; 6 | 7 | public class User { 8 | public static final User $ = Keys.of(User.class); 9 | 10 | @NotEmpty @Size(255) 11 | public String name; 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/impl/util/FavoritesManager.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.util; 2 | 3 | import java.util.LinkedHashMap; 4 | 5 | public interface FavoritesManager { 6 | 7 | void setUser(String user); 8 | 9 | LinkedHashMap getFavorites(); 10 | 11 | boolean isFavorite(String route); 12 | 13 | void toggleFavorite(String route, String title); 14 | 15 | } -------------------------------------------------------------------------------- /example/016_Weather/src/main/java/org/minimalj/example/weather/model/WeatherDescription.java: -------------------------------------------------------------------------------- 1 | 2 | package org.minimalj.example.weather.model; 3 | 4 | import javax.annotation.Generated; 5 | 6 | @Generated("org.jsonschema2pojo") 7 | public class WeatherDescription { 8 | 9 | public Integer id; 10 | public String main; 11 | public String description; 12 | public String icon; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /example/014_TimeSheet/timesheet/src/org/minimalj/example/timesheet/model/Employee.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.timesheet.model; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.annotation.Size; 5 | 6 | public class Employee { 7 | 8 | public static final Employee $ = Keys.of(Employee.class); 9 | 10 | public Object id; 11 | 12 | @Size(255) 13 | public String name; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /ext/servlet/example/001_HelloWorld/src/org/minimalj/example/helloworld/HelloWorldApplication.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.helloworld; 2 | 3 | import org.minimalj.application.Application; 4 | import org.minimalj.frontend.page.Page; 5 | 6 | public class HelloWorldApplication extends Application { 7 | 8 | @Override 9 | public Page createDefaultPage() { 10 | return new HelloWorldPage(); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/impl/swing/lookAndFeel/TerminalLargeFontLookAndFeel.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.swing.lookAndFeel; 2 | 3 | public class TerminalLargeFontLookAndFeel extends TerminalLookAndFeel { 4 | private static final long serialVersionUID = 1L; 5 | 6 | @Override 7 | public MetalTheme getMetalTheme() { 8 | return new TerminalLookAndFeel.MetalTheme(true); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /example/014_TimeSheet/timesheet/src/org/minimalj/example/timesheet/model/WorkForProject.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.timesheet.model; 2 | 3 | import java.math.BigDecimal; 4 | 5 | import org.minimalj.model.Keys; 6 | 7 | public class WorkForProject { 8 | 9 | public static final WorkForProject $ = Keys.of(WorkForProject.class); 10 | 11 | public Project project; 12 | 13 | public BigDecimal hours; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/model/annotation/Signed.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target({ ElementType.FIELD, ElementType.METHOD }) 10 | public @interface Signed { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /ext/servlet/example/003_XmlConfiguration/src/org/minimalj/example/helloworld/HelloWorldApplication.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.helloworld; 2 | 3 | import org.minimalj.application.Application; 4 | import org.minimalj.frontend.page.Page; 5 | 6 | public class HelloWorldApplication extends Application { 7 | 8 | @Override 9 | public Page createDefaultPage() { 10 | return new HelloWorldPage(); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/form/element/Indication.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.form.element; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.frontend.Frontend.FormContent; 6 | import org.minimalj.model.validation.ValidationMessage; 7 | 8 | public interface Indication { 9 | 10 | public void setValidationMessages(List validationMessages, FormContent formContent); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /example/002_HelloWorld/src/org/minimalj/example/helloworld3/User.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.helloworld3; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.annotation.NotEmpty; 5 | import org.minimalj.model.annotation.Size; 6 | 7 | public class User { 8 | public static final User $ = Keys.of(User.class); 9 | 10 | @NotEmpty @Size(255) 11 | public String name; 12 | 13 | public byte[] image; 14 | } 15 | -------------------------------------------------------------------------------- /example/016_Weather/src/main/java/org/minimalj/example/weather/model/City.java: -------------------------------------------------------------------------------- 1 | 2 | package org.minimalj.example.weather.model; 3 | 4 | import javax.annotation.Generated; 5 | 6 | @Generated("org.jsonschema2pojo") 7 | public class City { 8 | 9 | public Integer id; 10 | public String name; 11 | public Coord coord; 12 | public String country; 13 | public Integer population; 14 | public Sys sys; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/transaction/Role.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.transaction; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target({ElementType.TYPE, ElementType.PACKAGE}) 10 | public @interface Role { 11 | 12 | String[] value(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/K.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.annotation.Size; 5 | 6 | public class K { 7 | public static final K $ = Keys.of(K.class); 8 | 9 | public K() { 10 | // needed for reflection constructor 11 | } 12 | 13 | public K(String k) { 14 | this.k = k; 15 | } 16 | 17 | @Size(20) 18 | public String k; 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/model/annotation/Materialized.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target(ElementType.METHOD) 10 | public @interface Materialized { 11 | 12 | String[] value() default {}; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/model/annotation/Visible.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target({ ElementType.FIELD, ElementType.METHOD }) 10 | public @interface Visible { 11 | 12 | String value(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/util/LoggingRuntimeException.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.util; 2 | 3 | import java.util.logging.Level; 4 | import java.util.logging.Logger; 5 | 6 | public class LoggingRuntimeException extends RuntimeException { 7 | private static final long serialVersionUID = 1L; 8 | 9 | public LoggingRuntimeException(Exception x, Logger logger, String text) { 10 | super(text); 11 | logger.log(Level.SEVERE, text, x); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/impl/swing/lookAndFeel/TerminalTextFieldUI.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.swing.lookAndFeel; 2 | 3 | import java.awt.Graphics; 4 | 5 | import javax.swing.plaf.metal.MetalTextFieldUI; 6 | 7 | public class TerminalTextFieldUI extends MetalTextFieldUI { 8 | 9 | @Override 10 | protected void paintSafely(Graphics g) { 11 | // TODO Auto-generated method stub 12 | super.paintSafely(g); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /example/015_BookPub/src/main/java/org/minimalj/example/bookpub/entity/Book.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.bookpub.entity; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.model.annotation.Size; 6 | 7 | public class Book { 8 | public Object id; 9 | 10 | @Size(255) 11 | public String isbn, title, description; 12 | 13 | public Author author; 14 | 15 | public Publisher publisher; 16 | 17 | public List reviewers; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /ext/servlet/example/001_HelloWorld/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ext/vaadin/src/main/java/org/minimalj/frontend/impl/vaadin/toolkit/VaadinTitle.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.vaadin.toolkit; 2 | 3 | import org.minimalj.frontend.Frontend.IComponent; 4 | 5 | import com.vaadin.flow.component.html.H2; 6 | 7 | public class VaadinTitle extends H2 implements IComponent { 8 | private static final long serialVersionUID = 1L; 9 | 10 | public VaadinTitle(String content) { 11 | setText(content); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/relation/TestElementC.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql.relation; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | 6 | public class TestElementC { 7 | 8 | public TestElementC() { 9 | // needed for reflection constructor 10 | } 11 | 12 | public TestElementC(String name) { 13 | this.name = name; 14 | } 15 | 16 | public Object id; 17 | 18 | @Size(30) 19 | public String name; 20 | } 21 | -------------------------------------------------------------------------------- /example/014_TimeSheet/timesheet/src/org/minimalj/example/timesheet/model/Project.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.timesheet.model; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.annotation.Size; 5 | 6 | public class Project { 7 | 8 | public static final Project $ = Keys.of(Project.class); 9 | 10 | public Object id; 11 | 12 | @Size(255) 13 | public String name; 14 | 15 | @Size(1023) 16 | public String description; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /ext/servlet/example/002_WebApplication/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ext/servlet/example/003_XmlConfiguration/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ext/swingfxbrowser/src/test/java/org/minimalj/frontend/impl/swing/component/FxHtmlContentTest.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.swing.component; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | import org.minimalj.frontend.impl.swing.toolkit.SwingFrontend; 6 | 7 | public class FxHtmlContentTest { 8 | 9 | @Test 10 | public void testClassName() { 11 | Assert.assertEquals(SwingFrontend.FX_HTML_CLASS, FxHtmlContent.class.getName()); 12 | } 13 | } -------------------------------------------------------------------------------- /src/main/java/org/minimalj/model/annotation/Searched.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target({ ElementType.FIELD, ElementType.METHOD }) 10 | public @interface Searched { 11 | 12 | String[] value() default {}; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.metadata/ 2 | /RemoteSystemsTempFiles/ 3 | /Servers/ 4 | 5 | examples/Minimal-J_ERP/.classpath 6 | examples/Minimal-J_ERP/.project 7 | examples/Minimal-J_EventManager/.classpath 8 | examples/Minimal-J_EventManager/.project 9 | examples/Minimal-J_Library/.classpath 10 | examples/Minimal-J_Library/.project 11 | /target/ 12 | /.classpath 13 | /.project 14 | /.idea/ 15 | *.iml 16 | /.settings/ 17 | *.cer 18 | *.jks 19 | /bin/ 20 | 21 | /node_modules/ 22 | /dist/ -------------------------------------------------------------------------------- /example/004_Library/src/main/java/org/minimalj/example/library/transaction/ProlongTransaction.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.library.transaction; 2 | 3 | import java.io.Serializable; 4 | 5 | import org.minimalj.transaction.Transaction; 6 | 7 | public class ProlongTransaction implements Transaction { 8 | private static final long serialVersionUID = 1L; 9 | 10 | @Override 11 | public Serializable execute() { 12 | return null; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /ext/historized/src/test/java/org/minimalj/repository/sql/relationhist/TestElementC.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql.relationhist; 2 | 3 | import org.minimalj.model.annotation.Size; 4 | 5 | 6 | public class TestElementC { 7 | 8 | public TestElementC() { 9 | // needed for reflection constructor 10 | } 11 | 12 | public TestElementC(String name) { 13 | this.name = name; 14 | } 15 | 16 | public Object id; 17 | 18 | @Size(30) 19 | public String name; 20 | } 21 | -------------------------------------------------------------------------------- /ext/uitest/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 3 | org.eclipse.jdt.core.compiler.compliance=17 4 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 5 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 6 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore 7 | org.eclipse.jdt.core.compiler.release=enabled 8 | org.eclipse.jdt.core.compiler.source=17 9 | -------------------------------------------------------------------------------- /src/main/resources/org/minimalj/frontend/impl/swing/fieldAction.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/resources/org/minimalj/frontend/impl/swing/fieldMenu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /example/003_Notes/src/org/minimalj/example/notes/Note.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.notes; 2 | 3 | import java.time.LocalDate; 4 | 5 | import org.minimalj.model.Keys; 6 | import org.minimalj.model.annotation.Searched; 7 | import org.minimalj.model.annotation.Size; 8 | 9 | public class Note { 10 | public static final Note $ = Keys.of(Note.class); 11 | 12 | public Object id; 13 | 14 | public LocalDate date; 15 | 16 | @Size(2000) @Searched 17 | public String text; 18 | } 19 | -------------------------------------------------------------------------------- /ext/historized/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 3 | org.eclipse.jdt.core.compiler.compliance=1.8 4 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 5 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 6 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore 7 | org.eclipse.jdt.core.compiler.release=disabled 8 | org.eclipse.jdt.core.compiler.source=1.8 9 | -------------------------------------------------------------------------------- /ext/historized/src/main/java/org/minimalj/repository/sql/HistorizedListTable.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | public interface HistorizedListTable extends ListTable { 7 | 8 | public List getList(PARENT parent, Integer time, Map, Map> loadedReferences); 9 | 10 | public void replaceList(PARENT parent, List objects, int version); 11 | 12 | } -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/frontend/VetForm.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.minimalclinic.frontend; 2 | 3 | import org.minimalj.example.minimalclinic.model.Vet; 4 | import org.minimalj.frontend.form.Form; 5 | 6 | public class VetForm extends Form { 7 | 8 | public VetForm(boolean editable) { 9 | super(editable); 10 | 11 | line(Vet.$.person.firstName); 12 | line(Vet.$.person.lastName); 13 | line(Vet.$.specialties); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ext/ubersetzung/src/main/java/org/minimalj/ubersetzung/model/UbersetzungView.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.ubersetzung.model; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.View; 5 | import org.minimalj.model.annotation.Size; 6 | 7 | public class UbersetzungView implements View { 8 | 9 | public static final UbersetzungView $ = Keys.of(UbersetzungView.class); 10 | 11 | public Object id; 12 | 13 | @Size(2) 14 | public String lang, country; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/org/minimalj/frontend/impl/swing/lookAndFeel/PrintLookAndFeel.properties: -------------------------------------------------------------------------------- 1 | name = Druckbarer Look 2 | description = Black on white, no borders 3 | fontName = Dialog 4 | fontSize = 12 5 | backgroundColor = FFFFFF 6 | foregroundColor = 000000 7 | primaryColor1 = 888888 8 | primaryColor2 = FFFFFF 9 | primaryColor3 = FFFFFF 10 | secondaryColor1 = 888888 11 | secondaryColor2 = AAAAAA 12 | secondaryColor3 = FFFFFF 13 | selectionForeground = 000000 14 | selectionBackground = FFFF33 15 | -------------------------------------------------------------------------------- /ext/ubersetzung/src/main/java/org/minimalj/ubersetzung/model/UbersetzungEntry.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.ubersetzung.model; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.annotation.NotEmpty; 5 | import org.minimalj.model.annotation.Size; 6 | 7 | public class UbersetzungEntry { 8 | 9 | public static final UbersetzungEntry $ = Keys.of(UbersetzungEntry.class); 10 | 11 | @Size(255) @NotEmpty 12 | public String key; 13 | 14 | @Size(255) 15 | public String value; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/model/annotation/Comment.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model.annotation; 2 | 3 | import static java.lang.annotation.ElementType.FIELD; 4 | import static java.lang.annotation.ElementType.TYPE; 5 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 6 | 7 | import java.lang.annotation.Retention; 8 | import java.lang.annotation.Target; 9 | 10 | @Retention(RUNTIME) 11 | @Target({ TYPE, FIELD }) 12 | public @interface Comment { 13 | 14 | String value(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/util/NonNull.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.util; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | @Documented 10 | @Retention(RetentionPolicy.CLASS) 11 | @Target({ ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, ElementType.LOCAL_VARIABLE }) 12 | public @interface NonNull { 13 | 14 | } -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/relation/TestElementCode.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql.relation; 2 | 3 | import org.minimalj.model.Code; 4 | 5 | 6 | public class TestElementCode implements Code { 7 | 8 | public TestElementCode() { 9 | // needed for reflection constructor 10 | } 11 | 12 | public TestElementCode(Integer id, Integer value) { 13 | this.id = id; 14 | this.value = value; 15 | } 16 | 17 | public Integer id; 18 | 19 | public Integer value; 20 | } 21 | -------------------------------------------------------------------------------- /example/002_HelloWorld/src/org/minimalj/example/helloworld2/GreetingApplication.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.helloworld2; 2 | 3 | import java.util.Collections; 4 | import java.util.List; 5 | 6 | import org.minimalj.application.Application; 7 | import org.minimalj.frontend.action.Action; 8 | 9 | public class GreetingApplication extends Application { 10 | 11 | @Override 12 | public List getNavigation() { 13 | return Collections.singletonList(new UserNameEditor()); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/page/ExpiredPage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.page; 2 | 3 | import org.minimalj.util.resources.Resources; 4 | 5 | public class ExpiredPage extends HtmlPage { 6 | 7 | public ExpiredPage() { 8 | super(null); 9 | } 10 | 11 | @Override 12 | protected String getHtml() { 13 | return Resources.getString("ExpiredPage.html"); 14 | } 15 | 16 | @Override 17 | public String getTitle() { 18 | return Resources.getString("ExpiredPage"); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/repository/sql/ListTable.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | public interface ListTable { 7 | 8 | public String getName(); 9 | 10 | public List getList(PARENT parent, Map, Map> loadedReferences); 11 | 12 | public void addList(PARENT parent, List objects); 13 | 14 | public void replaceList(PARENT parent, List objects); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/H.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.annotation.Size; 5 | 6 | public class H { 7 | 8 | public static final H $ = Keys.of(H.class); 9 | 10 | public H() { 11 | // needed for reflection constructor 12 | } 13 | 14 | public Object id; 15 | 16 | @Size(20) 17 | public String name; 18 | 19 | public G g; 20 | 21 | public K k; 22 | 23 | public final I i = new I(); 24 | } 25 | -------------------------------------------------------------------------------- /doc/mj_classes.adoc: -------------------------------------------------------------------------------- 1 | == Important classes in Minimal-J 2 | 3 | There are some classes you really need to know in the Minimal-J Framework. And there are 4 | classes that you can pretty much ignore. 5 | 6 | First a list of classes you should really have a look upon 7 | 8 | * Application: The abstract class you have to extend to define the entry point for your application 9 | * Backend: Provides shortcuts for all the CRUD - Transactions 10 | * Repository: Manages the mapping from Java objects 11 | 12 | 13 | -------------------------------------------------------------------------------- /example/014_TimeSheet/timesheet/src/org/minimalj/example/timesheet/model/Work.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.timesheet.model; 2 | 3 | import java.time.LocalDate; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.minimalj.model.Keys; 8 | 9 | public class Work { 10 | 11 | public static final Work $ = Keys.of(Work.class); 12 | 13 | public Object id; 14 | 15 | public LocalDate date; 16 | 17 | public List workForProjects = new ArrayList<>(); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /example/016_Weather/src/main/java/org/minimalj/example/weather/model/Main.java: -------------------------------------------------------------------------------- 1 | 2 | package org.minimalj.example.weather.model; 3 | 4 | import javax.annotation.Generated; 5 | 6 | @Generated("org.jsonschema2pojo") 7 | public class Main { 8 | 9 | public Double temp; 10 | public Double tempMin; 11 | public Double tempMax; 12 | public Double pressure; 13 | public Double seaLevel; 14 | public Double grndLevel; 15 | public Integer humidity; 16 | public Double tempKf; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/org/minimalj/frontend/impl/swing/lookAndFeel/TerminalLookAndFeel.properties: -------------------------------------------------------------------------------- 1 | name = Terminal Look and Feel 2 | description = Green on white, readable fonts 3 | fontName = Dialog 4 | fontSize = 12 5 | backgroundColor = 000000 6 | foregroundColor = 00FF00 7 | primaryColor1 = 00FF00 8 | primaryColor2 = 55FF55 9 | primaryColor3 = 99FF99 10 | secondaryColor1 = 007700 11 | secondaryColor2 = 00AA00 12 | secondaryColor3 = 33FF33 13 | selectionForeground = 000000 14 | selectionBackground = 33FF33 15 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/model/annotation/Enabled.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target({ ElementType.FIELD, ElementType.METHOD }) 10 | public @interface Enabled { 11 | 12 | String value(); 13 | 14 | public static final String FALSE = Boolean.FALSE.toString(); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/org/minimalj/frontend/impl/swing/filter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ext/ignite/src/test/java/org/minimalj/repository/ignite/H.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.ignite; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.annotation.Size; 5 | 6 | public class H { 7 | 8 | public static final H $ = Keys.of(H.class); 9 | 10 | public H() { 11 | // needed for reflection constructor 12 | } 13 | 14 | public Object id; 15 | 16 | @Size(20) 17 | public String name; 18 | 19 | public G g; 20 | 21 | public K k; 22 | 23 | public final I i = new I(); 24 | } 25 | -------------------------------------------------------------------------------- /ext/memory/src/test/java/org/minimalj/repository/memory/H.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.memory; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.annotation.Size; 5 | 6 | public class H { 7 | 8 | public static final H $ = Keys.of(H.class); 9 | 10 | public H() { 11 | // needed for reflection constructor 12 | } 13 | 14 | public Object id; 15 | 16 | @Size(20) 17 | public String name; 18 | 19 | public G g; 20 | 21 | public K k; 22 | 23 | public final I i = new I(); 24 | } 25 | -------------------------------------------------------------------------------- /ext/metamodel/src/main/resources/MjModel.properties: -------------------------------------------------------------------------------- 1 | EntityTablePage = Entities 2 | PropertyTablePage = Properties of {0} 3 | EnumTablePage = Values of enum {0} 4 | 5 | name = Name 6 | type = Type 7 | 8 | MjEntity.validatable = Validatable 9 | MjEntity.maxInclusive = Max 10 | 11 | MjProperty.formattedType = Name 12 | MjProperty.size = Size 13 | MjProperty.notEmpty = Not empty 14 | MjProperty.searched = Searched 15 | MjProperty.enabled = Enabled 16 | MjProperty.materialized = Materialized 17 | 18 | MjEnumValue.ord = Index -------------------------------------------------------------------------------- /ext/uitest/src/main/java/org/minimalj/test/LoginFrameFacade.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.test; 2 | 3 | public interface LoginFrameFacade { 4 | 5 | public boolean hasSkipLogin(); 6 | 7 | public boolean hasClose(); 8 | 9 | public void login(); 10 | 11 | public void cancel(); 12 | 13 | public void close(); 14 | 15 | public interface UserPasswordLoginTestFacade extends LoginFrameFacade { 16 | 17 | public void setUser(String name); 18 | 19 | public void setPassword(String password); 20 | 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/impl/json/JsonHtmlContent.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.json; 2 | 3 | import java.net.URL; 4 | 5 | import org.minimalj.frontend.Frontend.IContent; 6 | 7 | public class JsonHtmlContent extends JsonComponent implements IContent { 8 | 9 | public JsonHtmlContent(String html) { 10 | super("Html"); 11 | put("htmlOrUrl", html); 12 | } 13 | 14 | public JsonHtmlContent(URL url) { 15 | super("Url"); 16 | put("htmlOrUrl", url.toExternalForm()); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/form/element/Enable.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.form.element; 2 | 3 | import org.minimalj.model.annotation.Enabled; 4 | 5 | public interface Enable { 6 | 7 | /** 8 | * This should not be called from application code directly. Instead the field in the model class 9 | * belonging to the form field should be annotated with {@link Enabled}. 10 | * 11 | * @param enabled the new status of the FormElement 12 | */ 13 | public void setEnabled(boolean enabled); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/relation/TestElementB.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql.relation; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.model.annotation.Size; 6 | 7 | public class TestElementB { 8 | 9 | public TestElementB() { 10 | // needed for reflection constructor 11 | } 12 | 13 | public TestElementB(String name) { 14 | this.name = name; 15 | } 16 | 17 | public Object id; 18 | 19 | public List list; 20 | 21 | @Size(30) 22 | public String name; 23 | } 24 | -------------------------------------------------------------------------------- /example/004_Library/src/main/java/org/minimalj/example/library/model/Lend.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.library.model; 2 | 3 | import java.time.LocalDate; 4 | 5 | import org.minimalj.model.Keys; 6 | import org.minimalj.model.annotation.NotEmpty; 7 | 8 | public class Lend { 9 | 10 | public static final Lend $ = Keys.of(Lend.class); 11 | 12 | public Object id; 13 | 14 | @NotEmpty 15 | public Book book; 16 | 17 | @NotEmpty 18 | public Customer customer; 19 | 20 | @NotEmpty 21 | public LocalDate till; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /example/012_MiniBoost/src/org/minimalj/example/miniboost/model/CustomerLookup.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.miniboost.model; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.View; 5 | 6 | public class CustomerLookup implements View { 7 | 8 | public static final CustomerLookup $ = Keys.of(CustomerLookup.class); 9 | 10 | public Object id; 11 | 12 | public String matchcode; 13 | 14 | public String name1, name2, name3; 15 | 16 | public final Address address = new Address(); 17 | 18 | 19 | } -------------------------------------------------------------------------------- /example/019_MiniMail/src/main/java/org/minimalj/example/minimail/model/MailHeader.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.minimail.model; 2 | 3 | import java.time.LocalDate; 4 | 5 | import org.minimalj.model.View; 6 | import org.minimalj.model.annotation.Size; 7 | 8 | public class MailHeader implements View { 9 | 10 | public final EMailAddress from = new EMailAddress(); 11 | public final EMailAddress to = new EMailAddress(); 12 | 13 | @Size(2000) 14 | public String subject; 15 | 16 | public LocalDate date; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /example/005_Numbers/src/org/minimalj/example/numbers/NumbersForm.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.numbers; 2 | 3 | import org.minimalj.frontend.form.Form; 4 | import org.minimalj.model.properties.Properties; 5 | import org.minimalj.model.properties.Property; 6 | 7 | public class NumbersForm extends Form { 8 | 9 | public NumbersForm() { 10 | super(2); 11 | for (Property property : Properties.getProperties(Numbers.class).values()) { 12 | Object key = property.getValue(Numbers.$); 13 | line(key); 14 | } 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /ext/memory/src/test/java/org/minimalj/repository/memory/G.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.memory; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.annotation.Searched; 5 | import org.minimalj.model.annotation.Size; 6 | 7 | public class G { 8 | public static final G $ = Keys.of(G.class); 9 | 10 | public G() { 11 | // needed for reflection constructor 12 | } 13 | 14 | public G(String g) { 15 | this.g = g; 16 | } 17 | 18 | public Object id; 19 | 20 | @Size(20) @Searched 21 | public String g; 22 | } 23 | -------------------------------------------------------------------------------- /example/002_HelloWorld/src/org/minimalj/example/helloworld3/GreetingApplication.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.helloworld3; 2 | 3 | import java.util.Collections; 4 | import java.util.List; 5 | 6 | import org.minimalj.application.Application; 7 | import org.minimalj.frontend.action.Action; 8 | 9 | public class GreetingApplication extends Application { 10 | 11 | static User user = new User(); 12 | 13 | @Override 14 | public List getNavigation() { 15 | return Collections.singletonList(new UserNameEditor()); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /ext/ubersetzung/src/main/java/org/minimalj/ubersetzung/model/Ubersetzung.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.ubersetzung.model; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.minimalj.model.Keys; 7 | import org.minimalj.model.annotation.Size; 8 | 9 | public class Ubersetzung { 10 | 11 | public static final Ubersetzung $ = Keys.of(Ubersetzung.class); 12 | 13 | public Object id; 14 | 15 | @Size(2) 16 | public String lang, country; 17 | 18 | public final List entries = new ArrayList<>(); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/backend/repository/InsertTransaction.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.backend.repository; 2 | 3 | public class InsertTransaction extends WriteTransaction { 4 | private static final long serialVersionUID = 1L; 5 | 6 | public InsertTransaction(T object) { 7 | super(object); 8 | } 9 | 10 | @Override 11 | public Object execute() { 12 | return insert(getUnwrapped()); 13 | } 14 | 15 | @Override 16 | public String toString() { 17 | return "Insert " + getUnwrapped().getClass().getSimpleName(); 18 | } 19 | } -------------------------------------------------------------------------------- /example/002_HelloWorld/src/org/minimalj/example/helloworld/HelloWorldPage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.helloworld; 2 | 3 | import org.minimalj.frontend.Frontend; 4 | import org.minimalj.frontend.Frontend.IContent; 5 | import org.minimalj.frontend.page.Page; 6 | 7 | public class HelloWorldPage implements Page { 8 | 9 | @Override 10 | public String getTitle() { 11 | return "Hello World"; 12 | } 13 | 14 | @Override 15 | public IContent getContent() { 16 | return Frontend.getInstance().createHtmlContent("Hello World"); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /example/016_Weather/src/main/java/org/minimalj/example/weather/model/Weather.java: -------------------------------------------------------------------------------- 1 | 2 | package org.minimalj.example.weather.model; 3 | 4 | import java.util.ArrayList; 5 | import javax.annotation.Generated; 6 | 7 | @Generated("org.jsonschema2pojo") 8 | public class Weather { 9 | 10 | public City city; 11 | public String cod; 12 | public Double message; 13 | public Integer cnt; 14 | public java.util.List list = new ArrayList(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/frontend/OwnerForm.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.minimalclinic.frontend; 2 | 3 | import org.minimalj.example.minimalclinic.model.Owner; 4 | import org.minimalj.frontend.form.Form; 5 | 6 | public class OwnerForm extends Form { 7 | 8 | public OwnerForm(boolean editable) { 9 | super(editable); 10 | 11 | line(Owner.$.person.firstName); 12 | line(Owner.$.person.lastName); 13 | line(Owner.$.address); 14 | line(Owner.$.city); 15 | line(Owner.$.telephone); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /ext/servlet/example/001_HelloWorld/src/org/minimalj/example/helloworld/HelloWorldPage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.helloworld; 2 | 3 | import org.minimalj.frontend.Frontend; 4 | import org.minimalj.frontend.Frontend.IContent; 5 | import org.minimalj.frontend.page.Page; 6 | 7 | public class HelloWorldPage implements Page { 8 | 9 | @Override 10 | public String getTitle() { 11 | return "Hello World"; 12 | } 13 | 14 | @Override 15 | public IContent getContent() { 16 | return Frontend.getInstance().createHtmlContent("Hello World"); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /ext/vaadin/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | .idea/ 3 | .settings 4 | .project 5 | .classpath 6 | 7 | *.iml 8 | .DS_Store 9 | 10 | # The following files are generated/updated by vaadin-maven-plugin 11 | node_modules/ 12 | frontend/generated/ 13 | 14 | # Browser drivers for local integration tests 15 | drivers/ 16 | # Error screenshots generated by TestBench for failed integration tests 17 | error-screenshots/ 18 | webpack.generated.js 19 | 20 | pnpm-lock.yaml 21 | pnpmfile.js 22 | /package.json 23 | /tsconfig.json 24 | /types.d.ts 25 | /vite.config.ts 26 | /vite.generated.ts 27 | -------------------------------------------------------------------------------- /example/004_Library/src/main/java/org/minimalj/example/library/frontend/form/BookForm.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.library.frontend.form; 2 | 3 | import static org.minimalj.example.library.model.Book.*; 4 | 5 | import org.minimalj.example.library.model.Book; 6 | import org.minimalj.frontend.form.Form; 7 | 8 | public class BookForm extends Form { 9 | 10 | public BookForm(boolean editable) { 11 | super(editable, 2); 12 | 13 | line($.title); 14 | line($.author, $.date); 15 | line($.media, $.pages); 16 | line($.available, $.price); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/view/TestView.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql.view; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.View; 5 | 6 | public class TestView implements View{ 7 | 8 | public static final TestView $ = Keys.of(TestView.class); 9 | 10 | public TestView() { 11 | // needed for reflection constructor 12 | } 13 | 14 | public TestView(String name) { 15 | this.name = name; 16 | } 17 | 18 | public Object id; 19 | 20 | public String name; 21 | 22 | public String doubleName; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /example/003_Notes/src/org/minimalj/example/notes/NoteTablePage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.notes; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.backend.Backend; 6 | import org.minimalj.frontend.page.TablePage; 7 | import org.minimalj.repository.query.By; 8 | 9 | public class NoteTablePage extends TablePage { 10 | 11 | @Override 12 | protected Object[] getColumns() { 13 | return new Object[] { Note.$.date, Note.$.text }; 14 | } 15 | 16 | @Override 17 | protected List load() { 18 | return Backend.find(Note.class, By.all()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /example/005_Numbers/src/org/minimalj/example/numbers/NumbersApplication.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.numbers; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.minimalj.application.Application; 7 | import org.minimalj.frontend.action.Action; 8 | 9 | public class NumbersApplication extends Application { 10 | 11 | public NumbersApplication() { 12 | } 13 | 14 | @Override 15 | public List getNavigation() { 16 | List items = new ArrayList<>(); 17 | items.add(new NumbersEditor()); 18 | return items; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /example/005_Numbers/src/org/minimalj/example/numbers/NumbersEditor.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.numbers; 2 | 3 | import org.minimalj.frontend.editor.Editor.NewObjectEditor; 4 | import org.minimalj.frontend.form.Form; 5 | 6 | public class NumbersEditor extends NewObjectEditor { 7 | 8 | @Override 9 | protected Form createForm() { 10 | return new NumbersForm(); 11 | } 12 | 13 | @Override 14 | protected Numbers save(Numbers object) { 15 | return object; 16 | } 17 | 18 | @Override 19 | public int getMinWidth() { 20 | return 600; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/backend/repository/ReadTransaction.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.backend.repository; 2 | 3 | import org.minimalj.util.ClassHolder; 4 | 5 | public abstract class ReadTransaction extends EntityTransaction { 6 | private static final long serialVersionUID = 1L; 7 | 8 | private final ClassHolder classHolder; 9 | 10 | public ReadTransaction(Class clazz) { 11 | this.classHolder = new ClassHolder<>(clazz); 12 | } 13 | 14 | @Override 15 | public Class getEntityClazz() { 16 | return classHolder.getClazz(); 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/SqlReadWithStringIdTest.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | public class SqlReadWithStringIdTest extends SqlTest { 7 | 8 | @Override 9 | public Class[] getEntityClasses() { 10 | return new Class[] { G.class }; 11 | }; 12 | 13 | @Test 14 | public void testInsertAndDelete() { 15 | G g = new G("testName1"); 16 | Object id = repository.insert(g); 17 | 18 | G g2 = repository.read(G.class, id.toString()); 19 | Assert.assertNotNull(g2); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /example/007_PetClinic/src/intro.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | Pet Clinic 4 | A Minimal-J Demonstration 5 |
6 | 7 |

Welcome

8 | 9 |

This is a Minimal-J application inspired by the Pet Clinic by Spring Framework. It should provide the same 10 | functionality with much less code. Try it out!

11 | 12 | Cat named Tiger 13 |
14 | -------------------------------------------------------------------------------- /example/012_MiniBoost/src/org/minimalj/example/miniboost/model/Role.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.miniboost.model; 2 | 3 | import org.minimalj.model.Code; 4 | import org.minimalj.model.annotation.Size; 5 | 6 | public class Role implements Code { 7 | 8 | public static final Role ADMIN = new Role("ADMIN", true); 9 | public static final Role USER = new Role("USER", false); 10 | 11 | @Size(15) 12 | public String id; 13 | public Boolean admin; 14 | 15 | public Role() { 16 | } 17 | 18 | public Role(String id, boolean admin) { 19 | this.id = id; 20 | this.admin = admin; 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /ext/servlet/example/002_WebApplication/src/org/minimalj/example/helloworld2/HelloWorldPage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.helloworld2; 2 | 3 | import org.minimalj.frontend.Frontend; 4 | import org.minimalj.frontend.Frontend.IContent; 5 | import org.minimalj.frontend.page.Page; 6 | 7 | public class HelloWorldPage implements Page { 8 | 9 | @Override 10 | public String getTitle() { 11 | return "Application"; 12 | } 13 | 14 | @Override 15 | public IContent getContent() { 16 | return Frontend.getInstance().createHtmlContent("This is a page of the Minimal-J application"); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /ext/vaadin8/src/main/java/org/minimalj/frontend/impl/vaadin/toolkit/VaadinTitle.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.vaadin.toolkit; 2 | 3 | import org.minimalj.frontend.Frontend.IComponent; 4 | 5 | import com.vaadin.shared.ui.ContentMode; 6 | import com.vaadin.ui.Label; 7 | 8 | public class VaadinTitle extends Label implements IComponent { 9 | private static final long serialVersionUID = 1L; 10 | 11 | public VaadinTitle(String content) { 12 | // content = Util.escapeHTML(content); 13 | setContentMode(ContentMode.HTML); 14 | setValue("

" + content + "


"); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/page/SimpleTableEditorPage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.page; 2 | 3 | import org.minimalj.util.CloneHelper; 4 | 5 | public abstract class SimpleTableEditorPage extends BaseTableEditorPage { 6 | 7 | public SimpleTableEditorPage() { 8 | super(); 9 | } 10 | 11 | @Override 12 | protected T createObject() { 13 | return CloneHelper.newInstance(getClazz()); 14 | } 15 | 16 | @Override 17 | protected T viewed(T object) { 18 | return object; 19 | } 20 | 21 | @Override 22 | protected T view(T object) { 23 | return object; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /example/009_eBanking/src/main/java/org/minimalj/example/ebanking/model/Account.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.ebanking.model; 2 | 3 | import java.math.BigDecimal; 4 | 5 | import org.minimalj.model.Keys; 6 | import org.minimalj.model.annotation.NotEmpty; 7 | import org.minimalj.model.annotation.Size; 8 | 9 | public class Account { 10 | 11 | public static final Account $ = Keys.of(Account.class); 12 | 13 | public Object id; 14 | 15 | @Size(32) @NotEmpty 16 | public String accountNr; 17 | 18 | @Size(255) @NotEmpty 19 | public String description; 20 | 21 | public BigDecimal value; 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/impl/swing/toolkit/SwingTitle.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.swing.toolkit; 2 | 3 | import java.awt.Font; 4 | 5 | import javax.swing.BorderFactory; 6 | import javax.swing.JLabel; 7 | 8 | import org.minimalj.frontend.Frontend.IComponent; 9 | 10 | public class SwingTitle extends JLabel implements IComponent { 11 | private static final long serialVersionUID = 1L; 12 | 13 | public SwingTitle(String string) { 14 | super(string); 15 | setBorder(BorderFactory.createEmptyBorder(7, 0, 3, 0)); 16 | setFont(getFont().deriveFont(Font.BOLD)); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/impl/json/JsonCheckBox.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.json; 2 | 3 | import org.minimalj.frontend.Frontend.InputComponentListener; 4 | 5 | public class JsonCheckBox extends JsonInputComponent { 6 | 7 | public JsonCheckBox(String text, InputComponentListener changeListener) { 8 | super("CheckBox", changeListener); 9 | put("text", text); 10 | } 11 | 12 | @Override 13 | public void setValue(Boolean selected) { 14 | put(VALUE, selected); 15 | } 16 | 17 | @Override 18 | public Boolean getValue() { 19 | return (Boolean) get(VALUE); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ext/ignite/src/test/java/org/minimalj/repository/ignite/G.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.ignite; 2 | 3 | import org.apache.ignite.cache.query.annotations.QuerySqlField; 4 | import org.minimalj.model.Keys; 5 | import org.minimalj.model.annotation.Searched; 6 | import org.minimalj.model.annotation.Size; 7 | 8 | public class G { 9 | public static final G $ = Keys.of(G.class); 10 | 11 | public G() { 12 | // needed for reflection constructor 13 | } 14 | 15 | public G(String g) { 16 | this.g = g; 17 | } 18 | 19 | public Object id; 20 | 21 | @Size(20) @Searched @QuerySqlField 22 | public String g; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/util/LazyLoadingList.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.util; 2 | 3 | import java.util.AbstractList; 4 | import java.util.List; 5 | 6 | import org.minimalj.frontend.impl.util.ColumnFilter; 7 | 8 | public abstract class LazyLoadingList extends AbstractList { 9 | 10 | @Override 11 | public T get(int index) { 12 | throw new RuntimeException("Should not be called"); 13 | } 14 | 15 | public abstract List get(ColumnFilter[] filters, Object[] sortKeys, boolean[] sortDirections, int offset, int pageSize); 16 | 17 | public abstract int count(ColumnFilter[] filters); 18 | 19 | } -------------------------------------------------------------------------------- /src/main/java/org/minimalj/model/View.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model; 2 | 3 | 4 | /** 5 | * A class implementing View is a model class that holds only a part 6 | * of the fields of an other class.

7 | * 8 | * The objects of this class are never saved if they referenced 9 | * by other objects.

10 | * 11 | * Note that while the concept is similar to database views this 12 | * interface does not represent views on the database but 13 | * views on a java model entity. 14 | * 15 | * @param the class on which this view is based. Mandatory. 16 | */ 17 | public interface View { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /example/013_NewsFeed/src/org/minimalj/example/newsfeed/model/Channel.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.newsfeed.model; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.minimalj.model.Keys; 7 | import org.minimalj.model.annotation.Size; 8 | 9 | public class Channel { 10 | 11 | public static final Channel $ = Keys.of(Channel.class); 12 | 13 | public final transient List items = new ArrayList<>(); 14 | 15 | @Size(512) 16 | public String title; 17 | 18 | @Size(2048) 19 | public String description, copyright; 20 | 21 | @Size(32) 22 | public String language; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /ext/vaadin/src/main/java/org/minimalj/frontend/impl/vaadin/toolkit/VaadinHorizontalLayout.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.vaadin.toolkit; 2 | 3 | import org.minimalj.frontend.Frontend.IComponent; 4 | import org.minimalj.frontend.Frontend.IContent; 5 | 6 | import com.vaadin.flow.component.orderedlayout.HorizontalLayout; 7 | 8 | public class VaadinHorizontalLayout extends HorizontalLayout implements IComponent, IContent { 9 | private static final long serialVersionUID = 1L; 10 | 11 | public VaadinHorizontalLayout(IComponent[] components) { 12 | VaadinVerticalLayout.addAll(this, components); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /ext/javafx/src/main/java/org/minimalj/frontend/impl/javafx/toolkit/FxAction.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.javafx.toolkit; 2 | 3 | import org.minimalj.frontend.Frontend.IComponent; 4 | import org.minimalj.frontend.action.Action; 5 | 6 | public class FxAction extends javafx.scene.control.Hyperlink implements IComponent { 7 | 8 | public FxAction(Action action) { 9 | super(action.getName()); 10 | if (action.getDescription() != null) { 11 | setTooltip(new javafx.scene.control.Tooltip(action.getDescription())); 12 | } 13 | // todo change to event thread 14 | setOnAction(event -> action.run()); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ext/vaadin8/src/main/java/org/minimalj/frontend/impl/vaadin/MjWidgetSet.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/web/intro.html: -------------------------------------------------------------------------------- 1 |

2 |
3 | Minimal Clinic 4 | A Minimal-J Demonstration 5 |
6 | 7 |

Welcome

8 | 9 |

This is a Minimal-J application inspired by the Pet Clinic by Spring Framework.

10 | Cat named Tiger 11 | 12 |
13 |
14 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/form/element/UnknownFormElement.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.form.element; 2 | 3 | import org.minimalj.model.properties.Property; 4 | 5 | /** 6 | * If no FormElement class is found for a property then a TypeUnknownField 7 | * is created to show the developer what is missing. 8 | * 9 | */ 10 | public class UnknownFormElement extends TextFormElement { 11 | 12 | public UnknownFormElement(Property property) { 13 | super(property); 14 | } 15 | 16 | @Override 17 | public void setValue(Object object) { 18 | super.setValue(getProperty().getName() + ": no form element"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /example/012_MiniBoost/src/org/minimalj/example/miniboost/model/EmployeeLookup.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.miniboost.model; 2 | 3 | import java.time.LocalDate; 4 | 5 | import org.minimalj.model.Keys; 6 | import org.minimalj.model.View; 7 | 8 | public class EmployeeLookup implements View { 9 | 10 | public static final EmployeeLookup $ = Keys.of(EmployeeLookup.class); 11 | 12 | public Object id; 13 | 14 | public String matchcode; 15 | 16 | public LocalDate startDate; 17 | public LocalDate endDate; 18 | 19 | public String firstname, lastname; 20 | 21 | public final Address address = new Address(); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /example/016_Weather/src/main/java/org/minimalj/example/weather/model/WeatherList.java: -------------------------------------------------------------------------------- 1 | 2 | package org.minimalj.example.weather.model; 3 | 4 | import java.time.LocalDateTime; 5 | import java.util.ArrayList; 6 | 7 | import javax.annotation.Generated; 8 | 9 | @Generated("org.jsonschema2pojo") 10 | public class WeatherList { 11 | 12 | public Integer dt; 13 | public Main main; 14 | public java.util.List weather = new ArrayList(); 15 | public Clouds clouds; 16 | public Wind wind; 17 | public Rain rain; 18 | public Sys_ sys; 19 | public LocalDateTime dtTxt; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/editor/WizardStep.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.editor; 2 | 3 | import org.minimalj.frontend.form.Form; 4 | 5 | /** 6 | * Named Step so not to be confused with the concept of the pages. 7 | * 8 | */ 9 | public interface WizardStep { 10 | 11 | public String getTitle(); 12 | 13 | public T createObject(); 14 | 15 | public Form createForm(); 16 | 17 | /** 18 | * 19 | * @return true if getNextStep will not return null 20 | */ 21 | public boolean hasNext(); 22 | 23 | public WizardStep getNextStep(); 24 | 25 | public WizardStep getPreviousStep(); 26 | } -------------------------------------------------------------------------------- /src/main/java/org/minimalj/repository/sql/TableCreator.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.minimalj.application.Application; 4 | import org.minimalj.application.Configuration; 5 | import org.minimalj.model.test.ModelTest; 6 | 7 | public class TableCreator { 8 | 9 | public static void main(String[] args) throws Exception { 10 | Application.initApplication(args); 11 | Application application = Application.getInstance(); 12 | 13 | ModelTest.exitIfProblems(); 14 | 15 | Configuration.set("schemaPreparation", SchemaPreparation.create.name()); 16 | application.createRepository(); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/security/permissiontest/TestTransaction.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.security.permissiontest; 2 | 3 | import org.minimalj.backend.repository.EntityTransaction; 4 | import org.minimalj.security.permissiontest.pkgrole.TestEntityH; 5 | 6 | public class TestTransaction extends EntityTransaction { 7 | private static final long serialVersionUID = 1L; 8 | 9 | public TestTransaction() { 10 | } 11 | 12 | @Override 13 | public RETURN execute() { 14 | return null; 15 | } 16 | 17 | @Override 18 | public Class getEntityClazz() { 19 | return TestEntityH.class; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ext/historized/src/test/java/org/minimalj/repository/sql/relationhist/TestElementHistorized.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql.relationhist; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.model.annotation.Size; 6 | 7 | 8 | public class TestElementHistorized { 9 | 10 | public TestElementHistorized() { 11 | // needed for reflection constructor 12 | } 13 | 14 | public TestElementHistorized(String name) { 15 | this.name = name; 16 | } 17 | 18 | public Object id; 19 | public int version; 20 | public boolean historized; 21 | 22 | public List list; 23 | 24 | @Size(30) 25 | public String name; 26 | } 27 | -------------------------------------------------------------------------------- /ext/servlet/example/001_HelloWorld/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /example/heroku/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | demoserver 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /ext/servlet/example/002_WebApplication/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /ext/servlet/example/003_XmlConfiguration/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /example/015_BookPub/src/main/java/org/minimalj/example/bookpub/CountBooksPage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.bookpub; 2 | 3 | import org.minimalj.backend.Backend; 4 | import org.minimalj.example.bookpub.entity.Book; 5 | import org.minimalj.frontend.Frontend; 6 | import org.minimalj.frontend.Frontend.IContent; 7 | import org.minimalj.frontend.page.Page; 8 | import org.minimalj.repository.query.By; 9 | 10 | public class CountBooksPage implements Page { 11 | 12 | @Override 13 | public IContent getContent() { 14 | return Frontend.getInstance().createHtmlContent("Books: " + Backend.find(Book.class, By.all()).size()+""); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /example/Minimal-J_Currencies/src/org/minimalj/example/currencies/frontend/ImportIsoCurrencyInformationAction.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.currencies.frontend; 2 | 3 | import org.minimalj.backend.Backend; 4 | import org.minimalj.example.currencies.transaction.ImportIsoCurrencyInformation; 5 | import org.minimalj.frontend.Frontend; 6 | import org.minimalj.frontend.action.Action; 7 | 8 | public class ImportIsoCurrencyInformationAction extends Action { 9 | 10 | @Override 11 | public void run() { 12 | int inserts = Backend.execute(new ImportIsoCurrencyInformation()); 13 | Frontend.showMessage(inserts + " currencies imported"); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ext/ubersetzung/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ubersetzung 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /ext/uitest/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | minimalj-uitest 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /ext/vaadin/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | MinimalJ Vaadin 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/transaction/InputStreamTransaction.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.transaction; 2 | 3 | import java.io.InputStream; 4 | import java.io.Serializable; 5 | 6 | public abstract class InputStreamTransaction implements Transaction { 7 | private static final long serialVersionUID = 1L; 8 | 9 | private transient InputStream stream; 10 | 11 | public InputStreamTransaction(InputStream inputStream) { 12 | this.stream = inputStream; 13 | } 14 | 15 | public void setStream(InputStream stream) { 16 | this.stream = stream; 17 | } 18 | 19 | public InputStream getStream() { 20 | return stream; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/resources/ApplicationResourceBundleTest.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.resources; 2 | 3 | import java.util.Locale; 4 | import java.util.ResourceBundle; 5 | 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | 9 | public class ApplicationResourceBundleTest { 10 | 11 | @Test 12 | public void propertiesOfParent() { 13 | ResourceTestApplication2 application2 = new ResourceTestApplication2(); 14 | ResourceBundle bundle = application2.getResourceBundle(Locale.getDefault()); 15 | Assert.assertEquals("in2", bundle.getString("Property1and2")); 16 | Assert.assertEquals("Only1", bundle.getString("PropertyOnly1")); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ext/ubersetzung/bin/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ubersetzung 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/form/element/CodeFormElement.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.form.element; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.model.Code; 6 | import org.minimalj.model.properties.Property; 7 | import org.minimalj.util.Codes; 8 | 9 | @SuppressWarnings("unchecked") 10 | public class CodeFormElement extends ComboBoxFormElement { 11 | 12 | public CodeFormElement(Property property) { 13 | super(property, Codes.get((Class) property.getClazz())); 14 | } 15 | 16 | public CodeFormElement(T key, String nullText) { 17 | super(key, (List) Codes.get(key.getClass()), nullText); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /example/004_Library/src/main/java/org/minimalj/example/library/frontend/page/BookPage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.library.frontend.page; 2 | 3 | import org.minimalj.example.library.frontend.form.BookForm; 4 | import org.minimalj.example.library.model.Book; 5 | import org.minimalj.frontend.form.Form; 6 | import org.minimalj.frontend.page.ObjectPage; 7 | 8 | public class BookPage extends ObjectPage { 9 | 10 | public BookPage(Book book) { 11 | super(book); 12 | } 13 | 14 | public BookPage(Object id) { 15 | super(Book.class, id); 16 | } 17 | 18 | @Override 19 | protected Form createForm() { 20 | return new BookForm(false); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ext/ubersetzung/src/main/java/org/minimalj/ubersetzung/frontend/UbersetzungPage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.ubersetzung.frontend; 2 | 3 | import org.minimalj.frontend.form.Form; 4 | import org.minimalj.frontend.page.ObjectPage; 5 | import org.minimalj.ubersetzung.model.Ubersetzung; 6 | 7 | public class UbersetzungPage extends ObjectPage { 8 | 9 | public UbersetzungPage(Ubersetzung object) { 10 | super(object); 11 | } 12 | 13 | @Override 14 | protected Form createForm() { 15 | Form form = new Form<>(); 16 | form.line(Ubersetzung.$.lang); 17 | form.line(Ubersetzung.$.country); 18 | return form; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/transaction/OutputStreamTransaction.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.transaction; 2 | 3 | import java.io.OutputStream; 4 | import java.io.Serializable; 5 | 6 | public abstract class OutputStreamTransaction implements Transaction { 7 | private static final long serialVersionUID = 1L; 8 | 9 | private transient OutputStream stream; 10 | 11 | public OutputStreamTransaction(OutputStream outputStream) { 12 | this.stream = outputStream; 13 | } 14 | 15 | public void setStream(OutputStream stream) { 16 | this.stream = stream; 17 | } 18 | 19 | public OutputStream getStream() { 20 | return stream; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/backend/repository/UpdateTransaction.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.backend.repository; 2 | 3 | import org.minimalj.util.IdUtils; 4 | 5 | public class UpdateTransaction extends WriteTransaction { 6 | private static final long serialVersionUID = 1L; 7 | 8 | public UpdateTransaction(ENTITY object) { 9 | super(object); 10 | } 11 | 12 | @Override 13 | public Void execute() { 14 | update(getUnwrapped()); 15 | return null; 16 | } 17 | 18 | @Override 19 | public String toString() { 20 | Object id = IdUtils.getId(getUnwrapped()); 21 | return "Update " + getUnwrapped().getClass().getSimpleName() + " " + id; 22 | } 23 | } -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/G.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.minimalj.model.Keys; 7 | import org.minimalj.model.annotation.Searched; 8 | import org.minimalj.model.annotation.Size; 9 | 10 | public class G { 11 | public static final G $ = Keys.of(G.class); 12 | 13 | public G() { 14 | // needed for reflection constructor 15 | } 16 | 17 | public G(String g) { 18 | this.g = g; 19 | } 20 | 21 | public Object id; 22 | 23 | @Size(20) @Searched 24 | public String g; 25 | 26 | public K k; 27 | 28 | public final List kList = new ArrayList<>(); 29 | } 30 | -------------------------------------------------------------------------------- /example/002_HelloWorld/src/org/minimalj/example/helloworld2/GreetingPage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.helloworld2; 2 | 3 | import org.minimalj.frontend.Frontend; 4 | import org.minimalj.frontend.Frontend.IContent; 5 | import org.minimalj.frontend.page.Page; 6 | 7 | public class GreetingPage implements Page { 8 | 9 | private final User user; 10 | 11 | public GreetingPage(User user) { 12 | this.user = user; 13 | } 14 | 15 | @Override 16 | public String getTitle() { 17 | return "Hello " + user.name; 18 | } 19 | 20 | @Override 21 | public IContent getContent() { 22 | return Frontend.getInstance().createHtmlContent("Hello " + user.name); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /example/004_Library/src/main/java/org/minimalj/example/library/MjExampleApplication.properties: -------------------------------------------------------------------------------- 1 | Application.name = Minimal-J Example 2 | 3 | # Business 4 | 5 | Book=Book 6 | Book.title=Title 7 | Book.author=Author 8 | Book.date=Publishing Date 9 | Book.media=Media 10 | Book.pages=Pages 11 | Book.available=Available 12 | Book.available.checkBoxText=Available 13 | Book.price=Price 14 | 15 | Customer = Customer 16 | Customer.firstName = Prename 17 | Customer.name = Name 18 | Customer.dateOfBirth = Date of birth 19 | Customer.remarks = Remarks 20 | 21 | Lend = Lend 22 | Lend.till = Lend till 23 | 24 | Media = Media 25 | 26 | # Client - Properties 27 | 28 | LendTablePage=Lends 29 | -------------------------------------------------------------------------------- /example/Minimal-J_Currencies/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Minimal-J_Currencies 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/backend/repository/ReadEntityTransaction.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.backend.repository; 2 | 3 | public class ReadEntityTransaction extends ReadTransaction { 4 | private static final long serialVersionUID = 1L; 5 | 6 | protected final Object id; 7 | 8 | public ReadEntityTransaction(Class clazz, Object id) { 9 | super(clazz); 10 | this.id = id; 11 | } 12 | 13 | @Override 14 | public ENTITY execute() { 15 | ENTITY result = read(getEntityClazz(), id); 16 | return result; 17 | } 18 | 19 | @Override 20 | public String toString() { 21 | return "Read " + getEntityClazz().getSimpleName() + " " + id; 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/resources/org/minimalj/frontend/impl/swing/back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/007_PetClinic/src/org/minimalj/example/petclinic/model/Visit.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.petclinic.model; 2 | 3 | import java.time.LocalDate; 4 | 5 | import org.minimalj.model.Keys; 6 | import org.minimalj.model.Rendering; 7 | import org.minimalj.model.annotation.Size; 8 | import org.minimalj.util.DateUtils; 9 | 10 | public class Visit implements Rendering { 11 | public static final Visit $ = Keys.of(Visit.class); 12 | 13 | public LocalDate visitDate; 14 | 15 | @Size(255) 16 | public String description; 17 | 18 | @Override 19 | public String render() { 20 | return DateUtils.format(visitDate) + ": " + description; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/impl/json/JsonLoginContent.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.json; 2 | 3 | import java.util.Arrays; 4 | 5 | import org.minimalj.frontend.Frontend.IContent; 6 | import org.minimalj.frontend.action.Action; 7 | 8 | public class JsonLoginContent extends JsonComponent implements IContent { 9 | 10 | public JsonLoginContent(IContent content, Action loginAction, Action... actions) { 11 | super("Login"); 12 | put("content", content); 13 | 14 | put("actions", JsonPageManager.createActions(actions)); 15 | 16 | int loginActionIndex = Arrays.asList(actions).indexOf(loginAction); 17 | put("loginActionIndex", loginActionIndex); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/test/resources/org/minimalj/util/resources/ResourcesTest.properties: -------------------------------------------------------------------------------- 1 | org.minimalj.util.resources.ResourcesTest.fullQualified=Test1 2 | ResourcesTest.fullQualified=Test1_wrong_text 3 | fullQualified=Test1_wrong_text 4 | 5 | ResourcesTest.normal=Test2 6 | ResourcesTest.normalReplaced=${ResourcesTest.normal} 7 | ResourcesTest.normalReplacedInMiddle=A ${ResourcesTest.normal} B 8 | 9 | ResourcesTest3=Test3 10 | 11 | org.minimalj.util.resources.ResourcesTest$ResourcesTest4=Test4 12 | ResourcesTest4=Test4_wrong_text 13 | 14 | chained.field=Chained 15 | 16 | chained.field2.field=Chained2 17 | ResourcesTest6.field=Test_wrong_text 18 | 19 | ResourcesTest7.field=Chained3 20 | 21 | byFieldName=Test5 22 | -------------------------------------------------------------------------------- /ext/javafx/src/main/java/org/minimalj/frontend/impl/javafx/toolkit/FxComboBox.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.javafx.toolkit; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.frontend.Frontend.Input; 6 | import org.minimalj.frontend.Frontend.InputComponentListener; 7 | 8 | import javafx.beans.value.ChangeListener; 9 | 10 | public class FxComboBox extends javafx.scene.control.ComboBox implements Input { 11 | 12 | public FxComboBox(List objects, InputComponentListener changeListener) { 13 | getItems().addAll(objects); 14 | valueProperty().addListener((ChangeListener) (observable, oldValue, newValue) -> changeListener.changed(FxComboBox.this)); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/view/TestEntity.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql.view; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.annotation.Searched; 5 | import org.minimalj.model.annotation.Size; 6 | 7 | public class TestEntity { 8 | 9 | public static final TestEntity $ = Keys.of(TestEntity.class); 10 | 11 | public TestEntity() { 12 | // needed for reflection constructor 13 | } 14 | 15 | public TestEntity(String name) { 16 | this.name = name; 17 | } 18 | 19 | public Object id; 20 | 21 | @Size(30) 22 | public String name; 23 | 24 | @Searched @Size(61) 25 | public String getDoubleName() { 26 | return name + "/" + name; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /example/007_PetClinic/src/org/minimalj/example/petclinic/model/PetType.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.petclinic.model; 2 | 3 | import org.minimalj.model.Code; 4 | import org.minimalj.model.Rendering; 5 | import org.minimalj.model.annotation.NotEmpty; 6 | import org.minimalj.model.annotation.Size; 7 | import org.minimalj.util.LocaleContext; 8 | 9 | public class PetType implements Code, Rendering { 10 | 11 | public Object id; 12 | 13 | @NotEmpty @Size(80) 14 | public String name, nameDe; 15 | 16 | @Override 17 | public String render() { 18 | if (LocaleContext.getCurrent().getLanguage().startsWith("de")) { 19 | return nameDe; 20 | } else { 21 | return name; 22 | } 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /ext/servlet/example/001_HelloWorld/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 4 | org.eclipse.jdt.core.compiler.compliance=11 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 8 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 9 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 10 | org.eclipse.jdt.core.compiler.release=enabled 11 | org.eclipse.jdt.core.compiler.source=11 12 | -------------------------------------------------------------------------------- /ext/servlet/example/002_WebApplication/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 4 | org.eclipse.jdt.core.compiler.compliance=11 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 8 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 9 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 10 | org.eclipse.jdt.core.compiler.release=enabled 11 | org.eclipse.jdt.core.compiler.source=11 12 | -------------------------------------------------------------------------------- /ext/vaadin8/src/main/java/org/minimalj/frontend/impl/vaadin/toolkit/VaadinVerticalLayout.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.vaadin.toolkit; 2 | 3 | import org.minimalj.frontend.Frontend.IComponent; 4 | 5 | import com.vaadin.ui.Component; 6 | import com.vaadin.ui.GridLayout; 7 | 8 | public class VaadinVerticalLayout extends GridLayout implements IComponent { 9 | private static final long serialVersionUID = 1L; 10 | 11 | public VaadinVerticalLayout(IComponent[] components) { 12 | super(1, components.length); 13 | 14 | for (IComponent c : components) { 15 | Component component = (Component) c; 16 | component.setWidth("100%"); 17 | addComponent(component); 18 | } 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /example/019_MiniMail/src/main/java/org/minimalj/example/minimail/frontend/MailTable.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.minimail.frontend; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.backend.Backend; 6 | import org.minimalj.example.minimail.model.Mail; 7 | import org.minimalj.frontend.page.TablePage; 8 | import org.minimalj.repository.query.By; 9 | 10 | public class MailTable extends TablePage { 11 | 12 | @Override 13 | protected Object[] getColumns() { 14 | return new Object[] { Mail.$.from.address, Mail.$.to.address, Mail.$.date, Mail.$.subject }; 15 | } 16 | 17 | @Override 18 | protected List load() { 19 | return Backend.find(Mail.class, By.all()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /ext/servlet/example/003_XmlConfiguration/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 4 | org.eclipse.jdt.core.compiler.compliance=11 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 8 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 9 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 10 | org.eclipse.jdt.core.compiler.release=enabled 11 | org.eclipse.jdt.core.compiler.source=11 12 | -------------------------------------------------------------------------------- /ext/vaadin8/src/main/java/org/minimalj/frontend/impl/vaadin/toolkit/VaadinHorizontalLayout.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.vaadin.toolkit; 2 | 3 | import org.minimalj.frontend.Frontend.IComponent; 4 | 5 | import com.vaadin.ui.Component; 6 | import com.vaadin.ui.GridLayout; 7 | 8 | public class VaadinHorizontalLayout extends GridLayout implements IComponent { 9 | private static final long serialVersionUID = 1L; 10 | 11 | public VaadinHorizontalLayout(IComponent[] components) { 12 | super(components.length, 1); 13 | 14 | for (IComponent c : components) { 15 | Component component = (Component) c; 16 | component.setWidth("100%"); 17 | addComponent(component); 18 | } 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /example/007_PetClinic/src/org/minimalj/example/petclinic/frontend/OwnerForm.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.petclinic.frontend; 2 | 3 | import org.minimalj.example.petclinic.model.Owner; 4 | import org.minimalj.frontend.form.Form; 5 | 6 | public class OwnerForm extends Form { 7 | 8 | public static final boolean SHOW_PETS = true; 9 | 10 | public OwnerForm(boolean editable, boolean showPets) { 11 | super(editable); 12 | 13 | line(Owner.$.person.firstName); 14 | line(Owner.$.person.lastName); 15 | line(Owner.$.address); 16 | line(Owner.$.city); 17 | line(Owner.$.telephone); 18 | 19 | if (showPets) { 20 | line(new PetListFormElement(Owner.$.getPets())); 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/model/PetType.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.minimalclinic.model; 2 | 3 | import org.minimalj.model.Code; 4 | import org.minimalj.model.Rendering; 5 | import org.minimalj.model.annotation.NotEmpty; 6 | import org.minimalj.model.annotation.Size; 7 | import org.minimalj.util.LocaleContext; 8 | 9 | public class PetType implements Code, Rendering { 10 | 11 | public Object id; 12 | 13 | @NotEmpty @Size(80) 14 | public String name, nameDe; 15 | 16 | @Override 17 | public String render() { 18 | if (LocaleContext.getCurrent().getLanguage().startsWith("de")) { 19 | return nameDe; 20 | } else { 21 | return name; 22 | } 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/page/DetailPageAction.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.page; 2 | 3 | import org.minimalj.frontend.Frontend; 4 | import org.minimalj.frontend.action.Action; 5 | 6 | public final class DetailPageAction extends Action { 7 | 8 | private final Page mainPage, detail; 9 | 10 | public DetailPageAction(Page mainPage, Page detail) { 11 | this(mainPage, detail, null); 12 | } 13 | 14 | public DetailPageAction(Page mainPage, Page detail, String name) { 15 | super(name != null ? name : detail.getTitle()); 16 | this.mainPage = mainPage; 17 | this.detail = detail; 18 | } 19 | 20 | @Override 21 | public void run() { 22 | Frontend.showDetail(mainPage, detail); 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /src/main/java/org/minimalj/model/annotation/NotEmpty.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * If a field is marked as NotEmpty it must not be null. 10 | * If it's a String field it also must not be empty. 11 | * If it's a Integer or Long field it must not be 0.

12 | * 13 | * In DB the column will be marked as NOT NULL. 14 | * 15 | */ 16 | @Retention(RetentionPolicy.RUNTIME) 17 | @Target(ElementType.FIELD) 18 | public @interface NotEmpty { 19 | 20 | boolean zeroAllowed() default false; 21 | 22 | } -------------------------------------------------------------------------------- /example/015_BookPub/src/main/java/org/minimalj/example/bookpub/BookpubApplication.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.bookpub; 2 | 3 | import org.minimalj.application.Application; 4 | import org.minimalj.example.bookpub.entity.Book; 5 | import org.minimalj.frontend.impl.swing.Swing; 6 | import org.minimalj.frontend.page.Page; 7 | 8 | public class BookpubApplication extends Application { 9 | 10 | @Override 11 | public Class[] getEntityClasses() { 12 | return new Class[]{Book.class}; 13 | } 14 | 15 | @Override 16 | public Page createDefaultPage() { 17 | return new CountBooksPage(); 18 | } 19 | 20 | public static void main(String[] args) { 21 | Swing.start(new BookpubApplication()); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /ext/historized/src/test/java/org/minimalj/repository/sql/relationhist/TestEntity.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql.relationhist; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.model.Keys; 6 | import org.minimalj.model.annotation.Size; 7 | 8 | public class TestEntity { 9 | 10 | public static final TestEntity $ = Keys.of(TestEntity.class); 11 | 12 | public TestEntity() { 13 | // needed for reflection constructor 14 | } 15 | 16 | public TestEntity(String name) { 17 | this.name = name; 18 | } 19 | 20 | public Object id; 21 | public int version; 22 | public boolean historized; 23 | 24 | @Size(30) 25 | public String name; 26 | 27 | public List list; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/model/annotation/Width.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target({ ElementType.FIELD, ElementType.TYPE, ElementType.METHOD }) 10 | public @interface Width { 11 | 12 | int value(); 13 | 14 | int maxWidth() default -1; 15 | 16 | public static final int DEFAULT = 100; 17 | 18 | public static final int SMALLEST = 50; 19 | public static final int SMALLER = 70; 20 | public static final int LARGER = 150; 21 | public static final int LARGEST = 250; 22 | 23 | } -------------------------------------------------------------------------------- /src/main/resources/org/minimalj/frontend/impl/swing/forward.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/security/permissiontest/TestTransactionU.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.security.permissiontest; 2 | 3 | import org.minimalj.backend.repository.EntityTransaction; 4 | import org.minimalj.security.permissiontest.pkgrole.TestEntityH; 5 | import org.minimalj.transaction.Role; 6 | 7 | @Role("transactionRole") 8 | public class TestTransactionU extends EntityTransaction { 9 | private static final long serialVersionUID = 1L; 10 | 11 | public TestTransactionU() { 12 | } 13 | 14 | @Override 15 | public RETURN execute() { 16 | return null; 17 | } 18 | 19 | @Override 20 | public Class getEntityClazz() { 21 | return TestEntityH.class; 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /example/019_MiniMail/src/main/java/org/minimalj/example/minimail/model/Mail.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.minimail.model; 2 | 3 | import java.time.LocalDate; 4 | 5 | import org.minimalj.model.Keys; 6 | import org.minimalj.model.annotation.NotEmpty; 7 | import org.minimalj.model.annotation.Size; 8 | 9 | public class Mail { 10 | public static final Mail $ = Keys.of(Mail.class); 11 | 12 | public Object id; 13 | 14 | public final EMailAddress from = new EMailAddress(); 15 | public final EMailAddress to = new EMailAddress(); 16 | 17 | @Size(2000) 18 | @NotEmpty 19 | public String subject; 20 | 21 | public LocalDate date; 22 | 23 | @Size(20000) 24 | @NotEmpty 25 | public String text; 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/repository/query/FieldOperator.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.query; 2 | 3 | public enum FieldOperator { 4 | less("<"), greaterOrEqual(">="), lessOrEqual("<="), greater(">"), equal("="), notEqual("<>"); 5 | 6 | private final String operatorAsString; 7 | 8 | private FieldOperator(String operatorAsString) { 9 | this.operatorAsString = operatorAsString; 10 | } 11 | 12 | public String getOperatorAsString() { 13 | return operatorAsString; 14 | } 15 | 16 | public boolean includesEqual() { 17 | return this == equal || this == lessOrEqual || this == greaterOrEqual; 18 | } 19 | 20 | public FieldOperator negate() { 21 | return FieldOperator.values()[this.ordinal() ^ 1]; 22 | } 23 | } -------------------------------------------------------------------------------- /ext/uitest/src/main/java/org/minimalj/test/headless/HeadlessActionTestFacade.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.test.headless; 2 | 3 | import org.minimalj.frontend.action.Action; 4 | import org.minimalj.test.PageContainerTestFacade.ActionTestFacade; 5 | 6 | public class HeadlessActionTestFacade implements ActionTestFacade { 7 | private final Action action; 8 | 9 | public HeadlessActionTestFacade(Action action) { 10 | this.action = action; 11 | } 12 | 13 | @Override 14 | public void run() { 15 | action.run(); 16 | } 17 | 18 | @Override 19 | public boolean isEnabled() { 20 | return action.isEnabled(); 21 | } 22 | 23 | @Override 24 | public String getDescription() { 25 | return action.getDescription(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/backend/repository/CountTransaction.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.backend.repository; 2 | 3 | import org.minimalj.repository.query.Criteria; 4 | 5 | public class CountTransaction extends ReadTransaction { 6 | private static final long serialVersionUID = 1L; 7 | 8 | private final Criteria criteria; 9 | 10 | public CountTransaction(Class clazz, Criteria criteria) { 11 | super(clazz); 12 | this.criteria = criteria; 13 | } 14 | 15 | @Override 16 | public Long execute() { 17 | return count(getEntityClazz(), criteria); 18 | } 19 | 20 | @Override 21 | public String toString() { 22 | return "Count " + getEntityClazz().getSimpleName() + " by " + criteria; 23 | } 24 | } -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/impl/swing/toolkit/SwingHorizontalLayout.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.swing.toolkit; 2 | 3 | import java.awt.Component; 4 | import java.awt.GridLayout; 5 | 6 | import javax.swing.JPanel; 7 | 8 | import org.minimalj.frontend.Frontend.IComponent; 9 | 10 | 11 | public class SwingHorizontalLayout extends JPanel implements IComponent { 12 | private static final long serialVersionUID = 1L; 13 | 14 | public SwingHorizontalLayout(IComponent... components) { 15 | super(new GridLayout(1, components.length, 10, 10)); 16 | for (IComponent c : components) { 17 | Component component = (Component) c; 18 | add(component); 19 | } 20 | setInheritsPopupMenu(true); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/relation/TestEntity.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql.relation; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.model.Keys; 6 | import org.minimalj.model.annotation.Size; 7 | 8 | public class TestEntity { 9 | 10 | public static final TestEntity $ = Keys.of(TestEntity.class); 11 | 12 | public TestEntity() { 13 | // needed for reflection constructor 14 | } 15 | 16 | public TestEntity(String name) { 17 | this.name = name; 18 | } 19 | 20 | public Object id; 21 | 22 | @Size(50) 23 | public String name; 24 | 25 | public List list; 26 | 27 | public List codes; 28 | 29 | public List codeViews; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /example/013_NewsFeed/src/org/minimalj/example/newsfeed/model/Item.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.newsfeed.model; 2 | 3 | import java.time.LocalDateTime; 4 | 5 | import org.minimalj.model.Keys; 6 | import org.minimalj.model.annotation.NotEmpty; 7 | import org.minimalj.model.annotation.Size; 8 | 9 | public class Item { 10 | 11 | public static final Item $ = Keys.of(Item.class); 12 | 13 | @NotEmpty 14 | public Channel channel; 15 | 16 | @Size(512) 17 | public String title, link, guid; 18 | 19 | @Size(512) 20 | public String thumbnail; 21 | 22 | @Size(2048) 23 | public String description; 24 | 25 | @Size(256) 26 | public String category; 27 | 28 | @Size(Size.TIME_HH_MM) 29 | public LocalDateTime pubDate; 30 | } 31 | -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/frontend/PetTablePage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.minimalclinic.frontend; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.backend.Backend; 6 | import org.minimalj.example.minimalclinic.model.Pet; 7 | import org.minimalj.frontend.page.TablePage; 8 | import org.minimalj.repository.query.By; 9 | 10 | public class PetTablePage extends TablePage { 11 | 12 | @Override 13 | protected Object[] getColumns() { 14 | return new Object[] { Pet.$.name, Pet.$.type, Pet.$.owner.person.firstName, Pet.$.owner.person.lastName }; 15 | } 16 | 17 | @Override 18 | protected List load() { 19 | return Backend.find(Pet.class, By.all()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /ext/vaadin8/src/main/java/org/minimalj/frontend/impl/vaadin/toolkit/VaadinCheckBox.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.vaadin.toolkit; 2 | 3 | import org.minimalj.frontend.Frontend.Input; 4 | import org.minimalj.frontend.Frontend.InputComponentListener; 5 | 6 | import com.vaadin.ui.CheckBox; 7 | 8 | public class VaadinCheckBox extends CheckBox implements Input { 9 | private static final long serialVersionUID = 1L; 10 | 11 | public VaadinCheckBox(InputComponentListener listener, String text) { 12 | super(text); 13 | addValueChangeListener(event -> listener.changed(VaadinCheckBox.this)); 14 | } 15 | 16 | @Override 17 | public void setEditable(boolean editable) { 18 | setReadOnly(!editable); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/backend/BackendTest.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.backend; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | import org.minimalj.backend.repository.DeleteEntityTransaction; 6 | import org.minimalj.backend.repository.EntityTransaction; 7 | import org.minimalj.backend.repository.WriteTransaction; 8 | 9 | public class BackendTest { 10 | 11 | @Test 12 | public void testExpectedTransactionHierarchie() { 13 | Assert.assertTrue("Expected Hierarchie in method handleCodeCache", EntityTransaction.class.isAssignableFrom(WriteTransaction.class)); 14 | Assert.assertTrue("Expected Hierarchie in method handleCodeCache", EntityTransaction.class.isAssignableFrom(DeleteEntityTransaction.class)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/014_TimeSheet/timesheet/src/org/minimalj/example/timesheet/frontend/NewProjectEditor.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.timesheet.frontend; 2 | import org.minimalj.backend.Backend; 3 | import org.minimalj.example.timesheet.model.Project; 4 | import org.minimalj.frontend.editor.Editor.NewObjectEditor; 5 | import org.minimalj.frontend.form.Form; 6 | 7 | public class NewProjectEditor extends NewObjectEditor { 8 | 9 | @Override 10 | protected Form createForm() { 11 | Form form = new Form<>(); 12 | form.line(Project.$.name); 13 | form.line(Project.$.description); 14 | return form; 15 | } 16 | 17 | @Override 18 | protected Project save(Project project) { 19 | return Backend.save(project); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ext/uitest/README.adoc: -------------------------------------------------------------------------------- 1 | = Minimal-J uitest 2 | In diesem Projekt beinhaltet die Basisklassen, welche zum automatisierten GUI Testing via Selenium benötigt werden. 3 | 4 | === Konfiguration 5 | Über den VM Parameter UiTestDriver kann man steuern, welchen Browser Selenium bei der Ausführung der Tests benutzen soll. 6 | 7 | Mit der Einstellung -DUiTestDriver=firefox wird der Firefox Browser benutzt. Mit "chrome" der Chrome Browser. 8 | 9 | Bei VM Parameter UiTestHeadless=true werden die Tests ausgeführt ohne das ein Browser Fenster geöffnet wird. 10 | Bei nicht gesetztem UiTestDriver wird kein Browser verwendet. Dies führt zu einer 10x schnelleren Ausführung, muss 11 | jedoch nicht unbedingt das gleiche Verhalten zeigen. 12 | 13 | === Line endings 14 | -------------------------------------------------------------------------------- /ext/vaadin/src/main/java/org/minimalj/frontend/impl/vaadin/toolkit/VaadinHtmlContent.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.vaadin.toolkit; 2 | 3 | import java.net.URL; 4 | 5 | import org.minimalj.frontend.Frontend.IContent; 6 | 7 | import com.vaadin.flow.component.html.IFrame; 8 | 9 | public class VaadinHtmlContent extends IFrame implements IContent { 10 | private static final long serialVersionUID = 1L; 11 | 12 | private VaadinHtmlContent() { 13 | setSizeFull(); 14 | getElement().getStyle().set("border-width", "0"); 15 | } 16 | 17 | public VaadinHtmlContent(String html) { 18 | this(); 19 | setSrcdoc(html); 20 | } 21 | 22 | public VaadinHtmlContent(URL url) { 23 | this(); 24 | setSrc(url.toString()); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/security/model/RememberMeToken.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.security.model; 2 | 3 | import java.time.LocalDateTime; 4 | 5 | import org.minimalj.model.Keys; 6 | import org.minimalj.model.annotation.Size; 7 | 8 | /** 9 | * Used to remember the last token for "Remember Me" 10 | * 11 | */ 12 | public class RememberMeToken { 13 | public static final RememberMeToken $ = Keys.of(RememberMeToken.class); 14 | public static final int TOKEN_SIZE = 24; 15 | 16 | public Object id; 17 | 18 | @Size(255) 19 | public String userName; 20 | 21 | @Size(TOKEN_SIZE) 22 | public String token; 23 | 24 | @Size(TOKEN_SIZE) 25 | public String series; 26 | 27 | @Size(Size.TIME_WITH_MILLIS) 28 | public LocalDateTime lastUsed; 29 | } 30 | -------------------------------------------------------------------------------- /ext/uitest/src/main/java/org/minimalj/test/UiTestFacade.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.test; 2 | 3 | import org.minimalj.application.Application; 4 | import org.minimalj.test.LoginFrameFacade.UserPasswordLoginTestFacade; 5 | 6 | public interface UiTestFacade { 7 | 8 | void start(Application application); 9 | 10 | UserPasswordLoginTestFacade getLoginTestFacade(); 11 | 12 | void logout(); 13 | 14 | PageContainerTestFacade getCurrentPageContainerTestFacade(); 15 | 16 | public default void login(String user, String password) { 17 | UserPasswordLoginTestFacade userPasswordLogin = getLoginTestFacade(); 18 | 19 | userPasswordLogin.setUser(user); 20 | userPasswordLogin.setPassword(password); 21 | userPasswordLogin.login(); 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/model/annotation/SelfReferenceAllowed.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model.annotation; 2 | 3 | import static java.lang.annotation.ElementType.TYPE; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * Normally only Codes are allowed to reference itself (without use of Views) 11 | * With this Annotation the ModelTest allows self references. 12 | *

13 | * 14 | * Be very careful with this annotation. Repositories may produce stake 15 | * overflows if entities have cycle references. 16 | *

17 | * 18 | */ 19 | @Retention(RUNTIME) 20 | @Target(TYPE) 21 | public @interface SelfReferenceAllowed { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/security/model/UserPassword.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.security.model; 2 | 3 | import java.io.Serializable; 4 | 5 | import org.minimalj.model.Keys; 6 | import org.minimalj.model.annotation.Autocomplete; 7 | import org.minimalj.model.annotation.NotEmpty; 8 | import org.minimalj.model.annotation.Size; 9 | 10 | public class UserPassword implements Serializable { 11 | private static final long serialVersionUID = 1L; 12 | 13 | public static final UserPassword $ = Keys.of(UserPassword.class); 14 | 15 | @Size(255) @NotEmpty @Autocomplete(Autocomplete.USERNAME) 16 | public String user; 17 | 18 | @Size(255) @Autocomplete(Autocomplete.CURRENT_PASSWORD) 19 | public char[] password; 20 | 21 | public transient Boolean rememberMe; 22 | } -------------------------------------------------------------------------------- /example/004_Library/src/main/java/org/minimalj/example/library/model/Customer.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.library.model; 2 | 3 | import java.time.LocalDate; 4 | 5 | import org.minimalj.model.Keys; 6 | import org.minimalj.model.Rendering; 7 | import org.minimalj.model.annotation.Searched; 8 | import org.minimalj.model.annotation.Size; 9 | 10 | public class Customer implements Rendering { 11 | public static final Customer $ = Keys.of(Customer.class); 12 | 13 | public Object id; 14 | 15 | @Size(ExampleFormats.NAME) @Searched 16 | public String firstName, name; 17 | public LocalDate dateOfBirth; 18 | 19 | @Size(2000) 20 | public String remarks; 21 | 22 | @Override 23 | public String render() { 24 | return firstName + " " + name; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /example/014_TimeSheet/timesheet/src/org/minimalj/example/timesheet/frontend/NewWorkEditor.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.timesheet.frontend; 2 | 3 | import org.minimalj.backend.Backend; 4 | import org.minimalj.example.timesheet.model.Work; 5 | import org.minimalj.frontend.editor.Editor.NewObjectEditor; 6 | import org.minimalj.frontend.form.Form; 7 | 8 | public class NewWorkEditor extends NewObjectEditor { 9 | 10 | @Override 11 | protected Form createForm() { 12 | Form form = new Form<>(); 13 | form.line(Work.$.date); 14 | form.line(new WorkForProjectsFormElement(Work.$.workForProjects)); 15 | return form; 16 | } 17 | 18 | @Override 19 | protected Work save(Work work) { 20 | return Backend.save(work); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /ext/lanterna/src/main/java/org/minimalj/frontend/impl/lanterna/toolkit/LanternaLayout.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.lanterna.toolkit; 2 | 3 | import org.minimalj.frontend.Frontend.IComponent; 4 | 5 | import com.googlecode.lanterna.gui2.Component; 6 | import com.googlecode.lanterna.gui2.Direction; 7 | import com.googlecode.lanterna.gui2.LinearLayout; 8 | import com.googlecode.lanterna.gui2.Panel; 9 | 10 | public class LanternaLayout extends Panel implements IComponent { 11 | 12 | public LanternaLayout(Direction direction, IComponent[] components) { 13 | setLayoutManager(new LinearLayout(direction)); 14 | for (IComponent component : components) { 15 | Component c = (Component) component; 16 | addComponent(c); 17 | } 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /ext/lanterna/src/main/java/org/minimalj/frontend/impl/lanterna/toolkit/LanternaText.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.lanterna.toolkit; 2 | 3 | import org.minimalj.frontend.Frontend.IComponent; 4 | import org.minimalj.model.Rendering; 5 | import org.minimalj.util.StringUtils; 6 | 7 | import com.googlecode.lanterna.gui2.Label; 8 | 9 | public class LanternaText extends Label implements IComponent { 10 | 11 | public LanternaText(String text) { 12 | super(StringUtils.stripHtml(text)); 13 | } 14 | 15 | public LanternaText(Rendering rendering) { 16 | super(Rendering.toString(rendering)); 17 | } 18 | 19 | @Override 20 | public void setText(String text) { 21 | super.setText(text != null ? StringUtils.stripHtml(text) : ""); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /example/Minimal-J_Currencies/src/org/minimalj/example/currencies/frontend/CurrencyTablePage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.currencies.frontend; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.backend.Backend; 6 | import org.minimalj.example.currencies.model.Currency; 7 | import org.minimalj.frontend.page.TablePage; 8 | import org.minimalj.repository.query.By; 9 | 10 | public class CurrencyTablePage extends TablePage { 11 | 12 | @Override 13 | public Object[] getColumns() { 14 | return new Object[] { Currency.$.number, Currency.$.id, Currency.$.name, Currency.$.fund, Currency.$.minorUnits }; 15 | } 16 | 17 | @Override 18 | protected List load() { 19 | return Backend.find(Currency.class, By.all()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /ext/lanterna/src/main/java/org/minimalj/frontend/impl/lanterna/toolkit/LanternaReadOnlyTextField.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.lanterna.toolkit; 2 | 3 | import org.minimalj.frontend.Frontend.Input; 4 | 5 | import com.googlecode.lanterna.gui2.Label; 6 | 7 | public class LanternaReadOnlyTextField extends Label implements Input { 8 | 9 | public LanternaReadOnlyTextField() { 10 | super(""); 11 | } 12 | 13 | @Override 14 | public void setEditable(boolean editable) { 15 | // ignored 16 | } 17 | 18 | @Override 19 | public void setValue(String text) { 20 | if (text == null) { 21 | text = ""; 22 | } 23 | super.setText(text); 24 | } 25 | 26 | @Override 27 | public String getValue() { 28 | return getText(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/SqlTest.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import org.junit.After; 4 | import org.junit.Before; 5 | import org.minimalj.model.Model; 6 | import org.minimalj.repository.DataSourceFactory; 7 | 8 | public abstract class SqlTest implements Model { 9 | 10 | protected SqlRepository repository; 11 | 12 | @Before 13 | public void createTables() { 14 | createRepositoryH2(); 15 | initData(); 16 | } 17 | 18 | protected void createRepositoryH2() { 19 | repository = new SqlRepository(DataSourceFactory.embeddedDataSource(), getEntityClasses()); 20 | } 21 | 22 | @After 23 | public void dropTables() { 24 | repository.dropTables(); 25 | } 26 | 27 | protected void initData() { 28 | // 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/security/model/UserRole.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.security.model; 2 | 3 | import java.util.Objects; 4 | 5 | import org.minimalj.model.annotation.Size; 6 | 7 | public class UserRole { 8 | 9 | public UserRole() { 10 | // 11 | } 12 | 13 | public UserRole(String roleName) { 14 | this.name = roleName; 15 | } 16 | 17 | @Size(255) 18 | public String name; 19 | 20 | @Override 21 | public int hashCode() { 22 | return Objects.hash(name); 23 | } 24 | 25 | @Override 26 | public boolean equals(Object object) { 27 | if (this == object) { 28 | return true; 29 | } 30 | if (object == null || getClass() != object.getClass()) { 31 | return false; 32 | } 33 | return Objects.equals(name, ((UserRole) object).name); 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /example/007_PetClinic/src/org/minimalj/example/petclinic/frontend/VetTablePage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.petclinic.frontend; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.backend.Backend; 6 | import org.minimalj.example.petclinic.model.Vet; 7 | import org.minimalj.frontend.page.TablePage; 8 | import org.minimalj.repository.query.By; 9 | 10 | public class VetTablePage extends TablePage { 11 | 12 | private static final Object[] COLUMNS = {Vet.$.person.getName(), Vet.$.specialties}; 13 | 14 | public VetTablePage() { 15 | // 16 | } 17 | 18 | @Override 19 | protected Object[] getColumns() { 20 | return COLUMNS; 21 | } 22 | 23 | @Override 24 | protected List load() { 25 | return Backend.find(Vet.class, By.all()); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/model/Visit.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.minimalclinic.model; 2 | 3 | import java.time.LocalDate; 4 | 5 | import org.minimalj.model.Keys; 6 | import org.minimalj.model.Rendering; 7 | import org.minimalj.model.annotation.Size; 8 | import org.minimalj.util.DateUtils; 9 | 10 | public class Visit implements Rendering { 11 | public static final Visit $ = Keys.of(Visit.class); 12 | 13 | public Object id; 14 | 15 | public Vet vet; 16 | 17 | public Pet pet; 18 | 19 | public LocalDate visitDate; 20 | 21 | @Size(255) 22 | public String description; 23 | 24 | @Override 25 | public String render() { 26 | return DateUtils.format(visitDate) + ": " + description; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /example/012_MiniBoost/src/org/minimalj/example/miniboost/model/Address.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.miniboost.model; 2 | 3 | import org.minimalj.model.Keys; 4 | import org.minimalj.model.annotation.Size; 5 | import org.minimalj.util.StringUtils; 6 | 7 | public class Address { 8 | 9 | @Size(50) 10 | public String street, city; 11 | 12 | @Size(20) 13 | public String zip; 14 | 15 | public Country country; 16 | 17 | public String getCountryAndZip() { 18 | if (Keys.isKeyObject(this)) return Keys.methodOf(this, "countryAndZip"); 19 | 20 | if (country.id != null) { 21 | if (!StringUtils.isBlank(zip)) { 22 | return country.code2 + " " + zip; 23 | } else { 24 | return country.code2; 25 | } 26 | } else { 27 | return zip; 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /example/016_Weather/src/test/java/JsonReaderTest.java: -------------------------------------------------------------------------------- 1 | import java.nio.charset.Charset; 2 | import java.nio.file.Files; 3 | import java.nio.file.Paths; 4 | import java.util.stream.Collectors; 5 | 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | import org.minimalj.example.weather.model.Weather; 9 | import org.minimalj.rest.EntityJsonReader; 10 | 11 | public class JsonReaderTest { 12 | 13 | @Test 14 | public void testReader() throws Exception { 15 | String out = Files.readAllLines( 16 | Paths.get(this.getClass().getResource("zurich.json").toURI()), Charset.defaultCharset()).stream().collect(Collectors.joining()); 17 | 18 | Weather weather = EntityJsonReader.read(Weather.class, out); 19 | 20 | Assert.assertEquals("Zurich", weather.city.name); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/repository/sql/A.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.minimalj.model.Keys; 7 | import org.minimalj.model.annotation.Size; 8 | 9 | public class A { 10 | 11 | public static final A $ = Keys.of(A.class); 12 | 13 | public A() { 14 | // needed for reflection constructor 15 | } 16 | 17 | public A(String aName) { 18 | this.aName = aName; 19 | } 20 | 21 | public Object id; 22 | public int version; 23 | 24 | @Size(30) 25 | public String aName; 26 | public final List b = new ArrayList<>(); 27 | public final List c = new ArrayList<>(); 28 | public E e; 29 | 30 | @Size(5) 31 | public Integer int1; 32 | 33 | @Size(15) 34 | public Long long1; 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/org/minimalj/model/EnumHackTest.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | public class EnumHackTest { 7 | 8 | @Test 9 | public void testGenerateEnum() { 10 | Assert.assertEquals(2, EnumHackTestEnum.values().length); 11 | EnumHackTestEnum generatedEnum = EnumUtils.createEnum(EnumHackTestEnum.class, "c"); 12 | EnumUtils.createEnum(EnumHackTestEnum.class, "d"); 13 | EnumHackTestEnum generatedEnum_with_same_name = EnumUtils.createEnum(EnumHackTestEnum.class, "c"); 14 | Assert.assertNotSame(generatedEnum, generatedEnum_with_same_name); 15 | } 16 | 17 | @Test 18 | public void testResources() { 19 | EnumHackTestEnum e = EnumHackTestEnum.a; 20 | Assert.assertEquals(EnumUtils.getText(e), "Test"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/frontend/AddVetEditor.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.minimalclinic.frontend; 2 | 3 | import org.minimalj.backend.Backend; 4 | import org.minimalj.example.minimalclinic.model.Vet; 5 | import org.minimalj.frontend.Frontend; 6 | import org.minimalj.frontend.editor.Editor.NewObjectEditor; 7 | import org.minimalj.frontend.form.Form; 8 | 9 | public class AddVetEditor extends NewObjectEditor { 10 | 11 | @Override 12 | protected Form createForm() { 13 | return new VetForm(Form.EDITABLE); 14 | } 15 | 16 | @Override 17 | protected Vet save(Vet owner) { 18 | return Backend.save(owner); 19 | } 20 | 21 | @Override 22 | protected void finished(Vet newVet) { 23 | Frontend.show(new VetTablePage()); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /ext/ignite/src/test/java/org/minimalj/repository/ignite/A.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.ignite; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.minimalj.model.Keys; 7 | import org.minimalj.model.annotation.Size; 8 | 9 | public class A { 10 | 11 | public static final A $ = Keys.of(A.class); 12 | 13 | public A() { 14 | // needed for reflection constructor 15 | } 16 | 17 | public A(String aName) { 18 | this.aName = aName; 19 | } 20 | 21 | public Object id; 22 | public int version; 23 | 24 | @Size(30) 25 | public String aName; 26 | public final List b = new ArrayList(); 27 | public final List c = new ArrayList(); 28 | public E e; 29 | 30 | @Size(5) 31 | public Integer int1; 32 | 33 | @Size(15) 34 | public Long long1; 35 | } 36 | -------------------------------------------------------------------------------- /ext/memory/src/test/java/org/minimalj/repository/memory/A.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.memory; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.minimalj.model.Keys; 7 | import org.minimalj.model.annotation.Size; 8 | 9 | public class A { 10 | 11 | public static final A $ = Keys.of(A.class); 12 | 13 | public A() { 14 | // needed for reflection constructor 15 | } 16 | 17 | public A(String aName) { 18 | this.aName = aName; 19 | } 20 | 21 | public Object id; 22 | public int version; 23 | 24 | @Size(30) 25 | public String aName; 26 | public final List b = new ArrayList(); 27 | public final List c = new ArrayList(); 28 | public E e; 29 | 30 | @Size(5) 31 | public Integer int1; 32 | 33 | @Size(15) 34 | public Long long1; 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/backend/repository/EntityTransaction.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.backend.repository; 2 | 3 | import org.minimalj.security.Authorization; 4 | import org.minimalj.security.Subject; 5 | import org.minimalj.transaction.Transaction; 6 | 7 | public abstract class EntityTransaction implements Transaction { 8 | private static final long serialVersionUID = 1L; 9 | 10 | public abstract Class getEntityClazz(); 11 | 12 | @Override 13 | public boolean hasAccess(Subject subject) { 14 | Boolean allowed = Authorization.hasAccessByAnnotation(subject, this.getClass()); 15 | if (allowed != null) { 16 | return allowed; 17 | } 18 | 19 | return !Boolean.FALSE.equals(Authorization.hasAccessByAnnotation(subject, getEntityClazz())); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /example/003_Notes/src/org/minimalj/example/notes/NotesApplication.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.notes; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.application.Application; 6 | import org.minimalj.frontend.action.Action; 7 | import org.minimalj.frontend.action.ActionGroup; 8 | import org.minimalj.frontend.page.Page; 9 | 10 | public class NotesApplication extends Application { 11 | 12 | @Override 13 | public List getNavigation() { 14 | ActionGroup menu = new ActionGroup(null); 15 | menu.add(new NewNoteEditor()); 16 | return menu.getItems(); 17 | } 18 | 19 | @Override 20 | public Page createDefaultPage() { 21 | return new NoteTablePage(); 22 | } 23 | 24 | @Override 25 | public Class[] getEntityClasses() { 26 | return new Class[]{Note.class}; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/repository/query/Order.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.query; 2 | 3 | public class Order extends Query { 4 | private static final long serialVersionUID = 1L; 5 | 6 | private final Query query; 7 | private final String path; 8 | private final boolean ascending; 9 | 10 | public Order(Query query, String path, boolean ascending) { 11 | this.query = query; 12 | this.path = path; 13 | this.ascending = ascending; 14 | } 15 | 16 | public Query getQuery() { 17 | return query; 18 | } 19 | 20 | public String getPath() { 21 | return path; 22 | } 23 | 24 | public boolean isAscending() { 25 | return ascending; 26 | } 27 | 28 | @Override 29 | public String toString() { 30 | return query + " ORDER BY " + path + (ascending ? "" : " DESCENDING"); 31 | } 32 | } -------------------------------------------------------------------------------- /example/012_MiniBoost/src/org/minimalj/example/miniboost/frontend/CustomerForm.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.miniboost.frontend; 2 | 3 | import static org.minimalj.example.miniboost.model.Customer.*; 4 | 5 | import org.minimalj.example.miniboost.model.Customer; 6 | import org.minimalj.frontend.form.Form; 7 | 8 | public class CustomerForm extends Form { 9 | 10 | public CustomerForm(boolean editable) { 11 | super(editable, 2); 12 | 13 | text("Name und Anschrift"); 14 | line($.matchcode, $.debtNo); 15 | line($.name1, $.name2); 16 | line($.name3); 17 | line($.address.country, $.address.zip); 18 | line($.address.city, $.address.street); 19 | 20 | text("Kontaktdaten"); 21 | line($.contact.phone1, $.contact.phone2); 22 | line($.contact.fax, $.contact.email); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /example/020_MinimalClinic/src/org/minimalj/example/minimalclinic/frontend/AddOwnerEditor.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.minimalclinic.frontend; 2 | 3 | import org.minimalj.backend.Backend; 4 | import org.minimalj.example.minimalclinic.model.Owner; 5 | import org.minimalj.frontend.Frontend; 6 | import org.minimalj.frontend.editor.Editor.NewObjectEditor; 7 | import org.minimalj.frontend.form.Form; 8 | 9 | public class AddOwnerEditor extends NewObjectEditor { 10 | 11 | @Override 12 | protected Form createForm() { 13 | return new OwnerForm(true); 14 | } 15 | 16 | @Override 17 | protected Owner save(Owner owner) { 18 | return Backend.save(owner); 19 | } 20 | 21 | @Override 22 | protected void finished(Owner newOwner) { 23 | Frontend.show(new OwnerPage(newOwner)); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/model/annotation/Decimal.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.model.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * Number of decimal places for BigDecimal 10 | */ 11 | @Retention(RetentionPolicy.RUNTIME) 12 | @Target({ ElementType.FIELD, ElementType.METHOD }) 13 | public @interface Decimal { 14 | 15 | /** 16 | * 17 | * @return the maximal decimal places persisted 18 | */ 19 | int value(); 20 | 21 | /** 22 | * {@link org.minimalj.model.Rendering#toString(Object)} 23 | * 24 | * @return the minimal decimal places shown when the annotated BigDecimal is rendered 25 | */ 26 | int minDecimals() default Integer.MAX_VALUE; 27 | } -------------------------------------------------------------------------------- /example/007_PetClinic/src/org/minimalj/example/petclinic/frontend/AddOwnerEditor.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.petclinic.frontend; 2 | 3 | import org.minimalj.backend.Backend; 4 | import org.minimalj.example.petclinic.model.Owner; 5 | import org.minimalj.frontend.Frontend; 6 | import org.minimalj.frontend.editor.Editor.NewObjectEditor; 7 | import org.minimalj.frontend.form.Form; 8 | 9 | public class AddOwnerEditor extends NewObjectEditor { 10 | 11 | @Override 12 | protected Form createForm() { 13 | return new OwnerForm(true, !OwnerForm.SHOW_PETS); 14 | } 15 | 16 | @Override 17 | protected Owner save(Owner owner) { 18 | return Backend.save(owner); 19 | } 20 | 21 | @Override 22 | protected void finished(Owner newOwner) { 23 | Frontend.show(new OwnerPage(newOwner)); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/page/ExceptionPage.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.page; 2 | 3 | import java.text.MessageFormat; 4 | 5 | import org.minimalj.application.Configuration; 6 | import org.minimalj.util.ExceptionUtils; 7 | import org.minimalj.util.resources.Resources; 8 | 9 | public class ExceptionPage extends HtmlPage { 10 | 11 | public ExceptionPage(Exception exception) { 12 | super(createHtml(exception)); 13 | } 14 | 15 | private static String createHtml(Exception exception) { 16 | if (Configuration.isDevModeActive()) { 17 | String stackTrace = ExceptionUtils.getStackTrace(exception); 18 | return MessageFormat.format("

{0}
", stackTrace); 19 | 20 | } else { 21 | return Resources.getString("ExceptionPage.message"); 22 | } 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /example/012_MiniBoost/src/org/minimalj/example/miniboost/frontend/AddProjectEditor.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.miniboost.frontend; 2 | 3 | import org.minimalj.backend.Backend; 4 | import org.minimalj.example.miniboost.model.Project; 5 | import org.minimalj.frontend.Frontend; 6 | import org.minimalj.frontend.editor.Editor.NewObjectEditor; 7 | import org.minimalj.frontend.form.Form; 8 | 9 | public class AddProjectEditor extends NewObjectEditor { 10 | 11 | @Override 12 | protected Form createForm() { 13 | return new ProjectForm(Form.EDITABLE); 14 | } 15 | 16 | @Override 17 | protected Project save(Project owner) { 18 | return Backend.save(owner); 19 | } 20 | 21 | @Override 22 | protected void finished(Project newProject) { 23 | Frontend.show(new ProjectTablePage()); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/backend/repository/ReadCriteriaTransaction.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.backend.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.repository.query.Query; 6 | 7 | public class ReadCriteriaTransaction extends ReadTransaction> { 8 | private static final long serialVersionUID = 1L; 9 | 10 | private final Query criteria; 11 | 12 | public ReadCriteriaTransaction(Class clazz, Query criteria) { 13 | super(clazz); 14 | this.criteria = criteria; 15 | } 16 | 17 | @Override 18 | public List execute() { 19 | List result = find(getEntityClazz(), criteria); 20 | return result; 21 | } 22 | 23 | @Override 24 | public String toString() { 25 | return "Read " + getEntityClazz().getSimpleName() + " by " + criteria; 26 | } 27 | } -------------------------------------------------------------------------------- /example/Minimal-J_Currencies/src/org/minimalj/example/currencies/model/Currency.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.currencies.model; 2 | 3 | import java.time.LocalDate; 4 | 5 | import org.minimalj.model.Code; 6 | import org.minimalj.model.Keys; 7 | import org.minimalj.model.annotation.Size; 8 | 9 | /** 10 | * The iso currencies list is not normalized. 11 | * Currencies are repeated for every country that 12 | * uses a currency. 13 | */ 14 | public class Currency implements Code { 15 | public static final Currency $ = Keys.of(Currency.class); 16 | 17 | @Size(3) 18 | public String id; 19 | 20 | @Size(140) 21 | public String name; 22 | 23 | public Boolean fund; 24 | 25 | @Size(3) 26 | public Integer number; 27 | 28 | @Size(1) 29 | public Integer minorUnits; 30 | 31 | public LocalDate withdrawalDate; 32 | } 33 | -------------------------------------------------------------------------------- /ext/javafx/src/main/java/org/minimalj/frontend/impl/javafx/FxNavigationTree.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.javafx; 2 | 3 | import java.util.List; 4 | 5 | import org.minimalj.frontend.action.Action; 6 | 7 | public class FxNavigationTree extends javafx.scene.control.TreeView { 8 | 9 | public FxNavigationTree(List actions) { 10 | javafx.scene.control.TreeItem root = new javafx.scene.control.TreeItem(); 11 | 12 | // HyperLink wäre das Fx control 13 | // for (Action action : actions) { 14 | // if (action instanceof ActionGroup) { 15 | // add(new SwingText(action.getName())); 16 | // ActionGroup actionGroup = (ActionGroup) action; 17 | // add(new NavigationTree(actionGroup.getItems())); 18 | // } else { 19 | // add(new SwingActionText(action)); 20 | // } 21 | // } 22 | // 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /example/004_Library/src/main/java/org/minimalj/example/library/frontend/form/LendForm.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.library.frontend.form; 2 | 3 | import static org.minimalj.example.library.model.Lend.*; 4 | 5 | import org.minimalj.example.library.model.Book; 6 | import org.minimalj.example.library.model.Customer; 7 | import org.minimalj.example.library.model.Lend; 8 | import org.minimalj.frontend.form.Form; 9 | import org.minimalj.frontend.form.element.LookupFormElement; 10 | 11 | public class LendForm extends Form { 12 | 13 | public LendForm(boolean editable) { 14 | super(editable); 15 | 16 | line(new LookupFormElement($.book, Book.$.title, Book.$.author)); 17 | line(new LookupFormElement($.customer, Customer.$.firstName, Customer.$.name)); 18 | 19 | line($.till); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /example/012_MiniBoost/src/org/minimalj/example/miniboost/frontend/AddCustomerEditor.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.miniboost.frontend; 2 | 3 | import org.minimalj.backend.Backend; 4 | import org.minimalj.example.miniboost.model.Customer; 5 | import org.minimalj.frontend.Frontend; 6 | import org.minimalj.frontend.editor.Editor.NewObjectEditor; 7 | import org.minimalj.frontend.form.Form; 8 | 9 | public class AddCustomerEditor extends NewObjectEditor { 10 | 11 | @Override 12 | protected Form createForm() { 13 | return new CustomerForm(Form.EDITABLE); 14 | } 15 | 16 | @Override 17 | protected Customer save(Customer owner) { 18 | return Backend.save(owner); 19 | } 20 | 21 | @Override 22 | protected void finished(Customer newCustomer) { 23 | Frontend.show(new CustomerTablePage()); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/minimalj/frontend/impl/json/JsonDashboardContent.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.json; 2 | 3 | import java.util.HashMap; 4 | import java.util.List; 5 | import java.util.Map; 6 | import java.util.stream.Collectors; 7 | 8 | import org.minimalj.frontend.Frontend.IContent; 9 | import org.minimalj.frontend.page.Page; 10 | 11 | public class JsonDashboardContent extends JsonComponent implements IContent { 12 | 13 | public JsonDashboardContent(List dashes) { 14 | super("Dashboard"); 15 | put("dashes", dashes.stream().map(this::map).collect(Collectors.toList())); 16 | } 17 | 18 | private Map map(Page page) { 19 | Map json = new HashMap<>(); 20 | json.put("title", page.getTitle()); 21 | json.put("content", page.getContent()); 22 | return json; 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /example/007_PetClinic/src/org/minimalj/example/petclinic/PetClinicApplication.properties: -------------------------------------------------------------------------------- 1 | Application.name = Pet Clinic 2 | 3 | Person.firstName = First name 4 | Person.lastName = Last name 5 | Person.name = Name 6 | 7 | Owner = Owner 8 | Owner.address = Address 9 | Owner.city = City 10 | Owner.telephone = Telephone 11 | Owner.pets = Pets 12 | 13 | OwnerEditor = Edit Owner 14 | 15 | Pet.birthDate = Birthdate 16 | Pet.name = Name 17 | Pet.owner = Owner 18 | Pet.type = Type 19 | 20 | PetType.name = Type 21 | 22 | AddPetEditor = Add pet 23 | 24 | Vet = Vet 25 | Vet.specialties = Specialties 26 | VetTablePage = Vets 27 | 28 | Specialty = Specialty 29 | 30 | Visit.description = Description 31 | Visit.visitDate = Visit date 32 | 33 | AddOwnerEditor = Add owner 34 | AddVetEditor = Add vet 35 | AddVisitEditor = Add visit 36 | 37 | PageAction = -------------------------------------------------------------------------------- /example/012_MiniBoost/src/org/minimalj/example/miniboost/model/ProjectCost.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.miniboost.model; 2 | 3 | import java.math.BigDecimal; 4 | import java.time.LocalDate; 5 | 6 | import org.minimalj.model.Keys; 7 | import org.minimalj.model.annotation.NotEmpty; 8 | import org.minimalj.model.annotation.Size; 9 | 10 | public class ProjectCost { 11 | 12 | public static final ProjectCost $ = Keys.of(ProjectCost.class); 13 | 14 | public Object id; 15 | 16 | @NotEmpty 17 | public Project project; 18 | 19 | @NotEmpty 20 | public Employee employee; 21 | 22 | public LocalDate checkIn, checkOut; 23 | 24 | @Size(12) 25 | public BigDecimal pause, hours, hourCostRate, totalCost, hourTurnoverRate, hourTurnover; 26 | 27 | @Size(255) 28 | public String text; 29 | 30 | @Size(50) 31 | public String workAs; 32 | 33 | } -------------------------------------------------------------------------------- /ext/vaadin/src/main/java/org/minimalj/frontend/impl/vaadin/toolkit/VaadinCheckBox.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.frontend.impl.vaadin.toolkit; 2 | 3 | import org.minimalj.frontend.Frontend.Input; 4 | import org.minimalj.frontend.Frontend.InputComponentListener; 5 | import org.minimalj.frontend.impl.vaadin.toolkit.VaadinFrontend.HasCaption; 6 | 7 | import com.vaadin.flow.component.checkbox.Checkbox; 8 | 9 | public class VaadinCheckBox extends Checkbox implements Input, HasCaption { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public VaadinCheckBox(InputComponentListener listener, String text) { 13 | super(text); 14 | addValueChangeListener(event -> listener.changed(VaadinCheckBox.this)); 15 | } 16 | 17 | @Override 18 | public void setEditable(boolean editable) { 19 | setReadOnly(!editable); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /example/Minimal-J_Currencies/src/org/minimalj/example/currencies/model/IsoCurrencyInformation.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.currencies.model; 2 | 3 | import java.time.LocalDate; 4 | 5 | import org.minimalj.model.annotation.Size; 6 | 7 | /** 8 | * IsoActiveOrHistoricCurrencyInformationType as defined in 9 | * http://www.currency-iso.org/dam/downloads/schema.xsd 10 | * 11 | * Note: this entity is not intended to be used with a Minimal-J 12 | * repository. The model test would fail as there is no id field. 13 | */ 14 | public class IsoCurrencyInformation { 15 | @Size(140) 16 | public String ccyNm, ctryNm; 17 | 18 | @Size(3) 19 | public String ccy; 20 | 21 | public Boolean fund; 22 | 23 | @Size(3) 24 | public Integer ccyNbr; 25 | 26 | @Size(1) 27 | public Integer ccyMnrUnts; 28 | 29 | public LocalDate wthdrwlDt; 30 | } 31 | -------------------------------------------------------------------------------- /example/009_eBanking/src/main/java/org/minimalj/example/ebanking/model/AccountPosition.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.ebanking.model; 2 | 3 | import java.math.BigDecimal; 4 | import java.time.LocalDate; 5 | 6 | import org.minimalj.model.Keys; 7 | import org.minimalj.model.annotation.Decimal; 8 | import org.minimalj.model.annotation.NotEmpty; 9 | import org.minimalj.model.annotation.Searched; 10 | import org.minimalj.model.annotation.Size; 11 | 12 | public class AccountPosition { 13 | 14 | public static final AccountPosition $ = Keys.of(AccountPosition.class); 15 | 16 | public Object id; 17 | 18 | @NotEmpty 19 | public Account account; 20 | 21 | @NotEmpty @Decimal(2) 22 | public BigDecimal amount; 23 | 24 | @NotEmpty 25 | public LocalDate valueDate; 26 | 27 | @Size(255) @NotEmpty @Searched 28 | public String description; 29 | } 30 | -------------------------------------------------------------------------------- /ext/historized/src/test/java/org/minimalj/repository/sql/A.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.repository.sql; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.minimalj.model.Keys; 7 | import org.minimalj.model.annotation.Size; 8 | 9 | public class A { 10 | 11 | public static final A $ = Keys.of(A.class); 12 | 13 | public A() { 14 | // needed for reflection constructor 15 | } 16 | 17 | public A(String aName) { 18 | this.aName = aName; 19 | } 20 | 21 | public Object id; 22 | public int version; 23 | public boolean historized; 24 | 25 | @Size(30) 26 | public String aName; 27 | public final List b = new ArrayList(); 28 | public final List c = new ArrayList(); 29 | public E e; 30 | public F f; 31 | 32 | @Size(5) 33 | public Integer int1; 34 | 35 | @Size(15) 36 | public Long long1; 37 | } 38 | -------------------------------------------------------------------------------- /example/003_Notes/src/org/minimalj/example/notes/NewNoteEditor.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.notes; 2 | 3 | import org.minimalj.backend.Backend; 4 | import org.minimalj.frontend.Frontend; 5 | import org.minimalj.frontend.editor.Editor.NewObjectEditor; 6 | import org.minimalj.frontend.form.Form; 7 | 8 | public class NewNoteEditor extends NewObjectEditor { 9 | 10 | @Override 11 | protected Form createForm() { 12 | return new NoteForm(); 13 | } 14 | 15 | @Override 16 | protected Note save(Note object) { 17 | return Backend.save(object); 18 | } 19 | 20 | @Override 21 | protected void finished(Note newNote) { 22 | Frontend.show(new NoteTablePage()); 23 | } 24 | 25 | private static class NoteForm extends Form { 26 | 27 | public NoteForm() { 28 | line(Note.$.date); 29 | line(Note.$.text); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /example/007_PetClinic/src/org/minimalj/example/petclinic/model/Vet.java: -------------------------------------------------------------------------------- 1 | package org.minimalj.example.petclinic.model; 2 | 3 | import java.util.HashSet; 4 | import java.util.Set; 5 | 6 | import org.minimalj.model.Keys; 7 | import org.minimalj.util.mock.Mocking; 8 | 9 | public class Vet implements Mocking { 10 | public static final Vet $ = Keys.of(Vet.class); 11 | 12 | public Object id; 13 | 14 | public final Person person = new Person(); 15 | 16 | public final Set specialties = new HashSet<>(); 17 | 18 | @Override 19 | public void mock() { 20 | person.mock(); 21 | specialties.clear(); 22 | if (Math.random() < 0.5) specialties.add(Specialty.dentistry); 23 | if (Math.random() < 0.5) specialties.add(Specialty.radiology); 24 | if (Math.random() < 0.5) specialties.add(Specialty.surgery); 25 | } 26 | } 27 | --------------------------------------------------------------------------------