Skip to content

Commit

Permalink
Primera versión estable del proyecto
Browse files Browse the repository at this point in the history
Primera versión estable del proyecto
  • Loading branch information
ManuelLR authored Dec 8, 2016
2 parents 71e1e62 + 7d15882 commit f73018c
Show file tree
Hide file tree
Showing 257 changed files with 5,094 additions and 1,482 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion .settings/org.eclipse.wst.common.component
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="Deliberations-1.80">
<wb-module deploy-name="Deliberations-2.0">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
Expand Down
Empty file modified .settings/org.eclipse.wst.common.project.facet.core.prefs.xml
100644 → 100755
Empty file.
Empty file modified .settings/org.eclipse.wst.common.project.facet.core.xml
100644 → 100755
Empty file.
Empty file modified .settings/org.eclipse.wst.jsdt.ui.superType.container
100644 → 100755
Empty file.
Empty file modified .settings/org.eclipse.wst.jsdt.ui.superType.name
100644 → 100755
Empty file.
Empty file modified .settings/org.eclipse.wst.validation.prefs
100644 → 100755
Empty file.
372 changes: 221 additions & 151 deletions DeliberationsScript.sql

Large diffs are not rendered by default.

Binary file added Documentacion/Deliberaciones.asta
Binary file not shown.
Binary file added Documentacion/Deliberaciones.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 42 additions & 16 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Deliberaciones Agora@US 15-16
# Deliberaciones Agora@US 16-17


Deliberaciones es un subsistema de código abierto del proyecto Agora@US que introduce la funcionalidad de un foro para administrar hilos y mensajes de usuarios votantes.
Dichos mensajes contendrán información sobre el votante que los haya realizado. Sólo los votantes válidos podrán realizar comentarios, por lo que se deberá consultar al sistema de autenticación.

### Version
v2.0

### Tecnología
Se trata de una aplicación web J2EE que hace uso de una base de datos MySQL con las herramientas Hibernate y Spring para el mapeo de objetos.

Expand All @@ -18,30 +16,58 @@ Además, se utilizan las siguientes herramientas y frameworks:
- JavaScript
- Bootstrap

### Integración
### Modulos relacionados

Deliberaciones se integra con el subsistema [Autenticación](https://github.com/AgoraUS-G1-1617/Autentication) mediante su API para ofrecer las herramientas de foro a usuarios dados de alta.
A su vez se integra con el subsistema [Censo]()

Deliberaciones se integra con el subsistema [Autenticación][auth] mediante su API para ofrecer las herramientas de foro a usuarios dados de alta.

### Instalación
La construcción, tests y despliegue se ofrecen de forma automática mediante Jenkins en la máquina virtual de Deliberaciones 2016. Basta con dirigirse a la web UI de Jenkins una vez se ejecuten los servicios Apache, MySQL y Tomcat y lanzar la tarea Auth, la cual ejecutará a su vez Deliberations y levantará ambos subsistemas.
Para configurar el entorno de trabajo consulta el repositorio [ConfigurationVMS](https://github.com/EGCG2/ConfigurationVMS) donde podrás encontrar el workspace a usar además de un script que autoinstala las herramientas necesarias.

Para el sistema de integración continua el cual ofrece construcción, tests y despliegue se usa el repositorio [continuous-delivery-integration](https://github.com/ManuelLR/continuous-delivery-integration) donde cada equipo crea y configura sus scripts de despliegue para que automáticamente se desplieguen las aplicaciones. Las instancias automáticas de Deliberations puedes verlas en:
- __[beta.deliberaciones.agoraus1](http://beta.deliberaciones.agoraus1.egc.duckdns.org)__ (beta)
- __[deliberaciones.agoraus1](http://deliberaciones.agoraus1.egc.duckdns.org)__ (stable)
- [Jenkins](https://jenkins.egc.duckdns.org)


## Equipos de trabajo

### Equipo 2016/17
<img src="https://avatars3.githubusercontent.com/u/9135377?v=3&s=4000" alt="Avatar: " height="50" /> &nbsp;
[Javier García Calvo](https://github.com/jjxp)

<img src="https://avatars3.githubusercontent.com/u/12049827?v=3&s=4000" alt="Avatar: " height="50" /> &nbsp;
[Manuel Francisco López Ruiz](https://github.com/ManuelLR)

Con Jenkins se asegura la integración continua cada vez que Autenticación o Deliberaciones sufran cambios en sus respectivos repositorios.
<img src="https://avatars3.githubusercontent.com/u/22616365?v=3&s=4000" alt="Avatar: " height="50" /> &nbsp;
[Bartolome Marquez Dominguez](https://github.com/barmardom)

### Descarga
<img src="https://avatars3.githubusercontent.com/u/8267403?v=3&s=4000" alt="Avatar: " height="50" /> &nbsp;
[Juan Ramón Rodríguez Rosado](https://github.com/juanrarodriguez18)

- Entrega 1: [Link][entrega 1]
- Entrega 2: [Link][entrega 2]
<img src="https://avatars3.githubusercontent.com/u/6894925?v=3&s=4000" alt="Avatar: " height="50" /> &nbsp;
[Jose Antonio Rodríguez Torres](https://github.com/josearodriguez)

### Equipo de trabajo


### Equipo 2015/16

- Juan García Orozco
- Juan García-Quismondo Fernández
- Roberto Jiménez Castillo
- Francisco José Macías García
- Alfredo Menéndez Charlo
- Rubén Ramírez Vera


[entrega 1]: <https://github.com/juagarfer4/Deliberations/releases/tag/Entrega1>
[entrega 2]: <https://github.com/juagarfer4/Deliberations/releases/tag/Entrega2>
[auth]: <https://github.com/AgoraUS1516/G03>
[entrega 1]: <https://github.com/juagarfer4/Deliberations/releases/tag/Entrega1>
[entrega 2]: <https://github.com/juagarfer4/Deliberations/releases/tag/Entrega2>
[auth]: <https://github.com/AgoraUS1516/G03>



## Acceso
* Cuenta de usuario
- Username: deliberations
- Password: deliberations

2 changes: 1 addition & 1 deletion pom.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.26</version>
<version>5.1.40</version>
</dependency>

<!-- Hibernate -->
Expand Down
29 changes: 29 additions & 0 deletions src/main/java/controllers/AboutController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

package controllers;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/about-us")
public class AboutController extends AbstractController {

// Constructors -----------------------------------------------------------

public AboutController() {
super();
}

// Index ------------------------------------------------------------------

@RequestMapping(value = "/teams")
public ModelAndView cookies() {
ModelAndView result;

result = new ModelAndView("about-us/developers");

return result;
}

}
7 changes: 4 additions & 3 deletions src/main/java/controllers/AbstractController.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,20 @@

@Controller
public class AbstractController {

// Panic handler ----------------------------------------------------------

@ExceptionHandler(Throwable.class)
public ModelAndView panic(Throwable oops) {
ModelAndView result;

result = new ModelAndView("misc/panic");

result.addObject("name", ClassUtils.getShortName(oops.getClass()));
result.addObject("exception", oops.getMessage());
result.addObject("stackTrace", ExceptionUtils.getStackTrace(oops));

return result;
}
}

}
30 changes: 12 additions & 18 deletions src/main/java/controllers/DashboardController.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import domain.Thread;
import services.ThreadService;

@Controller
@RequestMapping("/dashboard")
public class DashboardController extends AbstractController {

// Services ---------------------------------------------------------------

@Autowired
private ThreadService threadService;

Expand All @@ -26,8 +26,6 @@ public DashboardController() {
super();
}



// Listing-------------------------------------------------------------------

@RequestMapping(value = "/list", method = RequestMethod.GET)
Expand All @@ -36,30 +34,26 @@ public ModelAndView list() {
Collection<domain.Thread> threadMostComments;
Collection<domain.Thread> threadLeastComments;
Collection<domain.Thread> threadMoreRating;


threadMostComments=threadService.findThreadWithMoreComments();
threadLeastComments=threadService.findThreadWithLessComments();
threadMoreRating=threadService.findThreadMoreRating();


threadMostComments = threadService.findThreadWithMoreComments();
threadLeastComments = threadService.findThreadWithLessComments();
threadMoreRating = threadService.findThreadMoreRating();

String uri = "dashboard/list";
String requestURI = "dashboard/list.do";




result = createListModelAndView(requestURI, uri);
result.addObject("threadMostComments", threadMostComments);
result.addObject("threadLeastComments", threadLeastComments);
result.addObject("threadMoreRating", threadMoreRating);

return result;
}



// Other bussiness method ---------------------------------------------------------------
protected ModelAndView createListModelAndView(
String requestURI, String uri) {
// Other bussiness method
// ---------------------------------------------------------------

protected ModelAndView createListModelAndView(String requestURI, String uri) {
ModelAndView result;

result = new ModelAndView(uri);
Expand Down
73 changes: 73 additions & 0 deletions src/main/java/controllers/KarmaController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package controllers;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import domain.Comment;
import domain.Karma;
import services.CommentService;
import services.KarmaService;
import services.UserService;

@Controller
@RequestMapping("/karma")
public class KarmaController extends AbstractController {

// Supporting services -----------------------

@Autowired
private KarmaService karmaService;

@Autowired
private CommentService commentService;

@Autowired
private UserService userService;

@Autowired
private ThreadController threadController;

// Constructors -----------------------------------------------------------

public KarmaController() {
super();
}

// Edition ----------------------------------------------------------------

@RequestMapping(value = "/setKarma", method = RequestMethod.GET)
public ModelAndView setKarma(@RequestParam int commentId, @RequestParam String value ) {
Assert.isTrue(!commentService.findOne(commentId).getUser().equals(userService.findOneByPrincipal()));
ModelAndView result;
Comment comment;
Karma karma;

if(karmaService.karmaOfUserAtComment(commentId)==null){

karma = karmaService.create();

}else{

karma = karmaService.karmaOfUserAtComment(commentId);

}

comment = commentService.findOne(commentId);
karma = karmaService.setKarma(karma, comment, value);

karmaService.save(karma);

result = threadController.seeThread(comment.getThread().getId(), 1);

return result;
}

// Ancillary methods ------------------------------------------------------


}
38 changes: 38 additions & 0 deletions src/main/java/controllers/PolicyController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

package controllers;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/policy")
public class PolicyController extends AbstractController {

// Constructors -----------------------------------------------------------

public PolicyController() {
super();
}

// Index ------------------------------------------------------------------

@RequestMapping(value = "/cookies")
public ModelAndView cookies() {
ModelAndView result;

result = new ModelAndView("policies/cookies");

return result;
}

@RequestMapping(value = "/terms")
public ModelAndView terms() {
ModelAndView result;

result = new ModelAndView("policies/terms");

return result;
}

}
50 changes: 0 additions & 50 deletions src/main/java/controllers/ProfileController.java

This file was deleted.

Loading

0 comments on commit f73018c

Please sign in to comment.