diff --git a/.classpath b/.classpath index e68d17e..d1ce4d2 100644 --- a/.classpath +++ b/.classpath @@ -12,15 +12,9 @@ - - - - - - - - + + @@ -30,12 +24,5 @@ - - - - - - - diff --git a/pom.xml b/pom.xml index c7ba7e6..b79afde 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ 10.1.18 - 20250128 + 20260204 @@ -40,10 +40,7 @@ https://github.com/amybytes/nanoleaf-api https://github.com/amybytes/nanoleaf-aurora - - - - + --> javax.servlet @@ -60,20 +57,16 @@ hibernate-core-jakarta 5.6.15.Final - jakarta.persistence jakarta.persistence-api 3.0.0 - jakarta.transaction jakarta.transaction-api 1.3.3 - - com.zaxxer HikariCP @@ -137,22 +130,18 @@ 1 - - javax.xml.bind + javax.xml.bind jsr173_api - - jsr173_api + jsr173_api javax.xml.bind - - jakarta.platform - - jakarta.jakartaee-api + jakarta.platform + jakarta.jakartaee-api 9.1.0 provided @@ -183,46 +172,7 @@ true - + diff --git a/src/main/java/de/database/managedbeans.xml b/src/main/java/de/database/managedbeans.xml new file mode 100644 index 0000000..ff8553f --- /dev/null +++ b/src/main/java/de/database/managedbeans.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/java/de/database/nanoleaf/CreateConnectionBean.java b/src/main/java/de/database/nanoleaf/CreateConnectionBean.java new file mode 100644 index 0000000..90488c2 --- /dev/null +++ b/src/main/java/de/database/nanoleaf/CreateConnectionBean.java @@ -0,0 +1,101 @@ +package de.database.nanoleaf; + +import java.io.Serializable; +import org.eclnt.editor.annotations.CCGenClass; +import org.eclnt.jsfserver.pagebean.PageBean; + +import de.tvo.database.tables.NLCONNECT.Nlconnect; +import de.tvo.database.tables.NLCONNECT.NlconnectWorker; +import de.tvo.nanoleaf.enums.NanoTypeEnum; + +import org.eclnt.jsfserver.base.faces.event.ActionEvent; +import org.eclnt.jsfserver.defaultscreens.Statusbar; + +@CCGenClass (expressionBase="#{d.CreateConnectionBean}") + +public class CreateConnectionBean + extends PageBean + implements Serializable +{ + public void onSave(org.eclnt.jsfserver.base.faces.event.ActionEvent event) { + boolean saved = true; + try { + NlconnectWorker worker = new NlconnectWorker(); + saved = worker.insertNlconnect(getNlconnect()); + } catch (Exception e) { + e.printStackTrace(); + saved = false; + Statusbar.outputWarning("Fehler beim speichern!!!"); + } + + if (saved) { + m_nlconnect = new Nlconnect(); + m_test = false; + Statusbar.outputMessage("Connection gespeichert."); + } + + + } + + private boolean m_test = true; + public boolean getTest() { return m_test; } + + + // ------------------------------------------------------------------------ + // inner classes + // ------------------------------------------------------------------------ + + + + /* Listener to the user of the page bean. */ + public interface IListener extends Serializable { + } + + // ------------------------------------------------------------------------ + // members + // ------------------------------------------------------------------------ + + private IListener m_listener; + + // ------------------------------------------------------------------------ + // constructors & initialization + // ------------------------------------------------------------------------ + + public CreateConnectionBean() { + if (getTest()) { + m_nlconnect = new Nlconnect(); + + m_nlconnect.setNchostname("Canvas-72FA.fritz.box"); + m_nlconnect.setNcipadress("192.168.178.141"); + m_nlconnect.setNcport(16021); + m_nlconnect.setNccountpanel(15); + m_nlconnect.setNctoken("LAG28BQWrXK2p79NbHMQsvcYYCN1TcD4"); + m_nlconnect.setNctype(NanoTypeEnum.CANVAS); + } + } + + @Override + public String getPageName() { return "/database/nanoleaf/createConnection.xml"; } + @Override + public String getRootExpressionUsedInPage() { return "#{d.CreateConnectionBean}"; } + + // ------------------------------------------------------------------------ + // public usage + // ------------------------------------------------------------------------ + private Nlconnect m_nlconnect = new Nlconnect(); + public void setNlconnect(Nlconnect nlconnect) { + m_nlconnect = nlconnect; + } + + public Nlconnect getNlconnect() { return m_nlconnect; } + + /* Initialization of the bean. Add any parameter that is required within your scenario. */ + public void prepare(IListener listener) + { + m_listener = listener; + } + + // ------------------------------------------------------------------------ + // private usage + // ------------------------------------------------------------------------ +} diff --git a/src/main/java/managedbeans/dispatcherinfo.xml b/src/main/java/managedbeans/dispatcherinfo.xml index 24b5cb0..2103a2e 100644 --- a/src/main/java/managedbeans/dispatcherinfo.xml +++ b/src/main/java/managedbeans/dispatcherinfo.xml @@ -4,6 +4,8 @@ + + diff --git a/src/main/resources/.gitignore b/src/main/resources/.gitignore new file mode 100644 index 0000000..4658b7a --- /dev/null +++ b/src/main/resources/.gitignore @@ -0,0 +1 @@ +/rebel.xml diff --git a/src/main/resources/nanoleaf/literalsNanoleaf.properties b/src/main/resources/nanoleaf/literalsNanoleaf.properties index c1142f5..ee8881e 100644 --- a/src/main/resources/nanoleaf/literalsNanoleaf.properties +++ b/src/main/resources/nanoleaf/literalsNanoleaf.properties @@ -1,3 +1,10 @@ +count_panels=Anzahl Panels +hostname=Hostname +ipadress=IP Adresse load=Laden +nanoleaf=Nano Leaf +nanoleaf_type=Nano Leaf Type +port=Port reset=Zu\u00FCcksetzen -save=Speichern \ No newline at end of file +save=Speichern +token=Token \ No newline at end of file diff --git a/src/main/webapp/META-INF/context.xml b/src/main/webapp/META-INF/context.xml index 149feb6..3e23492 100644 --- a/src/main/webapp/META-INF/context.xml +++ b/src/main/webapp/META-INF/context.xml @@ -15,7 +15,7 @@ consequence. - + - MariaDB Verbindung + MariaDB NanoLeaf Verbindung jdbc/mariadbnl javax.sql.DataSource Container diff --git a/src/main/webapp/database/nanoleaf/createConnection.xml b/src/main/webapp/database/nanoleaf/createConnection.xml new file mode 100644 index 0000000..e4e086a --- /dev/null +++ b/src/main/webapp/database/nanoleaf/createConnection.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/eclntjsfserver/config/system.xml b/src/main/webapp/eclntjsfserver/config/system.xml index 41a2134..481ed5b 100644 --- a/src/main/webapp/eclntjsfserver/config/system.xml +++ b/src/main/webapp/eclntjsfserver/config/system.xml @@ -1,4 +1,6 @@ + +