import sources from develop/0.1.0

This commit is contained in:
Thomas Peetz
2025-04-29 12:52:55 +02:00
committed by Thomas Peetz
parent c30bdd1cd5
commit 19a5623075
670 changed files with 35977 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
apply plugin: 'war'
version = '0.0.1'
dependencies {
compile project(':MedienImpl')
}
@@ -0,0 +1,36 @@
package com.peetz.medien.view;
import com.peetz.medien.service.MedienService;
import java.io.Serializable;
import java.util.logging.Logger;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
/**
*
* @author TPEETZ
*/
@ManagedBean(name="MedienView")
@RequestScoped
public class MedienView implements Serializable {
private static final Logger LOG = Logger.getLogger(MedienView.class.getName());
@EJB
private MedienService medienService;
private static final long serialVersionUID = -8261128991042235283L;
public MedienView() {
LOG.info("MedienView created");
}
public Integer getCdNumber() {
return medienService.getAllCDs().size();
}
public Integer getDvdNumber() {
return medienService.getAllDVDs().size();
}
}
@@ -0,0 +1,33 @@
<html>
<head><title>Medien Application</title></head>
<body bgcolor="white">
<table border="0" width="100%" height="100%" cellpadding="5">
<colgroup>
<col width="10%">
<col width="80%">
<col width="10%">
</colgroup>
<!-- Kopfbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="center" colspan="3"><b>Medien Manager</b></td>
</tr>
<!-- Hauptbereich -->
<tr>
<!-- Linker Navigationsbereich -->
<td bgcolor="tan" valign="top" with="100">test</td>
<td bgcolor="wheat" valign="top">
<p>Medien Manager</p>
<a href="index.jsp">Show the media list</a>
</td>
<!-- Rechter Navigationsbereich -->
<td bgcolor="tan" with="15%">&nbsp;</td>
</tr>
<!-- Fussbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="right" colspan="3">
<p>Ingenieurb&uuml;ro Thomas Peetz</p>
</td>
</tr>
</table>
</body>
</html>
@@ -0,0 +1,75 @@
<%@ page language="java"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<html:html locale="true">
<head>
<html:base />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Medien Application</title>
</head>
<body>
<table border="0" width="100%" height="100%">
<colgroup>
<col width="10%">
<col width="80%">
<col width="10%">
</colgroup>
<!-- Kopfbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="center" colspan="3"><b>Show CD list</b></td>
</tr>
<!-- Hauptbereich -->
<tr>
<!-- Linker Navigationsbereich -->
<td bgcolor="orange" valign="top" width="100">
<% out.println(com.peetz.medien.navigation.MenuLinks.getInstance().toString()); %>
</td>
<td bgcolor="lightyellow" valign="top">
<%-- create a html form --%>
<html:form action="cdEdit">
<%-- print out the form data --%>
<table border="1">
<tbody>
<tr>
<td>Category:</td>
<td><html:text property="category" /></td>
</tr>
<tr>
<td>Album:</td>
<td><html:text property="album" /></td>
</tr>
<tr>
<td>Artist:</td>
<td><html:text property="artist" /></td>
</tr>
</tbody>
</table>
<%-- set the parameter for the dispatch action --%>
<html:hidden property="do" value="saveCD" />
<br>
<%-- submit and back button --%>
<html:button property="back"
onclick="history.back();">
Back
</html:button>
&nbsp;
<html:submit>Save</html:submit>
</html:form>
</td>
<!-- Rechter Navigationsbereich -->
<td bgcolor="orange" with="15%">&nbsp;</td>
</tr>
<!-- Fussbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="right" colspan="3">
<p>Ingenieurb&uuml;ro Thomas Peetz</p>
</td>
</tr>
</table>
</body>
</html:html>
@@ -0,0 +1,75 @@
<%@ page language="java"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<html:html locale="true">
<head>
<html:base />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Medien Application</title>
</head>
<body>
<table border="0" width="100%" height="100%">
<colgroup>
<col width="10%">
<col width="80%">
<col width="10%">
</colgroup>
<!-- Kopfbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="center" colspan="3"><b>Show CD list</b></td>
</tr>
<!-- Hauptbereich -->
<tr>
<!-- Linker Navigationsbereich -->
<td bgcolor="orange" valign="top" width="100">
<% out.println(com.peetz.medien.navigation.MenuLinks.getInstance().toString()); %>
</td>
<td bgcolor="lightyellow" valign="top">
<%-- create a html form --%>
<html:form action="cdEdit">
<%-- print out the form data --%>
<table border="1">
<tbody>
<tr>
<td>Category:</td>
<td><html:text property="category" /></td>
</tr>
<tr>
<td>Album:</td>
<td><html:text property="album" /></td>
</tr>
<tr>
<td>Artist:</td>
<td><html:text property="artist" /></td>
</tr>
</tbody>
</table>
<%-- set the parameter for the dispatch action --%>
<html:hidden property="do" value="saveCD" />
<br>
<%-- submit and back button --%>
<html:button property="back"
onclick="history.back();">
Back
</html:button>
&nbsp;
<html:submit>Save</html:submit>
</html:form>
</td>
<!-- Rechter Navigationsbereich -->
<td bgcolor="orange" with="15%">&nbsp;</td>
</tr>
<!-- Fussbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="right" colspan="3">
<p>Ingenieurb&uuml;ro Thomas Peetz</p>
</td>
</tr>
</table>
</body>
</html:html>
@@ -0,0 +1,94 @@
<%@ page language="java"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<html:html locale="true">
<head>
<html:base />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Medien Application</title>
</head>
<body>
<table border="0" width="100%" height="100%">
<colgroup>
<col width="10%">
<col width="80%">
<col width="10%">
</colgroup>
<!-- Kopfbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="center" colspan="3"><b>Show CD list</b></td>
</tr>
<!-- Hauptbereich -->
<tr>
<!-- Linker Navigationsbereich -->
<td bgcolor="orange" valign="top" width="100">
<% out.println(com.peetz.medien.navigation.MenuLinks.getInstance().toString()); %>
</td>
<td bgcolor="lightyellow" valign="top">
<table border="1">
<tbody>
<%-- set the header --%>
<tr>
<td>Category</td>
<td>Album title</td>
<td>Artist</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<%-- check if book exists and display message or iterate over cds --%>
<logic:empty name="cdListForm" property="cdViews">
<tr>
<td colspan="5">No CDs available</td>
</tr>
</logic:empty>
<logic:notEmpty name="cdListForm" property="cdViews">
<logic:iterate name="cdListForm" property="cdViews" id="cd">
<tr>
<%-- print out the book informations --%>
<td><bean:write name="cd" property="category" /></td>
<td><bean:write name="cd" property="album" /></td>
<td><bean:write name="cd" property="artist" /></td>
<%-- print out the edit and delete link for each CD --%>
<td><html:link action="cdEdit.do?do=editCD" paramName="cd"
paramProperty="id" paramId="id">Edit</html:link></td>
<td><html:link action="cdEdit.do?do=deleteCD" paramName="cd"
paramProperty="id" paramId="id">Delete</html:link></td>
</tr>
</logic:iterate>
</logic:notEmpty>
<%-- end interate --%>
<%-- if cds cannot be found display a text --%>
<logic:notPresent name="cd">
<tr>
<td colspan="5">No CDs found.</td>
</tr>
</logic:notPresent>
</tbody>
</table>
<br>
<%-- add and back to menu button --%>
<html:button property="add" onclick="location.href='../cdEdit.do?do=addCD'">Add a new CD
</html:button>
&nbsp;
<html:button property="back" onclick="location.href='default.do'">Back to menu
</html:button>
</td>
<!-- Rechter Navigationsbereich -->
<td bgcolor="orange" with="15%">&nbsp;</td>
</tr>
<!-- Fussbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="right" colspan="3">
<p>Ingenieurb&uuml;ro Thomas Peetz</p>
</td>
</tr>
</table>
</body>
</html:html>
@@ -0,0 +1,67 @@
<%@ page language="java"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<html:html locale="true">
<head>
<html:base />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Medien Application</title>
</head>
<body>
<table border="0" width="100%" height="100%">
<colgroup>
<col width="10%">
<col width="80%">
<col width="10%">
</colgroup>
<!-- Kopfbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="center" colspan="3"><b>Show CD list</b></td>
</tr>
<!-- Hauptbereich -->
<tr>
<!-- Linker Navigationsbereich -->
<td bgcolor="orange" valign="top" width="100">
<% out.println(com.peetz.medien.navigation.MenuLinks.getInstance().toString()); %>
</td>
<td bgcolor="lightyellow" valign="top">
<%-- create a html form --%>
<html:form action="dvdEdit">
<%-- print out the form data --%>
<table border="1">
<tbody>
<tr>
<td>Film:</td>
<td><html:text property="title" /></td>
</tr>
</tbody>
</table>
<%-- set the parameter for the dispatch action --%>
<html:hidden property="do" value="saveDVD" />
<br>
<%-- submit and back button --%>
<html:button property="back"
onclick="history.back();">
Back
</html:button>
&nbsp;
<html:submit>Save</html:submit>
</html:form>
</td>
<!-- Rechter Navigationsbereich -->
<td bgcolor="orange" with="15%">&nbsp;</td>
</tr>
<!-- Fussbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="right" colspan="3">
<p>Ingenieurb&uuml;ro Thomas Peetz</p>
</td>
</tr>
</table>
</body>
</html:html>
@@ -0,0 +1,69 @@
<%@ page language="java"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<html:html locale="true">
<head>
<html:base />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Medien Application</title>
</head>
<body>
<table border="0" width="100%" height="100%">
<colgroup>
<col width="10%">
<col width="80%">
<col width="10%">
</colgroup>
<!-- Kopfbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="center" colspan="3"><b>Show CD list</b></td>
</tr>
<!-- Hauptbereich -->
<tr>
<!-- Linker Navigationsbereich -->
<td bgcolor="orange" valign="top" width="100">
<% out.println(com.peetz.medien.navigation.MenuLinks.getInstance().toString()); %>
</td>
<td bgcolor="lightyellow" valign="top">
<%-- create a html form --%>
<html:form action="dvdEdit">
<%-- print out the form data --%>
<table border="1">
<tbody>
<tr>
<td>Film:</td>
<td><html:text property="title" /></td>
</tr>
</tbody>
</table>
<%-- hidden fields for id and userId --%>
<html:hidden property="id" />
<%-- set the parameter for the dispatch action --%>
<html:hidden property="do" value="saveDVD" />
<br>
<%-- submit and back button --%>
<html:button property="back"
onclick="history.back();">
Back
</html:button>
&nbsp;
<html:submit>Save</html:submit>
</html:form>
</td>
<!-- Rechter Navigationsbereich -->
<td bgcolor="orange" with="15%">&nbsp;</td>
</tr>
<!-- Fussbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="right" colspan="3">
<p>Ingenieurb&uuml;ro Thomas Peetz</p>
</td>
</tr>
</table>
</body>
</html:html>
@@ -0,0 +1,90 @@
<%@ page language="java"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<html:html locale="true">
<head>
<html:base />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Medien Application</title>
</head>
<body>
<table border="0" width="100%" height="100%">
<colgroup>
<col width="10%">
<col width="80%">
<col width="10%">
</colgroup>
<!-- Kopfbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="center" colspan="3"><b>Show DVD list</b></td>
</tr>
<!-- Hauptbereich -->
<tr>
<!-- Linker Navigationsbereich -->
<td bgcolor="orange" valign="top" width="100">
<% out.println(com.peetz.medien.navigation.MenuLinks.getInstance().toString()); %>
</td>
<td bgcolor="lightyellow" valign="top">
<table border="1">
<tbody>
<%-- set the header --%>
<tr>
<td>DVD title</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<%-- check if book exists and display message or iterate over books --%>
<logic:empty name="dvdListForm" property="dvdViews">
<tr>
<td colspan="5">No DVDs available</td>
</tr>
</logic:empty>
<logic:notEmpty name="dvdListForm" property="dvdViews">
<logic:iterate name="dvdListForm" property="dvdViews" id="dvd">
<tr>
<%-- print out the DVD informations --%>
<td><bean:write name="dvd" property="title" /></td>
<%-- print out the edit and delete link for each DVD --%>
<td><html:link action="dvdEdit.do?do=editDVD" paramName="dvd"
paramProperty="id" paramId="id">Edit</html:link></td>
<td><html:link action="dvdEdit.do?do=deleteDVD" paramName="dvd"
paramProperty="id" paramId="id">Delete</html:link></td>
</tr>
</logic:iterate>
</logic:notEmpty>
<%-- end interate --%>
<%-- if dvds cannot be found display a text --%>
<logic:notPresent name="dvd">
<tr>
<td colspan="5">No DVDs found.</td>
</tr>
</logic:notPresent>
</tbody>
</table>
<br>
<%-- add and back to menu button --%>
<html:button property="add" onclick="location.href='../dvdEdit.do?do=addDVD'">Add a new DVD
</html:button>
&nbsp;
<html:button property="back" onclick="location.href='default.do'">Back to menu
</html:button>
</td>
<!-- Rechter Navigationsbereich -->
<td bgcolor="orange" with="15%">&nbsp;</td>
</tr>
<!-- Fussbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="right" colspan="3">
<p>Ingenieurb&uuml;ro Thomas Peetz</p>
</td>
</tr>
</table>
</body>
</html:html>
@@ -0,0 +1,58 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
<head>
<html:base />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Medien Application</title>
</head>
<body>
<table border="0" width="100%" height="100%" cellpadding="5">
<colgroup>
<col width="10%">
<col width="80%">
<col width="10%">
</colgroup>
<!-- Kopfbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="center" colspan="3"><b>Medien Manager (CD, DVD)</b></td>
</tr>
<!-- Hauptbereich -->
<tr>
<!-- Linker Navigationsbereich -->
<td bgcolor="orange" valign="top" width="100">
<% out.println(com.peetz.medien.navigation.MenuLinks.getInstance().toString()); %>
</td>
<td bgcolor="lightyellow" valign="top">
<p>Medien Manager</p>
<p><html:link action="cdList">CD Liste</html:link></p>
<p>Import CD List</p>
<html:form action="importCD" method="post" enctype="multipart/form-data">
<html:file property="dataFile"></html:file>
<html:submit>Import CDs</html:submit>
</html:form>
<p><html:link action="dvdList">DVD Liste</html:link></p>
<p>Import DVD List</p>
<html:form action="importDVD" method="post" enctype="multipart/form-data">
<html:file property="dataFile"></html:file>
<html:submit>Import DVDs</html:submit>
</html:form>
</td>
<!-- Rechter Navigationsbereich -->
<td bgcolor="orange" with="15%">&nbsp;</td>
</tr>
<!-- Fussbereich -->
<tr bgcolor="lightgrey" height="10%">
<td align="right" colspan="3">
<p>Ingenieurb&uuml;ro Thomas Peetz</p>
</td>
</tr>
</table>
</body>
</html:html>