Examples of UserContainer


Examples of it.hotel.controller.user.UserContainer

  public int doStartTag() throws JspException {
    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));
      }
View Full Code Here

Examples of it.hotel.controller.user.UserContainer

  /**
   * @return
   */
  public int doStartTag() {
    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

Examples of it.hotel.controller.user.UserContainer

  public int doStartTag() throws JspException {
    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) {
View Full Code Here

Examples of it.hotel.controller.user.UserContainer

  /**
   * @return
   */
  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());
        }
View Full Code Here

Examples of it.hotel.controller.user.UserContainer

  /**
   * @return
   */
  public int doStartTag() {
    WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
    UserContainer container = (UserContainer) context.getBean("userContainer");
    IUser user = container.getUser();
      try {
        pageContext.getOut().print(user.getUserName());
      } catch (IOException e) {
        SystemUtils.logThrowable(e, this, "doStartTag");
      }
View Full Code Here

Examples of it.hotel.controller.user.UserContainer

*/
public class AdminSelectHotelListTag extends TagSupport{
 
  public int doStartTag() {
    WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
    UserContainer container = (UserContainer) context.getBean("userContainer");
    IStructureManager structureManager = (IStructureManager) context.getBean("localizedStructureManager");
    ILocaleContainer localeContainer = (ILocaleContainer) context.getBean("localeContainer");
   
    try {
        IUser user = container.getUser();
        Collection<Structure> structures = structureManager.fastGetAll();
        if (structures.isEmpty()){
          return SKIP_BODY;
        }
       
View Full Code Here

Examples of org.vfny.geoserver.global.UserContainer

            styles.add(sc.getId());
          }
        }               
        StyleConfig sConfig;

        UserContainer user = Requests.getUserContainer(request);       
        selectedStyle = "";       
    }
View Full Code Here

Examples of org.vfny.geoserver.global.UserContainer

        HttpServletRequest request) {
        ActionErrors errors = new ActionErrors();
       
        // Selected DataStoreConfig is in session
        //
        UserContainer user = Requests.getUserContainer( request );
        DataStoreConfig dsConfig = user.getDataStoreConfig();
        //
        // dsConfig is the only way to get a factory
        DataStoreFactorySpi factory = dsConfig.getFactory();
        Param[] info = factory.getParametersInfo();
View Full Code Here

Examples of org.vfny.geoserver.global.UserContainer

        super.reset(mapping, request);

        ServletContext context = getServlet().getServletContext();
        DataConfig config = ConfigRequests.getDataConfig(request);

        UserContainer user = Requests.getUserContainer(request);

        // Richard can we please use this to store stuff?
        FeatureTypeConfig ftConfig; //= user.getFeatureTypeConfig();

        ftConfig = (FeatureTypeConfig) request.getSession().getAttribute(DataConfig.SELECTED_FEATURE_TYPE);
View Full Code Here

Examples of org.vfny.geoserver.global.UserContainer

     */
    public static UserContainer getUserContainer(HttpServletRequest request) {
        HttpSession session = request.getSession();

        synchronized (session) {
            UserContainer user = (UserContainer) session.getAttribute(UserContainer.SESSION_KEY);

            return user;
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.