Package org.opentides.bean

Examples of org.opentides.bean.UserWidgets


    int countCol = 1;
    for (int i=0;i<col.length;i++) {
      String[] widget = col[i].split(",");
      int countRow = 1;
      for (int j=0;j<widget.length;j++) {
        UserWidgets newUserWidget = userWidgetsService.findSpecificUserWidgets(user, widget[j]);
        userWidgetsService.updateUserWidgetsOrder(newUserWidget,countCol,countRow);
        countRow++;
      }
      countCol++;
    }
View Full Code Here


    //must be a valid state before processing the code...
    if (status.equals(""+WidgetService.WIDGET_STATUS_MINIMIZE) || status.equals(""+WidgetService.WIDGET_STATUS_SHOW)
        || status.equals(""+WidgetService.WIDGET_STATUS_REMOVE)) {
      String widgetName = req.getParameter("widgetName");
      BaseUser user = userService.load(SecurityUtil.getSessionUser().getRealId());
      UserWidgets userWidgets = userWidgetsService.findSpecificUserWidgets(user, widgetName);
      if (userWidgets != null) {
        try {
          Integer statusNum = Integer.parseInt(status);
          userWidgetsService.updateUserWidgetsStatus(userWidgets, statusNum);
        } catch (NumberFormatException nfe) {
View Full Code Here

     
      Widget widget = widgetService.load(widgetId);
      if (widget==null) {     
        _log.error("Attempting to add new widget with id["+widgetId+"] but widget does not exist.");
      } else {
        UserWidgets userWidget = new UserWidgets();
        userWidget.setUser(user);
        userWidget.setWidget(widget);
        userWidget.setColumn(pos[0]);
        userWidget.setRow((int)++pos[1]);
        userWidget.setStatus(1);
        getDao().saveEntityModel(userWidget);
      }
    }
  }
View Full Code Here

  public void setWidgetService(WidgetService widgetService) {
    this.widgetService = widgetService;
  }
  @Transactional(readOnly = true)
  public UserWidgets findSpecificUserWidgets(BaseUser user, String widgetName) {
    UserWidgets example = new UserWidgets();
    Widget widgetObj = new Widget();
    //widgetObj.setIsUserDefined(true);
    widgetObj.setName(widgetName);
    example.setUser(user);
    example.setWidget(widgetObj);
    List<UserWidgets> widgets = this.findByExample(example, 0, 1);
    if(widgets.size() > 0){
      return widgets.get(0);
    }else{
      return null;
View Full Code Here

     */
    BaseUser user = userService.load(userId);
   
    int[] pos = getColumnRowOfUserWidget(userId);
   
    UserWidgets userWidget = new UserWidgets();
    userWidget.setUser(user);
    userWidget.setWidget(widget);
    userWidget.setColumn(pos[0]);
    userWidget.setRow((int)++pos[1]);
    userWidget.setStatus(1);
    _log.debug("saving widget "+userWidget.getWidget().getName()+" at column "+ userWidget.getColumn()+", row "+ userWidget.getRow());
    getDao().saveEntityModel(userWidget);
   
  }
View Full Code Here

    List<Widget> widgets = widgetService.findWidgetWithAccessCode(rolesList);
    for(Widget widget : widgets){
      if(widget.getIsShown()){
        for(BaseUser user : userGroup.getUsers()) {
          int[] pos = getColumnRowOfUserWidget(user.getId());
          UserWidgets tempUserWidgets = this.findSpecificUserWidgets(user, widget.getName());
          if(tempUserWidgets == null) {
            UserWidgets userWidgets = new UserWidgets();
            userWidgets.setWidget(widget);
            userWidgets.setUser(user);
            userWidgets.setStatus(1);
            userWidgets.setColumn(pos[0]);
            userWidgets.setRow((int)++pos[1]);
           
            getDao().saveEntityModel(userWidgets);   
          }
        }
      }
View Full Code Here

TOP

Related Classes of org.opentides.bean.UserWidgets

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.