Ticket:#
US:[US-ID]
Beschreibung:
Nano/Server
VogelT 1 month ago
parent c91163a981
commit 93124b223f

@ -12,15 +12,9 @@
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
@ -30,12 +24,5 @@
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

@ -30,7 +30,7 @@
<!-- Tomcat version of CaptainCasa -->
<tomcat.version>10.1.18</tomcat.version>
<!-- This is the CaptainCasa version to be used. -->
<cc.version>20250128</cc.version>
<cc.version>20260204</cc.version>
</properties>
<dependencies>
@ -40,10 +40,7 @@
https://github.com/amybytes/nanoleaf-api
https://github.com/amybytes/nanoleaf-aurora
-->
<dependency>
<groupId>javax.servlet</groupId>
@ -60,20 +57,16 @@
<artifactId>hibernate-core-jakarta</artifactId>
<version>5.6.15.Final</version>
</dependency>
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
@ -137,22 +130,18 @@
<version>1</version>
<exclusions>
<exclusion>
<artifactId>
javax.xml.bind</artifactId>
<artifactId>javax.xml.bind</artifactId>
<groupId>jsr173_api</groupId>
</exclusion>
<exclusion>
<artifactId>
jsr173_api</artifactId>
<artifactId>jsr173_api</artifactId>
<groupId>javax.xml.bind </groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
jakarta.platform</groupId>
<artifactId>
jakarta.jakartaee-api</artifactId>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>9.1.0</version>
<scope>provided</scope>
</dependency>
@ -183,46 +172,7 @@
<skip>true</skip>
</configuration>
</plugin>
<!--
OPTIONAL COPYING OF TOOLSET
Copies the tools for the version into /cctoolset-directory of project.
You may then directly start it, e.g. by batch file:
/projectdirectory
/cctoolset
eclnteditor_springboot_jakarta.war
start.bat
In start.bat:
java -jar eclnteditor_springboot_jakarta.war configDir=../cctoolsetconfig
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>cctoolset-copy</id>
<phase>package</phase>
<goals><goal>copy</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.eclnt</groupId>
<artifactId>eclnteditor_springboot</artifactId>
<version>${cc.version}</version>
<type>war</type>
<overWrite>true</overWrite>
<outputDirectory>${project.basedir}/cctoolset</outputDirectory>
<destFileName>eclnteditor_springboot_jakarta.war</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
-->
</plugins>
</build>

@ -0,0 +1,7 @@
<dispatcherinfo>
<managedpackage name="de.database.nanoleaf"/>
</dispatcherinfo>

@ -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
// ------------------------------------------------------------------------
}

@ -4,6 +4,8 @@
<dispatcherinfoextension resource="de/nanoleaf/managedbeans.xml"/>
<dispatcherinfoextension resource="de/database/managedbeans.xml"/>
<dispatcherinfoextension resource="de/examples/managedbeans.xml"/>

@ -0,0 +1 @@
/rebel.xml

@ -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
save=Speichern
token=Token

@ -15,7 +15,7 @@ consequence.
<Context>
<!-- MariaDB CRM Verbindung -->
<!-- MariaDB NanoLeaf Verbindung -->
<Resource name="jdbc/mariadbnl"
global="jdbc/mariadb"
auth="Container"

@ -60,7 +60,7 @@
<resource-ref>
<description>MariaDB Verbindung</description>
<description>MariaDB NanoLeaf Verbindung</description>
<res-ref-name>jdbc/mariadbnl</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<t:layoutdefinition xmlns:t="http://www.captaincasa.com/controllibrary/t" >
<t:beanprocessing id="g_1" beanbinding="#{d.CreateConnectionBean}" />
<t:rowtitlebar id="g_2" text="#{rr.literalsNanoleaf[&#39;nanoleaf&#39;]}" />
<t:rowheader id="g_3" />
<t:rowbodypane id="g_4" >
<t:rowdistance id="g_6" />
<t:row id="g_8" >
<t:coldistance id="g_10" />
<t:label id="g_12" align="center" text="#{rr.literalsNanoleaf[&#39;hostname&#39;]}" width="200" />
<t:coldistance id="g_5" />
<t:label id="g_14" align="center" text="#{rr.literalsNanoleaf[&#39;ipadress&#39;]}" width="200" />
<t:coldistance id="g_13" />
<t:label id="g_22" align="center" text="#{rr.literalsNanoleaf[&#39;port&#39;]}" width="100" />
</t:row>
<t:rowdistance id="g_7" />
<t:row id="g_16" >
<t:coldistance id="g_9" />
<t:field id="g_18" text="#{d.CreateConnectionBean.nlconnect.nchostname}" width="200" />
<t:coldistance id="g_11" />
<t:field id="g_20" text="#{d.CreateConnectionBean.nlconnect.ncipadress}" width="200" />
<t:coldistance id="g_15" />
<t:field id="g_24" text="#{d.CreateConnectionBean.nlconnect.ncport}" width="100" />
</t:row>
<t:rowdistance id="g_17" height="20" />
<t:row id="g_26" >
<t:coldistance id="g_19" />
<t:label id="g_28" align="center" text="#{rr.literalsNanoleaf[&#39;token&#39;]}" width="300" />
<t:coldistance id="g_21" />
<t:label id="g_30" align="center" text="#{rr.literalsNanoleaf[&#39;nanoleaf_type&#39;]}" width="150" />
<t:coldistance id="g_23" />
<t:label id="g_32" text="#{rr.literalsNanoleaf[&#39;count_panels&#39;]}" width="100" />
</t:row>
<t:rowdistance id="g_25" />
<t:row id="g_34" >
<t:coldistance id="g_27" />
<t:field id="g_36" text="#{d.CreateConnectionBean.nlconnect.nctoken}" width="300" />
<t:coldistance id="g_29" />
<t:combobox id="g_38" value="#{d.CreateConnectionBean.nlconnect.nctype}" width="150" >
<t:comboboxitem id="g_33" text="CANVAS" value="CANVAS" />
<t:comboboxitem id="g_42" text="SHAPES" value="SHAPES" />
</t:combobox>
<t:coldistance id="g_31" />
<t:spinner id="g_40" maxvalue="100" minvalue="4" value="#{d.CreateConnectionBean.nlconnect.nccountpanel}" width="100" />
</t:row>
<t:rowdistance id="g_35" height="40" />
<t:row id="g_44" >
<t:coldistance id="g_37" />
<t:button id="g_46" actionListener="#{d.CreateConnectionBean.onSave}" text="#{rr.literalsNanoleaf[&#39;save&#39;]}" />
</t:row>
</t:rowbodypane>
</t:layoutdefinition>

@ -1,4 +1,6 @@
<system>
<httpheaderattributesforpages/>
<sessionmanagement type="COOKIE"/>
</system>

Loading…
Cancel
Save