Package it.hotel.model.user

Examples of it.hotel.model.user.IUser


  }
 
 
  protected void change(int structureId) {
   
    IUser user = userContainer.getUser();
    user.setStructureId(structureId);
    try {
      userManager.updateUser(user);
    } catch (SystemException e) {
    }
  }
View Full Code Here


  }
 
 
  public ModelAndView list(HttpServletRequest req, HttpServletResponse resp) {
   
    IUser user = userContainer.getUser();
    Structure structure = (Structure) structureManager.get(user.getStructureId());
    ArrayList<Structure> hotels = new ArrayList<Structure>();
    hotels.add(structure);
    if (userContainer.getUser().getRole().hasPermission("SUPERUSER"))
    {
      return new ModelAndView("hotel.structure.list.admin","elements", hotels);
View Full Code Here

    HttpSession session = this.pageContext.getSession();
    try {
      boolean isAuthorized = false;
      WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
      UserContainer container = (UserContainer) context.getBean("userContainer");
      IUser user = container.getUser();
      Role role = user.getRole();
      if (role != null) {
        isAuthorized = (role.hasPermission(this._permission) ||
            role.hasPermission(Permission.SUPERUSER) || role.getName().equalsIgnoreCase(_permission));
      }
      if (isAuthorized) {
View Full Code Here

    WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
    UserContainer container = (UserContainer) context.getBean("userContainer");
    IStructureManager structureManager = (IStructureManager) context.getBean("structureRawManager");
    IBookingManager bookingManager = (IBookingManager) context.getBean("bookingRawManager");
      try {
        IUser user = container.getUser();
        Structure structure = (Structure) structureManager.get(user.getStructureId());
        if (structure != null){         
          Collection<Room> rooms = bookingManager.getVacantRoomsForStructure(structure, CalendarUtils.GetToday(), CalendarUtils.GetToday());
          pageContext.getOut().print(rooms.size());
        }
       
View Full Code Here

   * @return
   */
  public ModelAndView list (HttpServletRequest req, HttpServletResponse resp){
    Map allPrices = new HashMap();
    Typology typology=null;
    IUser user = userContainer.getUser();
    ArrayList<Typology> listTypology = (ArrayList<Typology>)typologyManager.getTypologiesFromStructure(user.getStructureId());
    for(int i=0;i<listTypology.size(); i++){
      if(listTypology.get(i).getBeds()==0){
      listTypology.remove(i);
    }
      }
View Full Code Here

   * @throws
   * @return
   */
  protected Map referenceData (HttpServletRequest req) throws Exception{
    Map map = new HashMap();
    IUser user = userContainer.getUser();
    int hotel_id = user.getStructureId();
    map.put("typologies", typologyManager.getTypologiesFromStructure(hotel_id));
    return map;
  }
View Full Code Here

    HttpSession session = this.pageContext.getSession();
    try {
      boolean isAuthorized = false;
      WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
      UserContainer container = (UserContainer) context.getBean("userContainer");
      IUser user = container.getUser();
      Role role = user.getRole();
      if (role != null) {
        isAuthorized = !(role.hasPermission(this._permission) || role.getName().equalsIgnoreCase(_permission));
      }
      if (isAuthorized) {
        return EVAL_BODY_INCLUDE;
View Full Code Here

   * @param req
   * @param resp
   * @return
   */
  public ModelAndView list(HttpServletRequest req, HttpServletResponse resp){ 
    IUser user = userContainer.getUser();
   
    if(req.getParameter("sort") == null){
      ArrayList<Room> rooms = (ArrayList<Room>) manager.getRoomsFromStructure(user.getStructureId());
      return new ModelAndView("hotel.room.list", "rooms", rooms);
    }
    else{
      ArrayList<Room> rooms = (ArrayList<Room>) manager.getRoomsFromStructure(user.getStructureId());
      return new ModelAndView("hotel.room.list", "rooms", rooms);
    }
  }
View Full Code Here

  public int doStartTag() {
    WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
    UserContainer container = (UserContainer) context.getBean("userContainer");
    IStructureManager structureManager = (IStructureManager) context.getBean("structureRawManager");
      try {
        IUser user = container.getUser();
//        Hotel hotel = (Hotel) hotelManager.get(user.getStructureId());
        Structure structure = (Structure) structureManager.get(user.getStructureId());
        if (structure != null){
          pageContext.getOut().print(structure.getName());
        }
        else {
          pageContext.getOut().print("Admin");
View Full Code Here

   * @throws
   * @return
   */
  protected Map referenceData (HttpServletRequest req) throws Exception{
    Map map = new HashMap();
    IUser user = userContainer.getUser();
    int hotelId = user.getStructureId();
    map.put("typologies", typologyManager.getTypologiesFromStructure(hotelId));
    map.put("hotel", structureManager.get(hotelId));
    return map;
  }
View Full Code Here

TOP

Related Classes of it.hotel.model.user.IUser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.