Roles y User al 90%:
-Front-End Completo. -Falta conectar Roles con Access -Errores menores
This commit is contained in:
parent
874c45b5b4
commit
ca8dae036b
@ -14,6 +14,23 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* RolesControllerView
|
||||
*
|
||||
* Permite ver los Roles
|
||||
*
|
||||
* Metodos importantes:
|
||||
*
|
||||
* public static getAllRoles()
|
||||
* Devuelve un List<Role> con todos los roles que existen.
|
||||
*
|
||||
* public static getRole(String key)
|
||||
* Devuelve un Rol dada una key.
|
||||
* La key se obtiene usando el metodo getKey() de un objeto Role
|
||||
*
|
||||
* */
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class RolesControllerView extends HttpServlet {
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
@ -84,7 +101,7 @@ public class RolesControllerView extends HttpServlet {
|
||||
return users;
|
||||
}
|
||||
|
||||
static Role getRole(String key){
|
||||
public static Role getRole(String key){
|
||||
PersistenceManager pm = controller.PMF.get().getPersistenceManager();
|
||||
Key k = KeyFactory.stringToKey(key);
|
||||
Role role = pm.getObjectById(Role.class, k);
|
||||
|
Loading…
Reference in New Issue
Block a user