diff --git a/pom.xml b/pom.xml index 0099934..75d2adc 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,11 @@ + + io.github.rowak + nanoleaf-api + 0.1.2 + org.eclnt eclntjsfserverRISC_jakarta diff --git a/src/main/java/de/examples/managedbeans.xml b/src/main/java/de/examples/managedbeans.xml new file mode 100644 index 0000000..2910e8d --- /dev/null +++ b/src/main/java/de/examples/managedbeans.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/java/de/examples/nanoleaf/WandLayout17PBean.java b/src/main/java/de/examples/nanoleaf/WandLayout17PBean.java new file mode 100644 index 0000000..9cff7ba --- /dev/null +++ b/src/main/java/de/examples/nanoleaf/WandLayout17PBean.java @@ -0,0 +1,63 @@ +package de.examples.nanoleaf; + +import java.io.Serializable; + +import org.eclnt.editor.annotations.CCGenClass; +import org.eclnt.jsfserver.pagebean.PageBean; + +@CCGenClass (expressionBase="#{d.WandLayout17PBean}") + +public class WandLayout17PBean + extends PageBean + implements Serializable +{ + String m_prozentSatz = "14%"; + public String getProzentSatz() { return m_prozentSatz; } + public void setProzentSatz(String value) { this.m_prozentSatz = value; } + + String m_paneLine = "left:1;right:1;top:1;bottom:1;color:#4472c4"; + public String getPaneLine() { return m_paneLine; } + public void setPaneLine(String value) { this.m_paneLine = value; } + + // ------------------------------------------------------------------------ + // inner classes + // ------------------------------------------------------------------------ + + /* Listener to the user of the page bean. */ + public interface IListener extends Serializable + { + } + + // ------------------------------------------------------------------------ + // members + // ------------------------------------------------------------------------ + + private IListener m_listener; + + // ------------------------------------------------------------------------ + // constructors & initialization + // ------------------------------------------------------------------------ + + public WandLayout17PBean() { + + + + } + + public String getPageName() { return "/exaples/nanoleaf/wandlayout17p.xml"; } + public String getRootExpressionUsedInPage() { return "#{d.WandLayout17PBean}"; } + + // ------------------------------------------------------------------------ + // public usage + // ------------------------------------------------------------------------ + + /* 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/de/games/managedbeans.xml b/src/main/java/de/games/managedbeans.xml new file mode 100644 index 0000000..995d7cc --- /dev/null +++ b/src/main/java/de/games/managedbeans.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/java/de/games/nanoleaf/lightsswitch/LightsOnOffBean.java b/src/main/java/de/games/nanoleaf/lightsswitch/LightsOnOffBean.java new file mode 100644 index 0000000..2e1f44b --- /dev/null +++ b/src/main/java/de/games/nanoleaf/lightsswitch/LightsOnOffBean.java @@ -0,0 +1,417 @@ +package de.games.nanoleaf.lightsswitch; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; + +import org.eclnt.editor.annotations.CCGenClass; +import org.eclnt.jsfserver.base.faces.event.ActionEvent; +import org.eclnt.jsfserver.pagebean.PageBean; + +import de.tools.ReflectClass; + + + +@CCGenClass (expressionBase="#{d.LightsOnOffBean}") + +public class LightsOnOffBean + extends PageBean + implements Serializable +{ + + private Boolean[][] statusArray; + boolean m_enabledButton1; + public boolean getEnabledButton1() { return m_enabledButton1; } + public void setEnabledButton1(boolean value) { this.m_enabledButton1 = value; } + + boolean m_enabledButton2; + public boolean getEnabledButton2() { return m_enabledButton2; } + public void setEnabledButton2(boolean value) { this.m_enabledButton2 = value; } + + boolean m_enabledButton3; + public boolean getEnabledButton3() { return m_enabledButton3; } + public void setEnabledButton3(boolean value) { this.m_enabledButton3 = value; } + + boolean m_enabledButton4; + public boolean getEnabledButton4() { return m_enabledButton4; } + public void setEnabledButton4(boolean value) { this.m_enabledButton4 = value; } + + boolean m_enabledButton5; + public boolean getEnabledButton5() { return m_enabledButton5; } + public void setEnabledButton5(boolean value) { this.m_enabledButton5 = value; } + + boolean m_enabledButton6; + public boolean getEnabledButton6() { return m_enabledButton6; } + public void setEnabledButton6(boolean value) { this.m_enabledButton6 = value; } + + boolean m_enabledButton7; + public boolean getEnabledButton7() { return m_enabledButton7; } + public void setEnabledButton7(boolean value) { this.m_enabledButton7 = value; } + + boolean m_enabledButton8; + public boolean getEnabledButton8() { return m_enabledButton8; } + public void setEnabledButton8(boolean value) { this.m_enabledButton8 = value; } + + boolean m_enabledButton9; + public boolean getEnabledButton9() { return m_enabledButton9; } + public void setEnabledButton9(boolean value) { this.m_enabledButton9 = value; } + + int m_countSteps = 0; + public int getCountSteps() { return m_countSteps; } + public void setCountSteps(int value) { this.m_countSteps = value; } + + String m_resultText; + public String getResultText() { return m_resultText; } + public void setResultText(String value) { this.m_resultText = value; } + + public void onReset(ActionEvent event) { + statusArray = new Boolean[3][3]; + nextButtons = new ArrayList(); + + + enabledAllButtons(true); + random = null; + m_countSteps = 0; + m_colorButton1 = null; + m_colorButton2= null; + m_colorButton3 = null; + m_colorButton4 = null; + m_colorButton5 = null; + m_colorButton6 = null; + m_colorButton7 = null; + m_colorButton8 = null; + m_colorButton9 = null; + + int counter = 0; + for (int r = 0; r < statusArray.length; r++) { + for (int s = 0; s < statusArray[r].length; s++) { + counter++; + + if (getRandomBoolean()) { + getReflectClass().setMethod("setColorButton" + counter, getLightOn()); + statusArray[r][s] = true; + } else { + statusArray[r][s] = false; + } + + } + } + + + resultTextSetter(); + } + + + + public static String m_lightOn = "#66FF00"; + public static String getLightOn() { return m_lightOn; } + + private Random random; + + public boolean getRandomBoolean() { + if (random == null) { + random = new Random(); + } + return random.nextBoolean(); + } + + String m_colorButton1; + public String getColorButton1() { return m_colorButton1; } + public void setColorButton1(String value) { this.m_colorButton1 = value; } + + String m_colorButton2; + public String getColorButton2() { return m_colorButton2; } + public void setColorButton2(String value) { this.m_colorButton2 = value; } + + String m_colorButton3; + public String getColorButton3() { return m_colorButton3; } + public void setColorButton3(String value) { this.m_colorButton3 = value; } + + String m_colorButton4; + public String getColorButton4() { return m_colorButton4; } + public void setColorButton4(String value) { this.m_colorButton4 = value; } + + String m_colorButton5; + public String getColorButton5() { return m_colorButton5; } + public void setColorButton5(String value) { this.m_colorButton5 = value; } + + String m_colorButton6; + public String getColorButton6() { return m_colorButton6; } + public void setColorButton6(String value) { this.m_colorButton6 = value; } + + String m_colorButton7; + public String getColorButton7() { return m_colorButton7; } + public void setColorButton7(String value) { this.m_colorButton7 = value; } + + String m_colorButton8; + public String getColorButton8() { return m_colorButton8; } + public void setColorButton8(String value) { this.m_colorButton8 = value; } + + String m_colorButton9; + public String getColorButton9() { return m_colorButton9; } + public void setColorButton9(String value) { this.m_colorButton9 = value; } + + + private void stepper() { + m_countSteps++; + } + + private void enabledAllButtons(boolean enabled) { + for (int i = 1; i <= 9; i++) { + getReflectClass().setMethod("setEnabledButton" + i, enabled); + } + } + + + private void resultTextSetter() { + + if (checkFinish()) { + m_resultText = "Du hast mit " + getCountSteps() + " Schritten GEWONNEN. :-)"; + enabledAllButtons(false); + + } else { + m_resultText = "Du hast bis jetzt " + getCountSteps() + " Schritte benötigt."; + } + } + + private boolean checkFinish() { + boolean finish = true; + boolean onOrOff = false; + boolean buttonStatus = false; + + for (int r = 0; r < statusArray.length; r++) { + for (int s = 0; s < statusArray[r].length; s++) { + if (r == 0 && s == 0) { + onOrOff = statusArray[r][s]; + } + buttonStatus = statusArray[r][s]; + + if (onOrOff != buttonStatus) { + finish = false; + break; + } + + } + if (finish == false) { + break; + } + } + return finish; + } + + private void changeButtons() { + int r = 0; + int s = 0; + Boolean status; + int button = 0; + for (String buttonNext: nextButtons) { + r = Integer.parseInt(buttonNext.substring(0, 1)); + s = Integer.parseInt(buttonNext.substring(1)); + button = arrayButtonMap.get(buttonNext); + + + + status = statusArray[r][s]; + + //System.out.println(button + " - " + buttonNext + " - " + status); + if (status.booleanValue() == true) { + getReflectClass().setMethod("setColorButton" + button, ""); + statusArray[r][s] = false; + } else { + getReflectClass().setMethod("setColorButton" + button, getLightOn()); + statusArray[r][s] = true; + } + } + + + + nextButtons.clear(); + } + + + List nextButtons; + + public void onButton1(ActionEvent event) { + nextButtons.add("00"); + nextButtons.add("01"); + nextButtons.add("10"); + + changeButtons(); + stepper(); + + resultTextSetter(); + } + + public void onButton2(ActionEvent event) { + nextButtons.add("01"); + nextButtons.add("00"); + nextButtons.add("02"); + nextButtons.add("11"); + + changeButtons(); + + stepper(); + + resultTextSetter(); + } + + public void onButton3(ActionEvent event) { + nextButtons.add("02"); + nextButtons.add("01"); + nextButtons.add("12"); + + changeButtons(); + + stepper(); + + resultTextSetter(); + } + + public void onButton4(ActionEvent event) { + nextButtons.add("10"); + nextButtons.add("00"); + nextButtons.add("11"); + nextButtons.add("20"); + + changeButtons(); + + stepper(); + + resultTextSetter(); + } + + public void onButton5(ActionEvent event) { + nextButtons.add("11"); + nextButtons.add("01"); + nextButtons.add("10"); + nextButtons.add("12"); + nextButtons.add("21"); + + changeButtons(); + stepper(); + + resultTextSetter(); + } + + public void onButton6(ActionEvent event) { + nextButtons.add("12"); + nextButtons.add("02"); + nextButtons.add("11"); + nextButtons.add("22"); + + changeButtons(); + stepper(); + + resultTextSetter(); + } + + public void onButton7(ActionEvent event) { + nextButtons.add("20"); + nextButtons.add("10"); + nextButtons.add("21"); + + changeButtons(); + stepper(); + + resultTextSetter(); + } + + public void onButton8(ActionEvent event) { + nextButtons.add("21"); + nextButtons.add("11"); + nextButtons.add("20"); + nextButtons.add("22"); + + changeButtons(); + stepper(); + + resultTextSetter(); + } + + public void onButton9(ActionEvent event) { + nextButtons.add("22"); + nextButtons.add("12"); + nextButtons.add("21"); + + changeButtons(); + stepper(); + + resultTextSetter(); + } + + + // ------------------------------------------------------------------------ + // inner classes + // ------------------------------------------------------------------------ + + /* Listener to the user of the page bean. */ + public interface IListener { + + } + + // ------------------------------------------------------------------------ + // members + // ------------------------------------------------------------------------ + + private IListener m_listener; + + // ------------------------------------------------------------------------ + // constructors & initialization + // ------------------------------------------------------------------------ + + ReflectClass m_reflectClass; + public ReflectClass getReflectClass() { return m_reflectClass; } + + Map arrayButtonMap = null; + + + public LightsOnOffBean() { + m_reflectClass = new ReflectClass(this); + onReset(null); + initArrayButtonMap(); + + checkSession(); + } + + private void checkSession() { + //System.out.println("ClientIP: " + SessionUtil.getClientIP()); + + //CLog.L.log(CLog.LL_INF, (new StringBuilder(">>>>> ClientIP: " + SessionUtil.getClientIP()).append(" <<<<<").toString())); + } + private void initArrayButtonMap() { + arrayButtonMap = new HashMap(); + + arrayButtonMap.put("00", 1); + arrayButtonMap.put("01", 2); + arrayButtonMap.put("02", 3); + arrayButtonMap.put("10", 4); + arrayButtonMap.put("11", 5); + arrayButtonMap.put("12", 6); + arrayButtonMap.put("20", 7); + arrayButtonMap.put("21", 8); + arrayButtonMap.put("22", 9); + + + } + @Override + public String getPageName() { return "/games/nanoleaf/lightswitch/lightsOnOff.jsp"; } + @Override + public String getRootExpressionUsedInPage() { return "#{d.LightsOnOffBean}"; } + + // ------------------------------------------------------------------------ + // public usage + // ------------------------------------------------------------------------ + + /* 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/de/games/nanoleaf/tictactoe/TicTacToeBean.java b/src/main/java/de/games/nanoleaf/tictactoe/TicTacToeBean.java new file mode 100644 index 0000000..0e23f4f --- /dev/null +++ b/src/main/java/de/games/nanoleaf/tictactoe/TicTacToeBean.java @@ -0,0 +1,54 @@ +package de.games.nanoleaf.tictactoe; + +import java.io.Serializable; +import org.eclnt.editor.annotations.CCGenClass; +import org.eclnt.jsfserver.pagebean.PageBean; + +import org.eclnt.jsfserver.base.faces.event.ActionEvent; + +@CCGenClass (expressionBase="#{d.TicTacToeBean}") + +public class TicTacToeBean + extends PageBean + implements Serializable +{ + // ------------------------------------------------------------------------ + // inner classes + // ------------------------------------------------------------------------ + + /* Listener to the user of the page bean. */ + public interface IListener extends Serializable + { + } + + // ------------------------------------------------------------------------ + // members + // ------------------------------------------------------------------------ + + private IListener m_listener; + + // ------------------------------------------------------------------------ + // constructors & initialization + // ------------------------------------------------------------------------ + + public TicTacToeBean() + { + } + + public String getPageName() { return "/games/nanoleaf/tictactoe/tictactoe.xml"; } + public String getRootExpressionUsedInPage() { return "#{d.TicTacToeBean}"; } + + // ------------------------------------------------------------------------ + // public usage + // ------------------------------------------------------------------------ + + /* 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/de/tools/ReflectClass.java b/src/main/java/de/tools/ReflectClass.java new file mode 100644 index 0000000..42da6b7 --- /dev/null +++ b/src/main/java/de/tools/ReflectClass.java @@ -0,0 +1,248 @@ +package de.tools; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author VogelT + * + */ + +public class ReflectClass { + + private final Object m_workObject; + public Object getWorkObject() { return m_workObject; } + + /** + * + * @param method + * @param arg + */ + public void setMethod(String method, Object arg) { + setMethod(method, new Object[]{arg}); + } + + /** + * + * @param method + * @param arg + */ + public void setMethod(String method, Object[] arg) { + try { + + @SuppressWarnings("rawtypes") + Class[] parameterTypes = getParameterTypes(method); + Method setter = getWorkObject().getClass().getMethod(method, parameterTypes); + + setter.invoke(getWorkObject(), arg); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + public void set(String fieldname, Object value) { + try { + Field field = getWorkObject().getClass().getDeclaredField(fieldname); + + if (field == null) { + field = getWorkObject().getClass().getField(fieldname); + + } + field.setAccessible(true); + field.set(getWorkObject(), value); + + } catch (Exception e) { + e.printStackTrace(); + } + + } + + public Object get(String fieldname) { + Object result = null; + //System.out.println("Fieldname: " + fieldname); + + if (getUpperSearch()) { + fieldname = fieldname.trim().toUpperCase(); + } else { + fieldname = fieldname.trim().toLowerCase(); + } + + try { + if(fieldname.startsWith("serial")) { + return result; + } + + Field field = getWorkObject().getClass().getDeclaredField(fieldname); + + //String clazzType = field.getType().getName(); + if (field == null) { + field = getWorkObject().getClass().getField(fieldname); + } + + if (field != null) { + field.setAccessible(true); + result = field.get(getWorkObject()); + } + + } catch (Exception e) { + e.printStackTrace(); + } + return result; + } + + /** + * + * @param method + * @return + */ +// public Object getMethod(String method) { +// Object result = null; +// +// try { +// +// +// +// } catch (Exception e) { +// e.printStackTrace(); +// } +// return result; +// } + + /** + * + * @param methodSearch + * @return + */ + public Class getReturnType(String methodSearch) { + Class returnTypes = null; + + for ( Method method : getWorkObject().getClass().getMethods() ) { + //String returnString = method.getReturnType().getName(); + + if (method.getName().equals(methodSearch)) { + returnTypes = method.getReturnType(); + break; + } + } + return returnTypes; + } + + /** + * + * @param methodSearch + * @return + */ + public Class[] getParameterTypes(String methodSearch) { + Class[] parameterTypes = null; + + for ( Method method : getWorkObject().getClass().getMethods() ) { + //String returnString = method.getReturnType().getName(); + + if (method.getName().equals(methodSearch)) { + parameterTypes = method.getParameterTypes(); + break; + } + } + return parameterTypes; + } + + /** + * showMethods + */ + public void showMethods() { + for ( Method method : getWorkObject().getClass().getMethods() ) { + String returnString = method.getReturnType().getName(); + System.out.print( returnString + " " + method.getName() + "(" ); + + Class[] parameterTypes = method.getParameterTypes(); + + for ( int k = 0; k < parameterTypes.length; k++ ) { + String parameterString = parameterTypes[k].getName(); + System.out.print( " " + parameterString ); + + if ( k < parameterTypes.length - 1 ) + System.out.print( ", " ); + } + System.out.print( " )" ); + + Class[] exceptions = method.getExceptionTypes(); + + if ( exceptions.length > 0 ) { + System.out.print( " throws " ); + for ( int k = 0; k < exceptions.length; k++ ) { + System.out.print( exceptions[k].getName() ); + if ( k < exceptions.length - 1) + System.out.print( ", " ); + } + } + System.out.println(); + } + } + + public boolean m_upperSearch = false; + public boolean getUpperSearch() { return m_upperSearch; } + + public ReflectClass(Object o) { + this.m_workObject = o; + + } + + public ReflectClass(Object o, boolean upperSearch) { + this.m_workObject = o; + this.m_upperSearch = upperSearch; + } + + public static void main(String[] arg) { + +// MenuBarButtonExpressions barExpressions = new MenuBarButtonExpressions(MenuBarButtonAction.PRINT, "Text", "/image"); +// ReflectClass reflectClass = new ReflectClass(barExpressions); +// reflectClass.showMethods(); +// +// reflectClass.showFields(); + + } + + public void showFields() { + + Field[] fields = getWorkObject().getClass().getDeclaredFields(); + + for (Field field : fields) { + System.out.println(field.getName()); + } + + } + + public List getAllFields() { + List resultList = new ArrayList(); + Field[] fields = getWorkObject().getClass().getDeclaredFields(); + + for (Field field : fields) { + resultList.add(field.getName()); + } + return resultList; + } + + public String getType(String fieldname) { + String result = null; + try { + + if (fieldname == null || fieldname.trim().length() == 0) + return ""; + + if (getUpperSearch()) { + result = getWorkObject().getClass().getDeclaredField(fieldname.trim().toUpperCase()).getType().getName(); + } else { + result = getWorkObject().getClass().getDeclaredField(fieldname.trim().toLowerCase()).getType().getName(); + } + } catch (Exception e) { + e.printStackTrace(); + return ""; + } + return result; + } + +} diff --git a/src/main/java/de/tools/SessionUtil.java b/src/main/java/de/tools/SessionUtil.java new file mode 100644 index 0000000..284d038 --- /dev/null +++ b/src/main/java/de/tools/SessionUtil.java @@ -0,0 +1,148 @@ +package de.tools; + +import java.net.InetAddress; +import java.net.UnknownHostException; + +import org.eclnt.jsfserver.util.HttpSessionAccess; + +import jakarta.servlet.http.HttpSession; + +public class SessionUtil { + + private SessionUtil() { + + } + + /** + * Function to return Client IP + * @return Client IP + */ + public static String getClientIP(){ + return HttpSessionAccess.getCurrentRequest().getRemoteAddr(); + } + + /** + * Function to return Client IP + * @return Client IP + */ + public static String getClientAddr(){ + return HttpSessionAccess.getCurrentRequest().getRemoteHost(); + } + + + public static String getInetAddress() { + String adr = null; + + try { + adr = InetAddress.getByName(HttpSessionAccess.getCurrentRequest().getRemoteAddr()).getHostName(); + } catch (Exception e) { + e.printStackTrace(); + } + return adr; + } + + /** + * Function to return the Servers IP + * @return Server IP + */ + public static String getServerIP(){ + try { + return InetAddress.getLocalHost().getHostAddress(); + } catch (UnknownHostException e) { + e.printStackTrace(); + } + return ""; + } + + /** + * Function to return the ServerHostname + * @return Server Hostname + */ + public static String getServerHostname(){ + try { + return InetAddress.getLocalHost().getHostName(); + } catch (UnknownHostException e) { + e.printStackTrace(); + } + return ""; + } + + /** + * Return activ HttpSession + * + * @return HttpSession + */ + public static HttpSession getHttpSession() { + HttpSession httpSession = null; + try { + httpSession = HttpSessionAccess.getCurrentHttpSession(); + } catch (Exception e) { + e.printStackTrace(); + } + return httpSession; + } + + +// /** +// * Return SessionType +// * +// * @return SessionType +// */ +// public static SessionTyp getServerSessionType() { +// SessionTyp sessionType = SessionTyp.PORTAL_SESSION; +// +// try { +// +// String serverName = getServerHostname(); +// +// if (serverName != null) { +// if (serverName.startsWith("NESAS")) { +// sessionType = SessionTyp.PORTAL_SESSION; +// } else { +// sessionType = SessionTyp.CLIENT_SESSION; +// } +// } +// +// } catch (Exception e) { +// e.printStackTrace(); +// } +// return sessionType; +// } + + /** + * Return SessionID + * @return SessionID + */ + public static String getHttpSessionID() { + return HttpSessionAccess.getCurrentHttpSession().getId(); + } + + public static String getRootPath() { + String rootPath = null; + try { + rootPath = HttpSessionAccess.getServletContext().getRealPath("/"); + } catch (Exception e) { + e.printStackTrace(); + } + return rootPath; + } + + /** + * @return gibt den Namen des Tomcats zurück, z.B. GWPTESTTC1 + */ + public static String getSessionName() { + String id = null; + try { + id = HttpSessionAccess.getCurrentHttpSession().getId(); + } catch (Exception e) { + e.printStackTrace(); + } + if (id != null && id.indexOf(".") != -1) { + id = id.substring(id.indexOf(".")+1); + } else { + id = ""; + } + return id; + } + +} diff --git a/src/main/java/de/tvo/workplace/DefaultWorkplaceFunctionsBean.java b/src/main/java/de/tvo/workplace/DefaultWorkplaceFunctionsBean.java index 1c5b517..210c489 100644 --- a/src/main/java/de/tvo/workplace/DefaultWorkplaceFunctionsBean.java +++ b/src/main/java/de/tvo/workplace/DefaultWorkplaceFunctionsBean.java @@ -1,11 +1,13 @@ package de.tvo.workplace; import java.io.Serializable; + import org.eclnt.editor.annotations.CCGenClass; import org.eclnt.workplace.IWorkpageDispatcher; import org.eclnt.workplace.WorkpageDispatchedPageBean; - -import org.eclnt.jsfserver.base.faces.event.ActionEvent; +import org.eclnt.workplace.WorkpageStartInfo; +import org.eclnt.workplace.WorkplaceFunctionTree; +import org.eclnt.workplace.WorkplaceFunctionTreeInfoNode; @CCGenClass (expressionBase="#{d.DefaultWorkplaceFunctionsBean}") @@ -32,9 +34,19 @@ public class DefaultWorkplaceFunctionsBean // constructors & initialization // ------------------------------------------------------------------------ - public DefaultWorkplaceFunctionsBean(IWorkpageDispatcher workpageDispatcher) + WorkplaceFunctionTreeInfoNode m_functionTree; + + + public WorkplaceFunctionTreeInfoNode getFunctionTree() { + return m_functionTree; + } + + public DefaultWorkplaceFunctionsBean(IWorkpageDispatcher workpageDispatcher) { - super(workpageDispatcher); + super(workpageDispatcher); + m_functionTree = buildFunctionTree(); + + } public String getPageName() { return "/workplace/defaultWorkplaceFunctions.xml"; } @@ -53,4 +65,30 @@ public class DefaultWorkplaceFunctionsBean // ------------------------------------------------------------------------ // private usage // ------------------------------------------------------------------------ + private WorkplaceFunctionTreeInfoNode buildFunctionTree() + { + WorkplaceFunctionTreeInfoNode root = new WorkplaceFunctionTreeInfoNode(); + for (int i=0; i<5; i++) + { + WorkplaceFunctionTreeInfoNode top = new WorkplaceFunctionTreeInfoNode(); + top.setText("Top " + i); + root.getSubNodes().add(top); + for (int j=0; j<5; j++) + { + WorkplaceFunctionTreeInfoNode sub = new WorkplaceFunctionTreeInfoNode(); + sub.setText("Sub " + i); + top.getSubNodes().add(sub); + for (int k=0; k<5; k++) + { + WorkplaceFunctionTreeInfoNode node = new WorkplaceFunctionTreeInfoNode(); + node.setText("Node " + i); + WorkpageStartInfo wpsi = new WorkpageStartInfo(); + node.setWorkpageStartInfo(wpsi); + wpsi.setPageBeanName("DemoHelloWorld"); + sub.getSubNodes().add(node); + } + } + } + return root; + } } diff --git a/src/main/java/managedbeans/dispatcherinfo.xml b/src/main/java/managedbeans/dispatcherinfo.xml index ba767bd..1026811 100644 --- a/src/main/java/managedbeans/dispatcherinfo.xml +++ b/src/main/java/managedbeans/dispatcherinfo.xml @@ -2,33 +2,7 @@ + + - \ No newline at end of file diff --git a/src/main/resources/literals.properties b/src/main/resources/literals.properties new file mode 100644 index 0000000..1ed20d8 --- /dev/null +++ b/src/main/resources/literals.properties @@ -0,0 +1,25 @@ +#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/) +#Created by org.eclnt.editor.resourceeditor.ResourceEditor +#Mon Dec 03 13:07:50 CET 2018 + +accept = Accept + +accept_delay = Accept ($DELAY$) + +cancel = Cancel + +e-mail = E-Mail + +e_mail = Email + +logoutuser = Soll der User ausgeloggt werden? + +no = No + +ok = Ok + +ok_delay = Ok ($DELAY$) + +test = Vorgabe + +yes = Yes diff --git a/src/main/resources/literals_de_DE.properties b/src/main/resources/literals_de_DE.properties new file mode 100644 index 0000000..f05cdba --- /dev/null +++ b/src/main/resources/literals_de_DE.properties @@ -0,0 +1,22 @@ + +accept = Accept + +accept_delay = Accept ($DELAY$) + +cancel = Cancel + +e-mail = E-Mail + +e_mail = Email + +logoutuser = Soll der User ausgeloggt werden? + +no = No + +ok = Ok + +ok_delay = Ok ($DELAY$) + +test = Deutsch + +yes = Yes diff --git a/src/main/resources/literals_en_US.properties b/src/main/resources/literals_en_US.properties new file mode 100644 index 0000000..bea343f --- /dev/null +++ b/src/main/resources/literals_en_US.properties @@ -0,0 +1,22 @@ + +accept = Accept + +accept_delay = Accept ($DELAY$) + +cancel = Cancel + +e-mail = E-Mail + +e_mail = Email + +logoutuser = Should the user be logged out?\r\n + +no = No + +ok = Ok + +ok_delay = Ok ($DELAY$) + +test = Englisch + +yes = Yes diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml new file mode 100644 index 0000000..59e7bc0 --- /dev/null +++ b/src/main/resources/log4j2.xml @@ -0,0 +1,58 @@ + + + + ${sys:catalina.home}/temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/logging.properties b/src/main/resources/logging.properties new file mode 100644 index 0000000..d575361 --- /dev/null +++ b/src/main/resources/logging.properties @@ -0,0 +1,2 @@ +org.apache.catalina.core.ContainerBase.[Catalina].level=WARNING +org.apache.catalina.core.ContainerBase.[Catalina].handlers=java.util.logging.ConsoleHandler \ No newline at end of file diff --git a/src/main/resources/tooltip/literalsTooltip.properties b/src/main/resources/tooltip/literalsTooltip.properties new file mode 100644 index 0000000..72da3ad --- /dev/null +++ b/src/main/resources/tooltip/literalsTooltip.properties @@ -0,0 +1,3 @@ +#Created by CapatainCasa layout tools +#Thu Sep 19 06:05:32 CEST 2024 +home=Home Button diff --git a/src/main/resources/tooltip/literalsTooltip_de_DE.properties b/src/main/resources/tooltip/literalsTooltip_de_DE.properties new file mode 100644 index 0000000..11a4b98 --- /dev/null +++ b/src/main/resources/tooltip/literalsTooltip_de_DE.properties @@ -0,0 +1,4 @@ +#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/) +#Created by cctranslate +#Tue Jul 04 07:04:10 CEST 2017 +home=Home Button diff --git a/src/main/resources/tooltip/literalsTooltip_en_US.properties b/src/main/resources/tooltip/literalsTooltip_en_US.properties new file mode 100644 index 0000000..11a4b98 --- /dev/null +++ b/src/main/resources/tooltip/literalsTooltip_en_US.properties @@ -0,0 +1,4 @@ +#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/) +#Created by cctranslate +#Tue Jul 04 07:04:10 CEST 2017 +home=Home Button diff --git a/src/main/resources/workplace/literalsWorkplace.properties b/src/main/resources/workplace/literalsWorkplace.properties new file mode 100644 index 0000000..9083e45 --- /dev/null +++ b/src/main/resources/workplace/literalsWorkplace.properties @@ -0,0 +1,4 @@ +#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/) +#Created by org.eclnt.editor.resourceeditor.ResourceEditor +#Fri Aug 18 14:40:38 CEST 2017 + diff --git a/src/main/resources/workplace/literalsWorkplace_de_DE.properties b/src/main/resources/workplace/literalsWorkplace_de_DE.properties new file mode 100644 index 0000000..16b6ce8 --- /dev/null +++ b/src/main/resources/workplace/literalsWorkplace_de_DE.properties @@ -0,0 +1,5 @@ +#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/) +#Created by cctranslate +#Tue Jul 04 07:04:10 CEST 2017 + + diff --git a/src/main/resources/workplace/literalsWorkplace_en_US.properties b/src/main/resources/workplace/literalsWorkplace_en_US.properties new file mode 100644 index 0000000..69aa854 --- /dev/null +++ b/src/main/resources/workplace/literalsWorkplace_en_US.properties @@ -0,0 +1,4 @@ +#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/) +#Created by cctranslate +#Tue Jul 04 07:04:10 CEST 2017 + diff --git a/src/main/webapp/eclntjsfserver/config/resources.xml b/src/main/webapp/eclntjsfserver/config/resources.xml new file mode 100644 index 0000000..95592a2 --- /dev/null +++ b/src/main/webapp/eclntjsfserver/config/resources.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/main/webapp/examples/nanoleaf/wandlayout17p.xml b/src/main/webapp/examples/nanoleaf/wandlayout17p.xml new file mode 100644 index 0000000..b7ca3bc --- /dev/null +++ b/src/main/webapp/examples/nanoleaf/wandlayout17p.xml @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/games/nanoleaf/lightswitch/lightsOnOffPage.xml b/src/main/webapp/games/nanoleaf/lightswitch/lightsOnOffPage.xml new file mode 100644 index 0000000..14cd07f --- /dev/null +++ b/src/main/webapp/games/nanoleaf/lightswitch/lightsOnOffPage.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/games/nanoleaf/tictactoe/tictactoe.xml b/src/main/webapp/games/nanoleaf/tictactoe/tictactoe.xml new file mode 100644 index 0000000..28d10d8 --- /dev/null +++ b/src/main/webapp/games/nanoleaf/tictactoe/tictactoe.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html new file mode 100644 index 0000000..1787128 --- /dev/null +++ b/src/main/webapp/index.html @@ -0,0 +1,8 @@ + + + Webportal - Geis Gruppe + + + + + \ No newline at end of file diff --git a/src/main/webapp/workplace/defaultWorkplaceFunctions.xml b/src/main/webapp/workplace/defaultWorkplaceFunctions.xml index 9c405fc..25f3c32 100644 --- a/src/main/webapp/workplace/defaultWorkplaceFunctions.xml +++ b/src/main/webapp/workplace/defaultWorkplaceFunctions.xml @@ -4,7 +4,7 @@ - + diff --git a/src/main/webapp/workplace/menuPage.xml b/src/main/webapp/workplace/menuPage.xml index bbf258b..1e00cd6 100644 --- a/src/main/webapp/workplace/menuPage.xml +++ b/src/main/webapp/workplace/menuPage.xml @@ -4,7 +4,7 @@ - +