diff --git a/nb-configuration.xml b/nb-configuration.xml new file mode 100644 index 0000000..0a6f886 --- /dev/null +++ b/nb-configuration.xml @@ -0,0 +1,30 @@ + + + + + + + 1.5 + WildFly + true + apache20 + /less:/css + false + false + + + /scss:/css + js/libs + false + + diff --git a/nb_jr_remoting.cfg b/nb_jr_remoting.cfg new file mode 100644 index 0000000..2c9de9c --- /dev/null +++ b/nb_jr_remoting.cfg @@ -0,0 +1,8 @@ + + + + false + 200 + true + {"syncEnabled":"false","serverAuthenticationPassword":"","httpBasicAuthenticationUser":"","httpBasicAuthenticationPassword":"","useServerAuthentication":"false","deleteFilesOnServer":"true","useHttpBasicAuthentication":"false","url":"http:\/\/127.0.0.1"} + diff --git a/nbactions.xml b/nbactions.xml new file mode 100644 index 0000000..3c2e308 --- /dev/null +++ b/nbactions.xml @@ -0,0 +1,61 @@ + + + + run + + war + ear + ejb + + + package + + + true + main.action + + + + debug + + war + ear + ejb + + + package + + + true + true + main.action + + + + profile + + ejb + ear + war + + + package + + + true + true + main.action + + + + rebuild + + * + + + clean + install + + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..976c5cd --- /dev/null +++ b/pom.xml @@ -0,0 +1,112 @@ + + 4.0.0 + + it.jee_book + JakiWiki + war + 1.0-SNAPSHOT + + JakiWiki + http://maven.apache.org + + + + java.net2 + http://download.java.net/maven/2/ + + + + + + javax.servlet + servlet-api + 2.5 + provided + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + org.apache.commons + commons-lang3 + 3.4 + + + org.eclipse.persistence + eclipselink + 2.5.2 + provided + + + org.hibernate + hibernate-entitymanager + 4.3.1.Final + + + org.hibernate.javax.persistence + hibernate-jpa-2.1-api + 1.0.0.Final + + + + mysql + mysql-connector-java + 6.0.2 + + + org.seleniumhq.selenium + selenium-java + test + 2.44.0 + + + com.opera + operadriver + test + 1.5 + + + org.seleniumhq.selenium + selenium-remote-driver + + + + + junit + junit + test + 4.11 + + + javaee + javaee-api + 5 + provided + + + it.jee_book + JakiWiki + 1.0-SNAPSHOT + war + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + 1.5 + 1.5 + true + + + + + diff --git a/src/main/java/it/jee_book/jakiwiki/actions/ListaPagineAction.java b/src/main/java/it/jee_book/jakiwiki/actions/ListaPagineAction.java new file mode 100644 index 0000000..c9df887 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/actions/ListaPagineAction.java @@ -0,0 +1,50 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.actions; + +import it.jee_book.jakiwiki.business.pagine.PaginaManager; +import it.jee_book.jakiwiki.business.pagine.PaginaManagerDelegate; +import it.jee_book.jakiwiki.context.ContextObjectFactory; +import it.jee_book.jakiwiki.context.RequestObject; +import it.jee_book.jakiwiki.context.ResponseAndView; +import it.jee_book.jakiwiki.context.ResponseObject; +import it.jee_book.jakiwiki.controller.action.Action; + +/** + * + * @author Fabio Scotto di Santolo + */ +class ListaPagineAction implements Action { + + private PaginaManager paginaManager = new PaginaManagerDelegate(); + + @Override + public ResponseAndView createResponseAndView(RequestObject requestObject) { + ResponseObject response = ContextObjectFactory.getResponseObject(); + String tipoRichiesta = (String) requestObject.getValue("tipo_richiesta"); + + if ("tutte".equals(tipoRichiesta)) { + response.setValue("intestazione", "Tutte le pagine"); + response.setValue("lista", paginaManager.elencaPagine()); + } else { + response.setValue("intestazione", "Ultime pagine modificate"); + response.setValue("lista", paginaManager.elencaPagineRecenti()); + } + + return new ResponseAndView(response, "list"); + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/actions/ModificaPaginaAction.java b/src/main/java/it/jee_book/jakiwiki/actions/ModificaPaginaAction.java new file mode 100644 index 0000000..33a2c4d --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/actions/ModificaPaginaAction.java @@ -0,0 +1,45 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.actions; + +import it.jee_book.jakiwiki.business.pagine.PaginaManager; +import it.jee_book.jakiwiki.business.pagine.PaginaManagerDelegate; +import it.jee_book.jakiwiki.context.ContextObjectFactory; +import it.jee_book.jakiwiki.context.RequestObject; +import it.jee_book.jakiwiki.context.ResponseAndView; +import it.jee_book.jakiwiki.context.ResponseObject; +import it.jee_book.jakiwiki.controller.action.Action; +import it.jee_book.jakiwiki.exception.JakiWikiException; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class ModificaPaginaAction implements Action { + + private PaginaManager paginaManager = new PaginaManagerDelegate(); + + public ResponseAndView createResponseAndView(RequestObject requestObject) throws JakiWikiException { + ResponseObject response = ContextObjectFactory.getResponseObject(); + String titolo = (String) requestObject.getValue("titolo"); + + response.setValue("titolo", titolo); + response.setValue("contenuto", paginaManager.leggi(titolo)); + + return new ResponseAndView(response, "edit"); + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/actions/PulsantieraAction.java b/src/main/java/it/jee_book/jakiwiki/actions/PulsantieraAction.java new file mode 100644 index 0000000..0473826 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/actions/PulsantieraAction.java @@ -0,0 +1,59 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.actions; + +import it.jee_book.jakiwiki.context.RequestObject; +import it.jee_book.jakiwiki.context.ResponseAndView; +import it.jee_book.jakiwiki.controller.action.Action; +import it.jee_book.jakiwiki.exception.JakiWikiException; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class PulsantieraAction implements Action { + + private final String PRINCIPALE = "principale"; + private final String RECENTI = "recenti"; + private final String TUTTE = "tutte"; + private final String EMAIL = "email"; + private final String CONFIGURA = "configura"; + + @Override + public ResponseAndView createResponseAndView(RequestObject requestObject) throws JakiWikiException { + + if (requestObject.getValue(PRINCIPALE) != null) { + requestObject.setValue("titolo", null); + return new VediPaginaAction().createResponseAndView(requestObject); + } + + if (requestObject.getValue(TUTTE) != null) { + requestObject.setValue("tipo_richiesta", "tutte"); + return new ListaPagineAction().createResponseAndView(requestObject); + } + + if (requestObject.getValue(RECENTI) != null) { + requestObject.setValue("tipo_richiesta", "recenti"); + return new ListaPagineAction().createResponseAndView(requestObject); + } + + if (requestObject.getValue(EMAIL) != null) { + return new ResponseAndView(null, "email"); + } + + throw new JakiWikiException("Action non valida"); + } +} diff --git a/src/main/java/it/jee_book/jakiwiki/actions/VediPaginaAction.java b/src/main/java/it/jee_book/jakiwiki/actions/VediPaginaAction.java new file mode 100644 index 0000000..ff901de --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/actions/VediPaginaAction.java @@ -0,0 +1,51 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.actions; + +import it.jee_book.jakiwiki.business.pagine.PaginaManager; +import it.jee_book.jakiwiki.business.pagine.PaginaManagerDelegate; +import it.jee_book.jakiwiki.context.RequestObject; +import it.jee_book.jakiwiki.context.ResponseAndView; +import it.jee_book.jakiwiki.context.ResponseObject; +import it.jee_book.jakiwiki.controller.action.Action; +import it.jee_book.jakiwiki.model.Pagina; +import it.jee_book.jakiwiki.utils.TextConverter; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class VediPaginaAction implements Action { + + private PaginaManager paginaManager = new PaginaManagerDelegate(); + + @Override + public ResponseAndView createResponseAndView(RequestObject requestObject) { + ResponseObject response = new ResponseObject(); + String titolo = (String) requestObject.getValue("titolo"); + + if (titolo == null) { + titolo = "PaginaPrincipale"; + } + + Pagina pagina = paginaManager.leggi(titolo); + response.setValue("titolo", titolo); + response.setValue("contenuto", TextConverter.convert(pagina.getContenuto())); + + return new ResponseAndView(response, "main"); + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/business/AbstractDelegate.java b/src/main/java/it/jee_book/jakiwiki/business/AbstractDelegate.java new file mode 100644 index 0000000..940df21 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/business/AbstractDelegate.java @@ -0,0 +1,52 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.business; + +import it.jee_book.jakiwiki.exception.JakiWikiException; +import javax.naming.InitialContext; + +/** + * + * @author Fabio Scotto di Santolo + */ +public abstract class AbstractDelegate { + + /** + * In ogni delegato è necessario implementare questo metodo in modo che + * ritorni il nome jndi del servizio. + * + * @return il nome del servizio + */ + protected abstract String getServiceName(); + + /** + * Accede al servizio + * + * @return + */ + protected Object getService() throws JakiWikiException { + InitialContext context; + + try { + context = new InitialContext(); + Object lookup = context.lookup(getServiceName()); + return lookup; + } catch (Exception e) { + throw new JakiWikiException(JakiWikiException.SERVICE_CONNECTION_ERROR, "Non esiste il servizio denominato " + + getServiceName(), e); + } + } +} diff --git a/src/main/java/it/jee_book/jakiwiki/business/email/EmailManager.java b/src/main/java/it/jee_book/jakiwiki/business/email/EmailManager.java new file mode 100644 index 0000000..87e2396 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/business/email/EmailManager.java @@ -0,0 +1,36 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.business.email; + +import javax.ejb.Local; + +/** + * + * @author Fabio Scotto di Santolo + */ +@Local +public interface EmailManager { + + /** + * + * @param mittente + * @param destinatario + * @param commento + * @param titolo + */ + public void sendEmail(String mittente, String destinatario, String commento, String titolo); + +} diff --git a/src/main/java/it/jee_book/jakiwiki/business/email/EmailManagerDelegate.java b/src/main/java/it/jee_book/jakiwiki/business/email/EmailManagerDelegate.java new file mode 100644 index 0000000..a8fc7b9 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/business/email/EmailManagerDelegate.java @@ -0,0 +1,42 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.business.email; + +import it.jee_book.jakiwiki.business.AbstractDelegate; +import it.jee_book.jakiwiki.exception.JakiWikiException; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class EmailManagerDelegate extends AbstractDelegate implements EmailManager { + + @Override + protected String getServiceName() { + return "java:global/JakiWiki/EmailManager"; + } + + public void sendEmail(String mittente, String destinatario, String commento, String titolo) { + try { + ((EmailManager) getService()).sendEmail(mittente, destinatario, commento, titolo); + } catch (JakiWikiException ex) { + Logger.getLogger(EmailManagerDelegate.class.getName()).log(Level.SEVERE, null, ex); + } + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/business/email/EmailManagerImplementation.java b/src/main/java/it/jee_book/jakiwiki/business/email/EmailManagerImplementation.java new file mode 100644 index 0000000..3dfc818 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/business/email/EmailManagerImplementation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.business.email; + +import it.jee_book.jakiwiki.integration.dao.PaginaDao; +import it.jee_book.jakiwiki.integration.mail.EmailIntegrator; +import it.jee_book.jakiwiki.model.Pagina; +import javax.ejb.EJB; +import javax.ejb.Stateless; + +/** + * + * @author Fabio Scotto di Santolo + */ +@Stateless +public class EmailManagerImplementation implements EmailManager { + + @EJB + private EmailIntegrator emailIntegrator; + + @EJB + private PaginaDao dao; + + public void sendEmail(String mittente, String destinatario, String commento, String titolo) { + Pagina pagina = dao.leggi(titolo); + emailIntegrator.sendEmail(mittente, destinatario, commento, pagina); + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/business/pagine/PaginaManager.java b/src/main/java/it/jee_book/jakiwiki/business/pagine/PaginaManager.java new file mode 100644 index 0000000..428f4d8 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/business/pagine/PaginaManager.java @@ -0,0 +1,60 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.business.pagine; + +import it.jee_book.jakiwiki.model.Pagina; +import java.util.List; +import javax.ejb.Local; + +/** + * + * @author Fabio Scotto di Santolo + */ +@Local +public interface PaginaManager { + + /** + * + * @param pagina + */ + public void save(Pagina pagina); + + /** + * + * @param titolo + */ + public void elimina(String titolo); + + /** + * + * @param titolo + * @return la pagina con che si chiama titolo + */ + public Pagina leggi(String titolo); + + /** + * + * @return l'elenco di tutte le pagine + */ + public List elencaPagine(); + + /** + * + * @return l'elenco di tutte le recenti pagine + */ + public List elencaPagineRecenti(); + +} diff --git a/src/main/java/it/jee_book/jakiwiki/business/pagine/PaginaManagerDelegate.java b/src/main/java/it/jee_book/jakiwiki/business/pagine/PaginaManagerDelegate.java new file mode 100644 index 0000000..171f0ab --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/business/pagine/PaginaManagerDelegate.java @@ -0,0 +1,82 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.business.pagine; + +import it.jee_book.jakiwiki.business.AbstractDelegate; +import it.jee_book.jakiwiki.exception.JakiWikiException; +import it.jee_book.jakiwiki.model.Pagina; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class PaginaManagerDelegate extends AbstractDelegate implements PaginaManager { + + @Override + protected String getServiceName() { + return "java:global/JakiWiki/PaginaManagerImplementation"; + } + + public void save(Pagina pagina) { + try { + ((PaginaManager) getService()).save(pagina); + } catch (JakiWikiException ex) { + Logger.getLogger(PaginaManagerDelegate.class.getName()).log(Level.SEVERE, null, ex); + } + } + + public void elimina(String titolo) { + try { + ((PaginaManager) getService()).elimina(titolo); + } catch (JakiWikiException ex) { + Logger.getLogger(PaginaManagerDelegate.class.getName()).log(Level.SEVERE, null, ex); + } + } + + public Pagina leggi(String titolo) { + try { + return ((PaginaManager) getService()).leggi(titolo); + } catch (JakiWikiException ex) { + Logger.getLogger(PaginaManagerDelegate.class.getName()).log(Level.SEVERE, null, ex); + } + + return null; + } + + public List elencaPagine() { + try { + ((PaginaManager) getService()).elencaPagine(); + } catch (JakiWikiException ex) { + Logger.getLogger(PaginaManagerDelegate.class.getName()).log(Level.SEVERE, null, ex); + } + + return null; + } + + public List elencaPagineRecenti() { + try { + return ((PaginaManager) getService()).elencaPagineRecenti(); + } catch (JakiWikiException ex) { + Logger.getLogger(PaginaManagerDelegate.class.getName()).log(Level.SEVERE, null, ex); + } + + return null; + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/business/pagine/PaginaManagerImplementation.java b/src/main/java/it/jee_book/jakiwiki/business/pagine/PaginaManagerImplementation.java new file mode 100644 index 0000000..dce91ca --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/business/pagine/PaginaManagerImplementation.java @@ -0,0 +1,65 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.business.pagine; + +import it.jee_book.jakiwiki.integration.dao.PaginaDao; +import it.jee_book.jakiwiki.model.Pagina; +import java.util.Date; +import java.util.List; +import javax.ejb.EJB; +import javax.ejb.Stateless; + +/** + * + * @author Fabio Scotto di Santolo + */ +@Stateless +public class PaginaManagerImplementation implements PaginaManager { + + @EJB + private PaginaDao dao; + + public void save(Pagina pagina) { + dao.salva(pagina); + } + + public void elimina(String titolo) { + Pagina pagina = leggi(titolo); + dao.elimina(pagina); + } + + public Pagina leggi(String titolo) { + Pagina p = dao.leggi(titolo); + + if (p == null) { + p = new Pagina(); + p.setTitolo(""); + p.setUltimaModifica(new Date()); + p.setContenuto("Questa è una nuova pagina"); + } + + return p; + } + + public List elencaPagine() { + return dao.elencaPagine(0); + } + + public List elencaPagineRecenti() { + return dao.elencaPagine(3); + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/context/ContextObjectFactory.java b/src/main/java/it/jee_book/jakiwiki/context/ContextObjectFactory.java new file mode 100644 index 0000000..bc5a3d9 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/context/ContextObjectFactory.java @@ -0,0 +1,64 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.context; + +import java.util.Enumeration; +import java.util.Iterator; +import java.util.Map; +import javax.servlet.http.HttpServletRequest; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class ContextObjectFactory { + + /** + * + * @param request + * @return + */ + public static RequestObject getRequestObject(HttpServletRequest request) { + + RequestObject ret = new RequestObject(); + String path = request.getServletPath().split(".action")[0]; + + if (path.startsWith("/")) { + path.substring(1); + } + + ret.setRequestCommand(path); + + // mappa i parametri della request + Map pMap = request.getParameterMap(); + for (Iterator listaParams = pMap.keySet().iterator(); listaParams.hasNext();) { + String key = (String) listaParams.next(); + ret.request.put(key, pMap.get(key)); + } + + // mappa i parametri della sessione + for (Enumeration listaSession = request.getSession().getAttributeNames(); listaSession.hasMoreElements();) { + String key = (String) listaSession.nextElement(); + ret.session.put(key, request.getSession().getAttribute(key)); + } + + return ret; + } + + public static ResponseObject getResponseObject() { + return new ResponseObject(); + } +} diff --git a/src/main/java/it/jee_book/jakiwiki/context/RequestObject.java b/src/main/java/it/jee_book/jakiwiki/context/RequestObject.java new file mode 100644 index 0000000..9afd2f3 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/context/RequestObject.java @@ -0,0 +1,89 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.context; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class RequestObject { + + protected Map request = new HashMap(); + protected Map session = new HashMap(); + + protected String requestCommand; + + /** + * Imposta una chiave-valore nella richiesta corrente + */ + public void setValue(String key, Object value) { + request.put(key, value); + } + + /** + * Imposta chiave-valore nella sessione corrente + */ + public void setValueInSession(String key, Object value) { + session.put(key, value); + } + + /** + * Ritorna il valore associato ad una chiave, cercandolo prima nell + * richiesta corrente e poi nella sessione. + */ + public Object getValue(String key) { + Object value = request.get(key); + + if (value == null) { + return value = session.get(key); + } + + if (value instanceof Object[]) { + value = ((Object[]) value)[0]; + } + + return value; + } + + /** + * Ritorna tutte le chiavi a cui sono associati dei valore nella richiesta + * corrente. + */ + public Set getRequestKeys() { + return request.keySet(); + } + + /** + * Ritorna tutte le chiavi a cui sono associati dei valori nella sessione + * corrente. + */ + public Set getSessionKeys() { + return session.keySet(); + } + + public String getRequestCommand() { + return requestCommand; + } + + public void setRequestCommand(String requestCommand) { + this.requestCommand = requestCommand; + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/context/ResponseAndView.java b/src/main/java/it/jee_book/jakiwiki/context/ResponseAndView.java new file mode 100644 index 0000000..eb6d783 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/context/ResponseAndView.java @@ -0,0 +1,48 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.context; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class ResponseAndView { + + protected String view; + protected ResponseObject responseObject; + + public ResponseAndView(ResponseObject responseObject, String viewName) { + this.view = viewName; + this.responseObject = responseObject; + } + + public String getView() { + return view; + } + + public void setView(String view) { + this.view = view; + } + + public ResponseObject getResponseObject() { + return responseObject; + } + + public void setResponseObject(ResponseObject responseObject) { + this.responseObject = responseObject; + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/context/ResponseObject.java b/src/main/java/it/jee_book/jakiwiki/context/ResponseObject.java new file mode 100644 index 0000000..b303c06 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/context/ResponseObject.java @@ -0,0 +1,89 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.context; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class ResponseObject { + + protected Map response = new HashMap(); + protected Map session = new HashMap(); + + protected String responseCommand; + + /** + * Imposta una chiave-valore nella richiesta corrente + */ + public void setValue(String key, Object value) { + response.put(key, value); + } + + /** + * Imposta chiave-valore nella sessione corrente + */ + public void setValueInSession(String key, Object value) { + session.put(key, value); + } + + /** + * Ritorna il valore associato ad una chiave, cercandolo prima nell + * richiesta corrente e poi nella sessione. + */ + public Object getValue(String key) { + Object value = response.get(key); + + if (value == null) { + return value = session.get(key); + } + + if (value instanceof Object[]) { + value = ((Object[]) value)[0]; + } + + return value; + } + + /** + * Ritorna tutte le chiavi a cui sono associati dei valore nella richiesta + * corrente. + */ + public Set getResponseKeys() { + return response.keySet(); + } + + /** + * Ritorna tutte le chiavi a cui sono associati dei valori nella sessione + * corrente. + */ + public Set getSessionKeys() { + return session.keySet(); + } + + public String getResponseCommand() { + return responseCommand; + } + + public void setResponseCommand(String responseCommand) { + this.responseCommand = responseCommand; + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/context/ViewDispatcher.java b/src/main/java/it/jee_book/jakiwiki/context/ViewDispatcher.java new file mode 100644 index 0000000..a0ae7e6 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/context/ViewDispatcher.java @@ -0,0 +1,71 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.context; + +import java.io.IOException; +import java.util.Iterator; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class ViewDispatcher { + + protected RequestDispatcher dispatcher; + + /** + * + * @param requestDispatcher + */ + public ViewDispatcher(RequestDispatcher requestDispatcher) { + dispatcher = requestDispatcher; + } + + /** + * + * @param request + * @param response + * @param responseAndView + * @throws ServletException + * @throws IOException + */ + public void forward(HttpServletRequest request, HttpServletResponse response, ResponseAndView responseAndView) + throws ServletException, IOException { + mergeDataRequest(request, responseAndView.getResponseObject()); + dispatcher.forward(request, response); + } + + private void mergeDataRequest(HttpServletRequest request, ResponseObject responseObject) { + + if (responseObject == null) { + return; + } + + for (Iterator listaParams = responseObject.getResponseKeys().iterator(); listaParams.hasNext();) { + String key = (String) listaParams.next(); + request.setAttribute(key, responseObject.getValue(key)); + } + + for (Iterator listaParams = responseObject.getSessionKeys().iterator(); listaParams.hasNext();) { + String key = (String) listaParams.next(); + request.getSession().setAttribute(key, responseObject.getValue(key)); + } + } +} diff --git a/src/main/java/it/jee_book/jakiwiki/controller/ActionFactory.java b/src/main/java/it/jee_book/jakiwiki/controller/ActionFactory.java new file mode 100644 index 0000000..c29c333 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/controller/ActionFactory.java @@ -0,0 +1,61 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.controller; + +import it.jee_book.jakiwiki.context.RequestObject; +import it.jee_book.jakiwiki.controller.action.Action; +import it.jee_book.jakiwiki.exception.JakiWikiException; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class ActionFactory { + + protected static Map actions = new HashMap(); + + /** + * + * @param requestObject + * @return + * @throws JakiWikiException + */ + public static Action createAction(RequestObject requestObject) throws JakiWikiException { + + String requestCommand = requestObject.getRequestCommand().substring(1); + Action action = (Action) actions.get(requestCommand); + + if (action == null) { + String actionClassName = Configuration.getAction(requestCommand); + + if (actionClassName == null) { + throw new JakiWikiException(JakiWikiException.ACTION_ERROR, "Non esiste nessuna action"); + } + + try { + action = (Action) Class.forName(actionClassName).newInstance(); + actions.put(requestCommand, action); + } catch (Throwable t) { + throw new JakiWikiException(JakiWikiException.ACTION_ERROR, actionClassName, t); + } + } + + return action; + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/controller/Configuration.java b/src/main/java/it/jee_book/jakiwiki/controller/Configuration.java new file mode 100644 index 0000000..24f04d4 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/controller/Configuration.java @@ -0,0 +1,66 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.controller; + +import java.io.FileInputStream; +import java.util.Properties; +import javax.servlet.ServletConfig; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class Configuration { + + protected static Properties views; + protected static Properties actions; + + /** + * + * @param config + */ + public static void init(ServletConfig config) { + String actionFile = config.getServletContext().getRealPath("WEB-INF/actions.properties"); + String viewsFile = config.getServletContext().getRealPath("WEB-INF/views.properties"); + views = new Properties(); + actions = new Properties(); + try { + views.load(new FileInputStream(viewsFile)); + actions.load(new FileInputStream(actionFile)); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * + * @param view + * @return + */ + public static String getViewPage(String view) { + return views.getProperty(view); + } + + /** + * + * @param action + * @return + */ + public static String getAction(String action) { + return actions.getProperty(action); + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/controller/action/Action.java b/src/main/java/it/jee_book/jakiwiki/controller/action/Action.java new file mode 100644 index 0000000..3b11f9c --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/controller/action/Action.java @@ -0,0 +1,36 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.controller.action; + +import it.jee_book.jakiwiki.context.RequestObject; +import it.jee_book.jakiwiki.context.ResponseAndView; +import it.jee_book.jakiwiki.exception.JakiWikiException; + +/** + * + * @author Fabio Scotto di Santolo + */ +public interface Action { + + /** + * + * @param requestObject + * @return + * @throws it.jee_book.jakiwiki.exception.JakiWikiException + */ + ResponseAndView createResponseAndView(RequestObject requestObject) throws JakiWikiException; + +} diff --git a/src/main/java/it/jee_book/jakiwiki/exception/JakiWikiException.java b/src/main/java/it/jee_book/jakiwiki/exception/JakiWikiException.java new file mode 100644 index 0000000..e06c0aa --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/exception/JakiWikiException.java @@ -0,0 +1,69 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.exception; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class JakiWikiException extends Throwable { + + public static final String ACTION_ERROR = "Azione errata"; + public static String SERVICE_CONNECTION_ERROR = "Errore di connessione al servizio"; + + private String error; + private String msg; + private Throwable exception; + + public JakiWikiException(String error, String msg) { + this(error, msg, null); + } + + public JakiWikiException(String error, String msg, Throwable exception) { + this.error = error; + this.msg = msg; + this.exception = exception; + } + + public JakiWikiException(String string) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public String getError() { + return error; + } + + public void setError(String error) { + this.error = error; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public Throwable getException() { + return exception; + } + + public void setException(Throwable exception) { + this.exception = exception; + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/integration/dao/PaginaDao.java b/src/main/java/it/jee_book/jakiwiki/integration/dao/PaginaDao.java new file mode 100644 index 0000000..c819950 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/integration/dao/PaginaDao.java @@ -0,0 +1,55 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.integration.dao; + +import it.jee_book.jakiwiki.model.Pagina; +import java.util.List; +import javax.ejb.Local; + +/** + * + * @author Fabio Scotto di Santolo + */ +@Local +public interface PaginaDao { + + /** + * + * @param pagina + */ + public void salva(Pagina pagina); + + /** + * + * @param pagina + */ + public void elimina(Pagina pagina); + + /** + * + * @param titolo + * @return + */ + public Pagina leggi(String titolo); + + /** + * + * @param maxRisultati + * @return + */ + public List elencaPagine(int maxRisultati); + +} diff --git a/src/main/java/it/jee_book/jakiwiki/integration/dao/PaginaDaoImplementation.java b/src/main/java/it/jee_book/jakiwiki/integration/dao/PaginaDaoImplementation.java new file mode 100644 index 0000000..4ffa37c --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/integration/dao/PaginaDaoImplementation.java @@ -0,0 +1,57 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.integration.dao; + +import it.jee_book.jakiwiki.model.Pagina; +import java.util.List; +import javax.ejb.Stateless; +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; +import javax.persistence.Query; + +/** + * + * @author Fabio Scotto di Santolo + */ +@Stateless +public class PaginaDaoImplementation implements PaginaDao { + + @PersistenceContext + private EntityManager entityManager; + + public void salva(Pagina pagina) { + entityManager.merge(pagina); + } + + public void elimina(Pagina pagina) { + entityManager.remove(pagina); + } + + public Pagina leggi(String titolo) { + return entityManager.find(Pagina.class, titolo); + } + + public List elencaPagine(int maxRisultati) { + Query query = entityManager.createQuery("SELECT p FROM Pagina p"); + + if (maxRisultati > 0) { + query.setMaxResults(3); + } + + return query.getResultList(); + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/integration/mail/EmailIntegrator.java b/src/main/java/it/jee_book/jakiwiki/integration/mail/EmailIntegrator.java new file mode 100644 index 0000000..bf3ffb8 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/integration/mail/EmailIntegrator.java @@ -0,0 +1,37 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.integration.mail; + +import it.jee_book.jakiwiki.model.Pagina; +import javax.ejb.Local; + +/** + * + * @author Fabio Scotto di Santolo + */ +@Local +public interface EmailIntegrator { + + /** + * + * @param mittente + * @param destinatario + * @param commento + * @param pagina + */ + public void sendEmail(String mittente, String destinatario, String commento, Pagina pagina); + +} diff --git a/src/main/java/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation.java b/src/main/java/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation.java new file mode 100644 index 0000000..313638b --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation.java @@ -0,0 +1,62 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.integration.mail; + +import it.jee_book.jakiwiki.model.Pagina; +import java.util.Properties; +import javax.ejb.Stateless; +import javax.mail.Authenticator; +import javax.mail.Message; +import javax.mail.PasswordAuthentication; +import javax.mail.Session; +import javax.mail.Transport; +import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeMessage; + +/** + * + * @author Fabio Scotto di Santolo + */ +@Stateless +public class EmailIntegratorImplementation implements EmailIntegrator { + + public void sendEmail(String mittente, String destinatario, String commento, Pagina pagina) { + Properties prop = new Properties(); + + Authenticator auth = new PasswordAuthenticator(); + Session session = Session.getDefaultInstance(prop, auth); + + MimeMessage message = new MimeMessage(session); + try { + message.setFrom(new InternetAddress(mittente)); + message.addRecipient(Message.RecipientType.TO, new InternetAddress(destinatario)); + message.setSubject(pagina.getTitolo()); + message.setText(pagina.getContenuto()); + Transport.send(message); + } catch (Exception e) { + e.printStackTrace(); + } + } + + private class PasswordAuthenticator extends Authenticator { + + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication("utente", "password"); + } + + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/model/Pagina.java b/src/main/java/it/jee_book/jakiwiki/model/Pagina.java new file mode 100644 index 0000000..94c27c0 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/model/Pagina.java @@ -0,0 +1,73 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.model; + +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +/** + * + * @author Fabio Scotto di Santolo + */ +@Entity +@Table(name = "PAGINE") +public class Pagina implements Serializable { + + @Id + @Column(name = "TITOLO", nullable = false) + @GeneratedValue(strategy = GenerationType.IDENTITY) + private String titolo; + + @Column(name = "CONTENUTO") + private String contenuto; + + @Column(name = "ULTIMA_MODIFICA") + @Temporal(TemporalType.DATE) + private Date ultimaModifica; + + public String getTitolo() { + return titolo; + } + + public void setTitolo(String titolo) { + this.titolo = titolo; + } + + public String getContenuto() { + return contenuto; + } + + public void setContenuto(String contenuto) { + this.contenuto = contenuto; + } + + public Date getUltimaModifica() { + return ultimaModifica; + } + + public void setUltimaModifica(Date ultimaModifica) { + this.ultimaModifica = ultimaModifica; + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/servlet/MainController.java b/src/main/java/it/jee_book/jakiwiki/servlet/MainController.java new file mode 100644 index 0000000..f15a127 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/servlet/MainController.java @@ -0,0 +1,126 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.servlet; + +import it.jee_book.jakiwiki.context.ContextObjectFactory; +import it.jee_book.jakiwiki.context.RequestObject; +import it.jee_book.jakiwiki.context.ResponseAndView; +import it.jee_book.jakiwiki.context.ViewDispatcher; +import it.jee_book.jakiwiki.controller.ActionFactory; +import it.jee_book.jakiwiki.controller.Configuration; +import it.jee_book.jakiwiki.controller.action.Action; +import it.jee_book.jakiwiki.exception.JakiWikiException; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class MainController extends HttpServlet { + + /** + * + * @param config + * @throws ServletException + */ + @Override + public void init(ServletConfig config) throws ServletException { + Configuration.init(config); + } + + /** + * Processes requests for both HTTP GET and POST + * methods. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void handleRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException, JakiWikiException { + RequestObject requestObject = ContextObjectFactory.getRequestObject(request); + Action action = ActionFactory.createAction(requestObject); + ResponseAndView responseObject = action.createResponseAndView(requestObject); + dispatchView(request, response, responseObject); + } + + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + try { + handleRequest(request, response); + } catch (JakiWikiException ex) { + Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex); + } + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + try { + handleRequest(request, response); + } catch (JakiWikiException ex) { + Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex); + } + } + + /** + * + * @param request + * @param response + * @param responseAndView + * @throws JakiWikiException + * @throws ServletException + * @throws IOException + */ + private void dispatchView(HttpServletRequest request, HttpServletResponse response, ResponseAndView responseAndView) throws JakiWikiException, ServletException, IOException { + String view = responseAndView.getView(); + + String resultPage = Configuration.getViewPage(view); + + if (resultPage == null) { + throw new JakiWikiException(JakiWikiException.ACTION_ERROR, "Non è configurata alcuna action con il nome: " + view); + } + + ViewDispatcher viewDispatcher = new ViewDispatcher(request.getRequestDispatcher(resultPage)); + viewDispatcher.forward(request, response, responseAndView); + } + +} diff --git a/src/main/java/it/jee_book/jakiwiki/tag/ListaPagine.java b/src/main/java/it/jee_book/jakiwiki/tag/ListaPagine.java new file mode 100644 index 0000000..2fcc106 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/tag/ListaPagine.java @@ -0,0 +1,64 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.tag; + +import it.jee_book.jakiwiki.model.Pagina; +import java.io.IOException; +import java.util.List; +import javax.servlet.jsp.JspException; +import javax.servlet.jsp.tagext.SimpleTagSupport; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class ListaPagine extends SimpleTagSupport { + + private List pagine; + + public List getPagine() { + return pagine; + } + + public void setPagine(List pagine) { + this.pagine = pagine; + } + + @Override + public void doTag() throws JspException, IOException { + if (getPagine() == null || getPagine().size() == 0) { + return; + } + + getJspContext().getOut().write("" + + ""); + + for (int i = 0; i < getPagine().size(); i++) { + Pagina pagina = (Pagina) getPagine().get(i); + String line = "\n"; + line += "\n"; + line += "\n"; + line += "\n"; + getJspContext().getOut().write(line); + } + getJspContext().getOut().write("
TitoloData ultima" + + " modifica
" + pagina.getTitolo() + + "" + pagina.getUltimaModifica() + "ModificaElimina
"); + } +} diff --git a/src/main/java/it/jee_book/jakiwiki/utils/TextConverter.java b/src/main/java/it/jee_book/jakiwiki/utils/TextConverter.java new file mode 100644 index 0000000..8296858 --- /dev/null +++ b/src/main/java/it/jee_book/jakiwiki/utils/TextConverter.java @@ -0,0 +1,73 @@ +/* + * Copyright 2016 Fabio Scotto di Santolo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.jee_book.jakiwiki.utils; + +/** + * + * @author Fabio Scotto di Santolo + */ +public class TextConverter { + + /** + * Converte il testo inserito dall'utente in sintassi wiki + * + * @param input + * @return + */ + public static String convert(String input) { + + // sostituisce gli a capo con
+ input = input.replaceAll("\n", "
"); + + // crea la wiki-syntax + String[] tokens = input.split(" "); + for (int i = 0; i < tokens.length; i++) { + if (isWikiWord(tokens[i])) { + tokens[i] = creaLink(tokens[i]); + } + } + + return componiToken(tokens); + } + + private static boolean isWikiWord(String word) { + if (word == null || word.length() < 4) { + return false; + } + + if (Character.isUpperCase(word.charAt(0)) && Character.isLowerCase(word.charAt(1)) + && !(word.substring(2).toLowerCase().equals(word.substring(2)))) { + return true; + } + + return false; + } + + private static String componiToken(String[] tokens) { + String output = ""; + + for (int i = 0; i < tokens.length; i++) { + output += tokens[i] + " "; + } + + return output; + } + + private static String creaLink(String word) { + return "" + word + ""; + } + +} diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000..db758ad --- /dev/null +++ b/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,8 @@ + + + + org.hibernate.ejb.HibernatePersistence + java:jboss/datasources/ExampleDS + it.jee_book.jakiwiki.model.Pagina + + diff --git a/src/main/webapp/META-INF/context.xml b/src/main/webapp/META-INF/context.xml new file mode 100644 index 0000000..95a37dd --- /dev/null +++ b/src/main/webapp/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/src/main/webapp/WEB-INF/actions.properties b/src/main/webapp/WEB-INF/actions.properties new file mode 100644 index 0000000..2cd53c1 --- /dev/null +++ b/src/main/webapp/WEB-INF/actions.properties @@ -0,0 +1,9 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +main=it.jee_book.jakiwiki.actions.VediPaginaAction +edit=it.jee_book.jakiwiki.actions.ModificaPaginaAction +pulsantiera=it.jee_book.jakiwiki.actions.PulsantieraAction +salva-pagina=it.jee_book.jakiwiki.actions.SalvaPaginaAction +invia-mail=it.jee_book.jakiwiki.actions.InviaMailAction \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jakiwiki.tld b/src/main/webapp/WEB-INF/jakiwiki.tld new file mode 100644 index 0000000..e2d7f24 --- /dev/null +++ b/src/main/webapp/WEB-INF/jakiwiki.tld @@ -0,0 +1,21 @@ + + + + + + 1.0 + 2.0 + JakiWiki taglibs + + + lista_pagine + it.jee_book.jakiwiki.tag.ListaPagine + + pagine + true + true + + + + diff --git a/src/main/webapp/WEB-INF/jboss-web.xml b/src/main/webapp/WEB-INF/jboss-web.xml new file mode 100644 index 0000000..c60e098 --- /dev/null +++ b/src/main/webapp/WEB-INF/jboss-web.xml @@ -0,0 +1,4 @@ + + + /JakiWiki + diff --git a/src/main/webapp/WEB-INF/views.properties b/src/main/webapp/WEB-INF/views.properties new file mode 100644 index 0000000..5c2f2c1 --- /dev/null +++ b/src/main/webapp/WEB-INF/views.properties @@ -0,0 +1,8 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +main=WEB-INF/views/main.jsp +edit=WEB-INF/views/edit.jsp +list=WEB-INF/views/list.jsp +email=WEB-INF/views/email.jsp \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/edit.jsp b/src/main/webapp/WEB-INF/views/edit.jsp new file mode 100644 index 0000000..bf7d8a2 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/edit.jsp @@ -0,0 +1,43 @@ +<%-- + Document : edit + Created on : 25-mag-2016, 21.15.50 + Author : morgoth +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + + + JakiWiki: Modifica di ${titolo} + + +
+ JakiWiki: modifica '${titolo}' +
+ + + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + diff --git a/src/main/webapp/WEB-INF/views/fragments/pulsantiera.jsp b/src/main/webapp/WEB-INF/views/fragments/pulsantiera.jsp new file mode 100644 index 0000000..eec140f --- /dev/null +++ b/src/main/webapp/WEB-INF/views/fragments/pulsantiera.jsp @@ -0,0 +1,29 @@ +<%-- + Document : pulsantiera + Created on : 22-mag-2016, 15.54.39 + Author : morgoth +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + + + + JSP Page + + +
+ + + + + +
+
+
+ JakiWiki - a cool Java Wiki +
+ + diff --git a/src/main/webapp/WEB-INF/views/list.jsp b/src/main/webapp/WEB-INF/views/list.jsp new file mode 100644 index 0000000..0fde814 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/list.jsp @@ -0,0 +1,35 @@ +<%-- + Document : list + Created on : 25-mag-2016, 21.57.11 + Author : morgoth +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@taglib uri="/WEB-INF/jakiwiki.tld" prefix="jakiwiki" %> + + + + + JakiWiki: ${intestazione} + + +
+ JakiWiki: ${intestazione} +
+ + + + + + + + +
+ +
+
+ +
+ + diff --git a/src/main/webapp/WEB-INF/views/main.jsp b/src/main/webapp/WEB-INF/views/main.jsp new file mode 100644 index 0000000..497c1d4 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/main.jsp @@ -0,0 +1,45 @@ +<%-- + Document : main + Created on : 22-mag-2016, 15.37.31 + Author : morgoth +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + + + + JakiWiki: ${titolo} + + + +
+ JakiWiki: ${titolo} +
+ + + + + + + + + + + +
+
+ + +
+
+ +
+
+ +
+ + diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..d6bf9ff --- /dev/null +++ b/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,28 @@ + + + JakiWiki + JakiWiki, un wiki in Java + + + MainController + it.jee_book.jakiwiki.servlet.MainController + + + + MainController + *.action + + + + ejb/PaginaManager + Session + it.jee_book.jakiwiki.business.pagine.PaginaManager + + + + ejb/EmailManager + Session + it.jee_book.jakiwiki.business.email.EmailManager + + + diff --git a/target/JakiWiki-1.0-SNAPSHOT.war b/target/JakiWiki-1.0-SNAPSHOT.war new file mode 100644 index 0000000..28fe279 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT.war differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/META-INF/context.xml b/target/JakiWiki-1.0-SNAPSHOT/META-INF/context.xml new file mode 100644 index 0000000..95a37dd --- /dev/null +++ b/target/JakiWiki-1.0-SNAPSHOT/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/actions.properties b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/actions.properties new file mode 100644 index 0000000..2cd53c1 --- /dev/null +++ b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/actions.properties @@ -0,0 +1,9 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +main=it.jee_book.jakiwiki.actions.VediPaginaAction +edit=it.jee_book.jakiwiki.actions.ModificaPaginaAction +pulsantiera=it.jee_book.jakiwiki.actions.PulsantieraAction +salva-pagina=it.jee_book.jakiwiki.actions.SalvaPaginaAction +invia-mail=it.jee_book.jakiwiki.actions.InviaMailAction \ No newline at end of file diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/.netbeans_automatic_build b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/META-INF/persistence.xml b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/META-INF/persistence.xml new file mode 100644 index 0000000..db758ad --- /dev/null +++ b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/META-INF/persistence.xml @@ -0,0 +1,8 @@ + + + + org.hibernate.ejb.HibernatePersistence + java:jboss/datasources/ExampleDS + it.jee_book.jakiwiki.model.Pagina + + diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/actions/ListaPagineAction.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/actions/ListaPagineAction.class new file mode 100644 index 0000000..3a99c4c Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/actions/ListaPagineAction.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/actions/ModificaPaginaAction.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/actions/ModificaPaginaAction.class new file mode 100644 index 0000000..a108699 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/actions/ModificaPaginaAction.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/actions/PulsantieraAction.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/actions/PulsantieraAction.class new file mode 100644 index 0000000..561fd3b Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/actions/PulsantieraAction.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/actions/VediPaginaAction.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/actions/VediPaginaAction.class new file mode 100644 index 0000000..fd298a3 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/actions/VediPaginaAction.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/AbstractDelegate.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/AbstractDelegate.class new file mode 100644 index 0000000..6e3ea51 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/AbstractDelegate.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManager.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManager.class new file mode 100644 index 0000000..566cca2 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManager.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManagerDelegate.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManagerDelegate.class new file mode 100644 index 0000000..f52b548 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManagerDelegate.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManagerImplementation.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManagerImplementation.class new file mode 100644 index 0000000..664d79c Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManagerImplementation.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManager.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManager.class new file mode 100644 index 0000000..2e21983 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManager.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerDelegate.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerDelegate.class new file mode 100644 index 0000000..ca747c7 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerDelegate.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerImplementation.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerImplementation.class new file mode 100644 index 0000000..d2a94cd Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerImplementation.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/ContextObjectFactory.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/ContextObjectFactory.class new file mode 100644 index 0000000..9a254dc Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/ContextObjectFactory.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/RequestObject.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/RequestObject.class new file mode 100644 index 0000000..75d1b0b Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/RequestObject.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/ResponseAndView.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/ResponseAndView.class new file mode 100644 index 0000000..d43842f Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/ResponseAndView.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/ResponseObject.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/ResponseObject.class new file mode 100644 index 0000000..1e69468 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/ResponseObject.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/ViewDispatcher.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/ViewDispatcher.class new file mode 100644 index 0000000..b06b2c9 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/context/ViewDispatcher.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/controller/ActionFactory.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/controller/ActionFactory.class new file mode 100644 index 0000000..fb2f229 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/controller/ActionFactory.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/controller/Configuration.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/controller/Configuration.class new file mode 100644 index 0000000..07b0c12 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/controller/Configuration.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/controller/action/Action.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/controller/action/Action.class new file mode 100644 index 0000000..043281b Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/controller/action/Action.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/exception/JakiWikiException.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/exception/JakiWikiException.class new file mode 100644 index 0000000..cc09ada Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/exception/JakiWikiException.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/dao/PaginaDao.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/dao/PaginaDao.class new file mode 100644 index 0000000..0cafc11 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/dao/PaginaDao.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/dao/PaginaDaoImplementation.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/dao/PaginaDaoImplementation.class new file mode 100644 index 0000000..0f9ba30 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/dao/PaginaDaoImplementation.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegrator.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegrator.class new file mode 100644 index 0000000..65d275a Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegrator.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$1.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$1.class new file mode 100644 index 0000000..3327307 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$1.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$PasswordAuthenticator.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$PasswordAuthenticator.class new file mode 100644 index 0000000..c17dbd2 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$PasswordAuthenticator.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation.class new file mode 100644 index 0000000..21ce14d Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/model/Pagina.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/model/Pagina.class new file mode 100644 index 0000000..bf3d91c Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/model/Pagina.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/servlet/MainController.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/servlet/MainController.class new file mode 100644 index 0000000..8d8b954 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/servlet/MainController.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/tag/ListaPagine.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/tag/ListaPagine.class new file mode 100644 index 0000000..d3f4b4b Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/tag/ListaPagine.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/utils/TextConverter.class b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/utils/TextConverter.class new file mode 100644 index 0000000..5d6aa2f Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/classes/it/jee_book/jakiwiki/utils/TextConverter.class differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/glassfish-web.xml b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..13e0059 --- /dev/null +++ b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/glassfish-web.xml @@ -0,0 +1,10 @@ + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/jakiwiki.tld b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/jakiwiki.tld new file mode 100644 index 0000000..e2d7f24 --- /dev/null +++ b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/jakiwiki.tld @@ -0,0 +1,21 @@ + + + + + + 1.0 + 2.0 + JakiWiki taglibs + + + lista_pagine + it.jee_book.jakiwiki.tag.ListaPagine + + pagine + true + true + + + + diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/jboss-web.xml b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/jboss-web.xml new file mode 100644 index 0000000..c60e098 --- /dev/null +++ b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/jboss-web.xml @@ -0,0 +1,4 @@ + + + /JakiWiki + diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/antlr-2.7.7.jar b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/antlr-2.7.7.jar new file mode 100644 index 0000000..5e5f14b Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/antlr-2.7.7.jar differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/commons-lang3-3.4.jar b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/commons-lang3-3.4.jar new file mode 100644 index 0000000..8ec91d4 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/commons-lang3-3.4.jar differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/dom4j-1.6.1.jar b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000..c8c4dbb Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/dom4j-1.6.1.jar differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/hibernate-commons-annotations-4.0.4.Final.jar b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/hibernate-commons-annotations-4.0.4.Final.jar new file mode 100644 index 0000000..58677ec Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/hibernate-commons-annotations-4.0.4.Final.jar differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/hibernate-core-4.3.1.Final.jar b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/hibernate-core-4.3.1.Final.jar new file mode 100644 index 0000000..b2565ff Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/hibernate-core-4.3.1.Final.jar differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/hibernate-entitymanager-4.3.1.Final.jar b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/hibernate-entitymanager-4.3.1.Final.jar new file mode 100644 index 0000000..dad0823 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/hibernate-entitymanager-4.3.1.Final.jar differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar new file mode 100644 index 0000000..e2f2c59 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/jandex-1.1.0.Final.jar b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/jandex-1.1.0.Final.jar new file mode 100644 index 0000000..6348ac2 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/jandex-1.1.0.Final.jar differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/javassist-3.18.1-GA.jar b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/javassist-3.18.1-GA.jar new file mode 100644 index 0000000..d5f19ac Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/javassist-3.18.1-GA.jar differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/jboss-logging-3.1.3.GA.jar b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/jboss-logging-3.1.3.GA.jar new file mode 100644 index 0000000..ff3a103 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/jboss-logging-3.1.3.GA.jar differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/jboss-logging-annotations-1.2.0.Beta1.jar b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/jboss-logging-annotations-1.2.0.Beta1.jar new file mode 100644 index 0000000..03f7e23 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/jboss-logging-annotations-1.2.0.Beta1.jar differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar new file mode 100644 index 0000000..7817dc1 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/mysql-connector-java-6.0.2.jar b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/mysql-connector-java-6.0.2.jar new file mode 100644 index 0000000..211af14 Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/mysql-connector-java-6.0.2.jar differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/xml-apis-1.0.b2.jar b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/xml-apis-1.0.b2.jar new file mode 100644 index 0000000..ad33a5a Binary files /dev/null and b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/lib/xml-apis-1.0.b2.jar differ diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views.properties b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views.properties new file mode 100644 index 0000000..5c2f2c1 --- /dev/null +++ b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views.properties @@ -0,0 +1,8 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +main=WEB-INF/views/main.jsp +edit=WEB-INF/views/edit.jsp +list=WEB-INF/views/list.jsp +email=WEB-INF/views/email.jsp \ No newline at end of file diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views/edit.jsp b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views/edit.jsp new file mode 100644 index 0000000..bf7d8a2 --- /dev/null +++ b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views/edit.jsp @@ -0,0 +1,43 @@ +<%-- + Document : edit + Created on : 25-mag-2016, 21.15.50 + Author : morgoth +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + + + JakiWiki: Modifica di ${titolo} + + +
+ JakiWiki: modifica '${titolo}' +
+ + + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views/fragments/pulsantiera.jsp b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views/fragments/pulsantiera.jsp new file mode 100644 index 0000000..eec140f --- /dev/null +++ b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views/fragments/pulsantiera.jsp @@ -0,0 +1,29 @@ +<%-- + Document : pulsantiera + Created on : 22-mag-2016, 15.54.39 + Author : morgoth +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + + + + JSP Page + + +
+ + + + + +
+
+
+ JakiWiki - a cool Java Wiki +
+ + diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views/list.jsp b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views/list.jsp new file mode 100644 index 0000000..0fde814 --- /dev/null +++ b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views/list.jsp @@ -0,0 +1,35 @@ +<%-- + Document : list + Created on : 25-mag-2016, 21.57.11 + Author : morgoth +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@taglib uri="/WEB-INF/jakiwiki.tld" prefix="jakiwiki" %> + + + + + JakiWiki: ${intestazione} + + +
+ JakiWiki: ${intestazione} +
+ + + + + + + + +
+ +
+
+ +
+ + diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views/main.jsp b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views/main.jsp new file mode 100644 index 0000000..497c1d4 --- /dev/null +++ b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/views/main.jsp @@ -0,0 +1,45 @@ +<%-- + Document : main + Created on : 22-mag-2016, 15.37.31 + Author : morgoth +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + + + + JakiWiki: ${titolo} + + + +
+ JakiWiki: ${titolo} +
+ + + + + + + + + + + +
+
+ + +
+
+ +
+
+ +
+ + diff --git a/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/web.xml b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/web.xml new file mode 100644 index 0000000..d6bf9ff --- /dev/null +++ b/target/JakiWiki-1.0-SNAPSHOT/WEB-INF/web.xml @@ -0,0 +1,28 @@ + + + JakiWiki + JakiWiki, un wiki in Java + + + MainController + it.jee_book.jakiwiki.servlet.MainController + + + + MainController + *.action + + + + ejb/PaginaManager + Session + it.jee_book.jakiwiki.business.pagine.PaginaManager + + + + ejb/EmailManager + Session + it.jee_book.jakiwiki.business.email.EmailManager + + + diff --git a/target/JakiWiki-1.0-SNAPSHOT/gfv3ee6.dpf b/target/JakiWiki-1.0-SNAPSHOT/gfv3ee6.dpf new file mode 100644 index 0000000..13e0059 --- /dev/null +++ b/target/JakiWiki-1.0-SNAPSHOT/gfv3ee6.dpf @@ -0,0 +1,10 @@ + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/target/classes/META-INF/persistence.xml b/target/classes/META-INF/persistence.xml new file mode 100644 index 0000000..db758ad --- /dev/null +++ b/target/classes/META-INF/persistence.xml @@ -0,0 +1,8 @@ + + + + org.hibernate.ejb.HibernatePersistence + java:jboss/datasources/ExampleDS + it.jee_book.jakiwiki.model.Pagina + + diff --git a/target/classes/it/jee_book/jakiwiki/actions/ListaPagineAction.class b/target/classes/it/jee_book/jakiwiki/actions/ListaPagineAction.class new file mode 100644 index 0000000..3a99c4c Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/actions/ListaPagineAction.class differ diff --git a/target/classes/it/jee_book/jakiwiki/actions/ModificaPaginaAction.class b/target/classes/it/jee_book/jakiwiki/actions/ModificaPaginaAction.class new file mode 100644 index 0000000..a108699 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/actions/ModificaPaginaAction.class differ diff --git a/target/classes/it/jee_book/jakiwiki/actions/PulsantieraAction.class b/target/classes/it/jee_book/jakiwiki/actions/PulsantieraAction.class new file mode 100644 index 0000000..561fd3b Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/actions/PulsantieraAction.class differ diff --git a/target/classes/it/jee_book/jakiwiki/actions/VediPaginaAction.class b/target/classes/it/jee_book/jakiwiki/actions/VediPaginaAction.class new file mode 100644 index 0000000..fd298a3 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/actions/VediPaginaAction.class differ diff --git a/target/classes/it/jee_book/jakiwiki/business/AbstractDelegate.class b/target/classes/it/jee_book/jakiwiki/business/AbstractDelegate.class new file mode 100644 index 0000000..6e3ea51 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/business/AbstractDelegate.class differ diff --git a/target/classes/it/jee_book/jakiwiki/business/email/EmailManager.class b/target/classes/it/jee_book/jakiwiki/business/email/EmailManager.class new file mode 100644 index 0000000..566cca2 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/business/email/EmailManager.class differ diff --git a/target/classes/it/jee_book/jakiwiki/business/email/EmailManagerDelegate.class b/target/classes/it/jee_book/jakiwiki/business/email/EmailManagerDelegate.class new file mode 100644 index 0000000..f52b548 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/business/email/EmailManagerDelegate.class differ diff --git a/target/classes/it/jee_book/jakiwiki/business/email/EmailManagerImplementation.class b/target/classes/it/jee_book/jakiwiki/business/email/EmailManagerImplementation.class new file mode 100644 index 0000000..664d79c Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/business/email/EmailManagerImplementation.class differ diff --git a/target/classes/it/jee_book/jakiwiki/business/pagine/PaginaManager.class b/target/classes/it/jee_book/jakiwiki/business/pagine/PaginaManager.class new file mode 100644 index 0000000..2e21983 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/business/pagine/PaginaManager.class differ diff --git a/target/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerDelegate.class b/target/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerDelegate.class new file mode 100644 index 0000000..ca747c7 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerDelegate.class differ diff --git a/target/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerImplementation.class b/target/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerImplementation.class new file mode 100644 index 0000000..d2a94cd Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerImplementation.class differ diff --git a/target/classes/it/jee_book/jakiwiki/context/ContextObjectFactory.class b/target/classes/it/jee_book/jakiwiki/context/ContextObjectFactory.class new file mode 100644 index 0000000..9a254dc Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/context/ContextObjectFactory.class differ diff --git a/target/classes/it/jee_book/jakiwiki/context/RequestObject.class b/target/classes/it/jee_book/jakiwiki/context/RequestObject.class new file mode 100644 index 0000000..75d1b0b Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/context/RequestObject.class differ diff --git a/target/classes/it/jee_book/jakiwiki/context/ResponseAndView.class b/target/classes/it/jee_book/jakiwiki/context/ResponseAndView.class new file mode 100644 index 0000000..d43842f Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/context/ResponseAndView.class differ diff --git a/target/classes/it/jee_book/jakiwiki/context/ResponseObject.class b/target/classes/it/jee_book/jakiwiki/context/ResponseObject.class new file mode 100644 index 0000000..1e69468 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/context/ResponseObject.class differ diff --git a/target/classes/it/jee_book/jakiwiki/context/ViewDispatcher.class b/target/classes/it/jee_book/jakiwiki/context/ViewDispatcher.class new file mode 100644 index 0000000..b06b2c9 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/context/ViewDispatcher.class differ diff --git a/target/classes/it/jee_book/jakiwiki/controller/ActionFactory.class b/target/classes/it/jee_book/jakiwiki/controller/ActionFactory.class new file mode 100644 index 0000000..fb2f229 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/controller/ActionFactory.class differ diff --git a/target/classes/it/jee_book/jakiwiki/controller/Configuration.class b/target/classes/it/jee_book/jakiwiki/controller/Configuration.class new file mode 100644 index 0000000..07b0c12 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/controller/Configuration.class differ diff --git a/target/classes/it/jee_book/jakiwiki/controller/action/Action.class b/target/classes/it/jee_book/jakiwiki/controller/action/Action.class new file mode 100644 index 0000000..043281b Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/controller/action/Action.class differ diff --git a/target/classes/it/jee_book/jakiwiki/exception/JakiWikiException.class b/target/classes/it/jee_book/jakiwiki/exception/JakiWikiException.class new file mode 100644 index 0000000..cc09ada Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/exception/JakiWikiException.class differ diff --git a/target/classes/it/jee_book/jakiwiki/integration/dao/PaginaDao.class b/target/classes/it/jee_book/jakiwiki/integration/dao/PaginaDao.class new file mode 100644 index 0000000..0cafc11 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/integration/dao/PaginaDao.class differ diff --git a/target/classes/it/jee_book/jakiwiki/integration/dao/PaginaDaoImplementation.class b/target/classes/it/jee_book/jakiwiki/integration/dao/PaginaDaoImplementation.class new file mode 100644 index 0000000..0f9ba30 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/integration/dao/PaginaDaoImplementation.class differ diff --git a/target/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegrator.class b/target/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegrator.class new file mode 100644 index 0000000..65d275a Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegrator.class differ diff --git a/target/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$1.class b/target/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$1.class new file mode 100644 index 0000000..3327307 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$1.class differ diff --git a/target/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$PasswordAuthenticator.class b/target/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$PasswordAuthenticator.class new file mode 100644 index 0000000..c17dbd2 Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$PasswordAuthenticator.class differ diff --git a/target/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation.class b/target/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation.class new file mode 100644 index 0000000..21ce14d Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation.class differ diff --git a/target/classes/it/jee_book/jakiwiki/model/Pagina.class b/target/classes/it/jee_book/jakiwiki/model/Pagina.class new file mode 100644 index 0000000..bf3d91c Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/model/Pagina.class differ diff --git a/target/classes/it/jee_book/jakiwiki/servlet/MainController.class b/target/classes/it/jee_book/jakiwiki/servlet/MainController.class new file mode 100644 index 0000000..9714a5c Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/servlet/MainController.class differ diff --git a/target/classes/it/jee_book/jakiwiki/tag/ListaPagine.class b/target/classes/it/jee_book/jakiwiki/tag/ListaPagine.class new file mode 100644 index 0000000..d3f4b4b Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/tag/ListaPagine.class differ diff --git a/target/classes/it/jee_book/jakiwiki/utils/TextConverter.class b/target/classes/it/jee_book/jakiwiki/utils/TextConverter.class new file mode 100644 index 0000000..5d6aa2f Binary files /dev/null and b/target/classes/it/jee_book/jakiwiki/utils/TextConverter.class differ diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties new file mode 100644 index 0000000..601d8e1 --- /dev/null +++ b/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Mon Jun 13 21:22:56 CEST 2016 +version=1.0-SNAPSHOT +groupId=it.jee_book +artifactId=JakiWiki diff --git a/target/war/work/it.jee_book/JakiWiki/META-INF/MANIFEST.MF b/target/war/work/it.jee_book/JakiWiki/META-INF/MANIFEST.MF new file mode 100644 index 0000000..0717eb5 --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/META-INF/MANIFEST.MF @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +Archiver-Version: Plexus Archiver +Created-By: Apache Maven +Built-By: morgoth +Build-Jdk: 1.8.0_91 + diff --git a/target/war/work/it.jee_book/JakiWiki/META-INF/context.xml b/target/war/work/it.jee_book/JakiWiki/META-INF/context.xml new file mode 100644 index 0000000..95a37dd --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/target/war/work/it.jee_book/JakiWiki/META-INF/maven/it.jee_book/JakiWiki/pom.properties b/target/war/work/it.jee_book/JakiWiki/META-INF/maven/it.jee_book/JakiWiki/pom.properties new file mode 100644 index 0000000..80b8672 --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/META-INF/maven/it.jee_book/JakiWiki/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Mon Jun 13 20:52:07 CEST 2016 +version=1.0-SNAPSHOT +groupId=it.jee_book +artifactId=JakiWiki diff --git a/target/war/work/it.jee_book/JakiWiki/META-INF/maven/it.jee_book/JakiWiki/pom.xml b/target/war/work/it.jee_book/JakiWiki/META-INF/maven/it.jee_book/JakiWiki/pom.xml new file mode 100644 index 0000000..976c5cd --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/META-INF/maven/it.jee_book/JakiWiki/pom.xml @@ -0,0 +1,112 @@ + + 4.0.0 + + it.jee_book + JakiWiki + war + 1.0-SNAPSHOT + + JakiWiki + http://maven.apache.org + + + + java.net2 + http://download.java.net/maven/2/ + + + + + + javax.servlet + servlet-api + 2.5 + provided + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + org.apache.commons + commons-lang3 + 3.4 + + + org.eclipse.persistence + eclipselink + 2.5.2 + provided + + + org.hibernate + hibernate-entitymanager + 4.3.1.Final + + + org.hibernate.javax.persistence + hibernate-jpa-2.1-api + 1.0.0.Final + + + + mysql + mysql-connector-java + 6.0.2 + + + org.seleniumhq.selenium + selenium-java + test + 2.44.0 + + + com.opera + operadriver + test + 1.5 + + + org.seleniumhq.selenium + selenium-remote-driver + + + + + junit + junit + test + 4.11 + + + javaee + javaee-api + 5 + provided + + + it.jee_book + JakiWiki + 1.0-SNAPSHOT + war + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + 1.5 + 1.5 + true + + + + + diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/actions.properties b/target/war/work/it.jee_book/JakiWiki/WEB-INF/actions.properties new file mode 100644 index 0000000..2cd53c1 --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/WEB-INF/actions.properties @@ -0,0 +1,9 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +main=it.jee_book.jakiwiki.actions.VediPaginaAction +edit=it.jee_book.jakiwiki.actions.ModificaPaginaAction +pulsantiera=it.jee_book.jakiwiki.actions.PulsantieraAction +salva-pagina=it.jee_book.jakiwiki.actions.SalvaPaginaAction +invia-mail=it.jee_book.jakiwiki.actions.InviaMailAction \ No newline at end of file diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/.netbeans_automatic_build b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/META-INF/persistence.xml b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/META-INF/persistence.xml new file mode 100644 index 0000000..8df33b9 --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/META-INF/persistence.xml @@ -0,0 +1,15 @@ + + + + org.hibernate.ejb.HibernatePersistence + jdbc/sample + it.jee_book.jakiwiki.model.Pagina + + + + + + + + + diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/actions/ListaPagineAction.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/actions/ListaPagineAction.class new file mode 100644 index 0000000..3a99c4c Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/actions/ListaPagineAction.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/actions/ModificaPaginaAction.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/actions/ModificaPaginaAction.class new file mode 100644 index 0000000..a108699 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/actions/ModificaPaginaAction.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/actions/PulsantieraAction.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/actions/PulsantieraAction.class new file mode 100644 index 0000000..561fd3b Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/actions/PulsantieraAction.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/actions/VediPaginaAction.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/actions/VediPaginaAction.class new file mode 100644 index 0000000..fd298a3 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/actions/VediPaginaAction.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/AbstractDelegate.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/AbstractDelegate.class new file mode 100644 index 0000000..6e3ea51 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/AbstractDelegate.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManager.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManager.class new file mode 100644 index 0000000..566cca2 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManager.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManagerDelegate.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManagerDelegate.class new file mode 100644 index 0000000..f52b548 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManagerDelegate.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManagerImplementation.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManagerImplementation.class new file mode 100644 index 0000000..664d79c Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/email/EmailManagerImplementation.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManager.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManager.class new file mode 100644 index 0000000..2e21983 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManager.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerDelegate.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerDelegate.class new file mode 100644 index 0000000..ca747c7 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerDelegate.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerImplementation.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerImplementation.class new file mode 100644 index 0000000..d2a94cd Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/business/pagine/PaginaManagerImplementation.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/ContextObjectFactory.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/ContextObjectFactory.class new file mode 100644 index 0000000..9a254dc Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/ContextObjectFactory.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/RequestObject.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/RequestObject.class new file mode 100644 index 0000000..75d1b0b Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/RequestObject.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/ResponseAndView.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/ResponseAndView.class new file mode 100644 index 0000000..d43842f Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/ResponseAndView.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/ResponseObject.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/ResponseObject.class new file mode 100644 index 0000000..1e69468 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/ResponseObject.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/ViewDispatcher.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/ViewDispatcher.class new file mode 100644 index 0000000..b06b2c9 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/context/ViewDispatcher.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/controller/ActionFactory.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/controller/ActionFactory.class new file mode 100644 index 0000000..fb2f229 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/controller/ActionFactory.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/controller/Configuration.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/controller/Configuration.class new file mode 100644 index 0000000..07b0c12 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/controller/Configuration.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/controller/action/Action.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/controller/action/Action.class new file mode 100644 index 0000000..043281b Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/controller/action/Action.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/exception/JakiWikiException.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/exception/JakiWikiException.class new file mode 100644 index 0000000..cc09ada Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/exception/JakiWikiException.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/dao/PaginaDao.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/dao/PaginaDao.class new file mode 100644 index 0000000..0cafc11 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/dao/PaginaDao.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/dao/PaginaDaoImplementation.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/dao/PaginaDaoImplementation.class new file mode 100644 index 0000000..0f9ba30 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/dao/PaginaDaoImplementation.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegrator.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegrator.class new file mode 100644 index 0000000..65d275a Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegrator.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$1.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$1.class new file mode 100644 index 0000000..3327307 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$1.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$PasswordAuthenticator.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$PasswordAuthenticator.class new file mode 100644 index 0000000..c17dbd2 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation$PasswordAuthenticator.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation.class new file mode 100644 index 0000000..21ce14d Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/integration/mail/EmailIntegratorImplementation.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/model/Pagina.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/model/Pagina.class new file mode 100644 index 0000000..bf3d91c Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/model/Pagina.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/servlet/MainController.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/servlet/MainController.class new file mode 100644 index 0000000..8d8b954 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/servlet/MainController.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/tag/ListaPagine.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/tag/ListaPagine.class new file mode 100644 index 0000000..d3f4b4b Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/tag/ListaPagine.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/utils/TextConverter.class b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/utils/TextConverter.class new file mode 100644 index 0000000..5d6aa2f Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/classes/it/jee_book/jakiwiki/utils/TextConverter.class differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/glassfish-web.xml b/target/war/work/it.jee_book/JakiWiki/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..13e0059 --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/WEB-INF/glassfish-web.xml @@ -0,0 +1,10 @@ + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/jakiwiki.tld b/target/war/work/it.jee_book/JakiWiki/WEB-INF/jakiwiki.tld new file mode 100644 index 0000000..e2d7f24 --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/WEB-INF/jakiwiki.tld @@ -0,0 +1,21 @@ + + + + + + 1.0 + 2.0 + JakiWiki taglibs + + + lista_pagine + it.jee_book.jakiwiki.tag.ListaPagine + + pagine + true + true + + + + diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/jboss-web.xml b/target/war/work/it.jee_book/JakiWiki/WEB-INF/jboss-web.xml new file mode 100644 index 0000000..c60e098 --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/WEB-INF/jboss-web.xml @@ -0,0 +1,4 @@ + + + /JakiWiki + diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/antlr-2.7.7.jar b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/antlr-2.7.7.jar new file mode 100644 index 0000000..5e5f14b Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/antlr-2.7.7.jar differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/commons-lang3-3.4.jar b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/commons-lang3-3.4.jar new file mode 100644 index 0000000..8ec91d4 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/commons-lang3-3.4.jar differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/dom4j-1.6.1.jar b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000..c8c4dbb Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/dom4j-1.6.1.jar differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/hibernate-commons-annotations-4.0.4.Final.jar b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/hibernate-commons-annotations-4.0.4.Final.jar new file mode 100644 index 0000000..58677ec Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/hibernate-commons-annotations-4.0.4.Final.jar differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/hibernate-core-4.3.1.Final.jar b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/hibernate-core-4.3.1.Final.jar new file mode 100644 index 0000000..b2565ff Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/hibernate-core-4.3.1.Final.jar differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/hibernate-entitymanager-4.3.1.Final.jar b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/hibernate-entitymanager-4.3.1.Final.jar new file mode 100644 index 0000000..dad0823 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/hibernate-entitymanager-4.3.1.Final.jar differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar new file mode 100644 index 0000000..e2f2c59 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/jandex-1.1.0.Final.jar b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/jandex-1.1.0.Final.jar new file mode 100644 index 0000000..6348ac2 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/jandex-1.1.0.Final.jar differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/javassist-3.18.1-GA.jar b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/javassist-3.18.1-GA.jar new file mode 100644 index 0000000..d5f19ac Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/javassist-3.18.1-GA.jar differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/jboss-logging-3.1.3.GA.jar b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/jboss-logging-3.1.3.GA.jar new file mode 100644 index 0000000..ff3a103 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/jboss-logging-3.1.3.GA.jar differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/jboss-logging-annotations-1.2.0.Beta1.jar b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/jboss-logging-annotations-1.2.0.Beta1.jar new file mode 100644 index 0000000..03f7e23 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/jboss-logging-annotations-1.2.0.Beta1.jar differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar new file mode 100644 index 0000000..7817dc1 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/mysql-connector-java-6.0.2.jar b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/mysql-connector-java-6.0.2.jar new file mode 100644 index 0000000..211af14 Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/mysql-connector-java-6.0.2.jar differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/xml-apis-1.0.b2.jar b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/xml-apis-1.0.b2.jar new file mode 100644 index 0000000..ad33a5a Binary files /dev/null and b/target/war/work/it.jee_book/JakiWiki/WEB-INF/lib/xml-apis-1.0.b2.jar differ diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/views.properties b/target/war/work/it.jee_book/JakiWiki/WEB-INF/views.properties new file mode 100644 index 0000000..5c2f2c1 --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/WEB-INF/views.properties @@ -0,0 +1,8 @@ +# To change this license header, choose License Headers in Project Properties. +# To change this template file, choose Tools | Templates +# and open the template in the editor. + +main=WEB-INF/views/main.jsp +edit=WEB-INF/views/edit.jsp +list=WEB-INF/views/list.jsp +email=WEB-INF/views/email.jsp \ No newline at end of file diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/views/edit.jsp b/target/war/work/it.jee_book/JakiWiki/WEB-INF/views/edit.jsp new file mode 100644 index 0000000..bf7d8a2 --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/WEB-INF/views/edit.jsp @@ -0,0 +1,43 @@ +<%-- + Document : edit + Created on : 25-mag-2016, 21.15.50 + Author : morgoth +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + + + JakiWiki: Modifica di ${titolo} + + +
+ JakiWiki: modifica '${titolo}' +
+ + + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/views/fragments/pulsantiera.jsp b/target/war/work/it.jee_book/JakiWiki/WEB-INF/views/fragments/pulsantiera.jsp new file mode 100644 index 0000000..eec140f --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/WEB-INF/views/fragments/pulsantiera.jsp @@ -0,0 +1,29 @@ +<%-- + Document : pulsantiera + Created on : 22-mag-2016, 15.54.39 + Author : morgoth +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + + + + JSP Page + + +
+ + + + + +
+
+
+ JakiWiki - a cool Java Wiki +
+ + diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/views/list.jsp b/target/war/work/it.jee_book/JakiWiki/WEB-INF/views/list.jsp new file mode 100644 index 0000000..0fde814 --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/WEB-INF/views/list.jsp @@ -0,0 +1,35 @@ +<%-- + Document : list + Created on : 25-mag-2016, 21.57.11 + Author : morgoth +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@taglib uri="/WEB-INF/jakiwiki.tld" prefix="jakiwiki" %> + + + + + JakiWiki: ${intestazione} + + +
+ JakiWiki: ${intestazione} +
+ + + + + + + + +
+ +
+
+ +
+ + diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/views/main.jsp b/target/war/work/it.jee_book/JakiWiki/WEB-INF/views/main.jsp new file mode 100644 index 0000000..497c1d4 --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/WEB-INF/views/main.jsp @@ -0,0 +1,45 @@ +<%-- + Document : main + Created on : 22-mag-2016, 15.37.31 + Author : morgoth +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + + + + JakiWiki: ${titolo} + + + +
+ JakiWiki: ${titolo} +
+ + + + + + + + + + + +
+
+ + +
+
+ +
+
+ +
+ + diff --git a/target/war/work/it.jee_book/JakiWiki/WEB-INF/web.xml b/target/war/work/it.jee_book/JakiWiki/WEB-INF/web.xml new file mode 100644 index 0000000..d6bf9ff --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/WEB-INF/web.xml @@ -0,0 +1,28 @@ + + + JakiWiki + JakiWiki, un wiki in Java + + + MainController + it.jee_book.jakiwiki.servlet.MainController + + + + MainController + *.action + + + + ejb/PaginaManager + Session + it.jee_book.jakiwiki.business.pagine.PaginaManager + + + + ejb/EmailManager + Session + it.jee_book.jakiwiki.business.email.EmailManager + + + diff --git a/target/war/work/it.jee_book/JakiWiki/gfv3ee6.dpf b/target/war/work/it.jee_book/JakiWiki/gfv3ee6.dpf new file mode 100644 index 0000000..13e0059 --- /dev/null +++ b/target/war/work/it.jee_book/JakiWiki/gfv3ee6.dpf @@ -0,0 +1,10 @@ + + + + + + + Keep a copy of the generated servlet class' java code. + + +