Package com.structis.fichesst.shared.dto

Examples of com.structis.fichesst.shared.dto.UtilisateurGrpModel


  SelectionListener<ButtonEvent> add = new SelectionListener<ButtonEvent>() {

      @Override
      public void componentSelected(ButtonEvent ce) {

    UtilisateurGrpModel admin = new UtilisateurGrpModel();
    admin.set("identifiant", txtAdmin.getValue());
    admin.set("badmin", true);
    if (isExistIdentifiant(txtAdmin.getValue())) {
        userStore.add(admin);
        userStore.commitChanges();
        listUserBefore.add(admin);
        txtAdmin.clear();
View Full Code Here


    public SelectionListener<ButtonEvent> AddButtonEventGridRole() {
  SelectionListener<ButtonEvent> add = new SelectionListener<ButtonEvent>() {

      @Override
      public void componentSelected(ButtonEvent ce) {
    UtilisateurGrpModel user = new UtilisateurGrpModel();
    user.set("identifiant", txtChantier.getValue());
    user.set("idChantier", idChantier);
    if (isExistIdentifiantGridRole(txtChantier.getValue())) {
        storeRole.add(user);
        storeRole.commitChanges();
        storeChantier.removeAll();
        isAdded = true;
        txtChantier.clear();
        btnAdd.setEnabled(false);
    } else {
        MessageBox.alert("Alert", messages.existUser(), null);
        txtChantier.clear();
        txtChantier.focus();
        btnAdd.setEnabled(false);
    }
    map.put(user.getId(), user);
    roleModelList.add(user);

      }
  };
  return add;
View Full Code Here

    for( int i = 0 ; i < list.size() ; i++ ) {
      UtilisateurGrp user = new UtilisateurGrp();
      user = list.get(i);
      listRole = user.getRoles();
      UtilisateurGrpModel userRoleModel = new UtilisateurGrpModel();
      userRoleModel.setIdentifiant(user.getIdentifiant());
      userRoleModel.setId(user.getId());
      userRoleModel.setIdChantier(idChantier);
      for( Role role : listRole ) {
        if( role.getId().getIdChantier().equals(idChantier) ) {
          userRoleModel.setBcontributeur(role.getBcontributeur());
          userRoleModel.setBlecteur(role.getBlecteur());
        }
      }

      finalResult.add(userRoleModel);
View Full Code Here

  }

  @Override
  public UtilisateurGrpModel checkUserByKerberosSSO() {

    UtilisateurGrpModel userModel = new UtilisateurGrpModel();
    ServletRequestAttributes attr = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes();
    HttpServletRequest request = attr.getRequest();

//    if( request.getUserPrincipal() != null && !"".equalsIgnoreCase(request.getUserPrincipal().getName()) ) {
//      String userLogin = request.getUserPrincipal().getName();
      String userLogin = "long.nguyen@bouygues-construction.com";
      if( userLogin != null ) {
        userLogin = userLogin.toLowerCase();
        final UtilisateurGrp user = domUtilisateurService.findUserByIdentifiant(AppUtil.getLogonedUserNameSSOKerberos(userLogin));
        if( user != null ) {
          userLogin = userLogin.toLowerCase();
          userModel.setId(user.getId());
          userModel.setIdentifiant(user.getIdentifiant());
          if( user.getBadmin() == null ) {
            userModel.setBadmin(false);
          }
          else if( user.getBadmin() == false ) {
            userModel.setBadmin(false);
          }
          else {
            userModel.setBadmin(true);
          }
          return userModel;
        }
      }
//    }
View Full Code Here

  adminLink = new Html(messages.adminstration());
  adminLink.setStyleName("actionHTML");
  adminLink.setVisible(false);
  adminLink.setStyleAttribute("visibility", "hidden");
  if (navigation.getContext().getUserModel() != null) {
      UtilisateurGrpModel user = navigation.getContext().getUserModel();
      String username = user.getIdentifiant();
      if (user.getBadmin() == null) {
    adminLink.setVisible(false);
      }
      if (user.getBadmin() != null && user.getBadmin() == false) {
    adminLink.setVisible(false);
      }
      if (user.getBadmin() != null && user.getBadmin() == true) {
    adminLink.setVisible(true);
    adminLink.setStyleAttribute("visibility", "visible");
      }

      if (user != null && user.getIdentifiant() != null) {
    nomLabel.setText(messages.hello() + Constants.SPACE + username.substring(username.lastIndexOf("\\") + 1, username.length()));
    acceuilLink.setVisible(true);
    if (user.getBadmin() == null || user.getBadmin() == false) {
        adminLink.setVisible(false);
    }
      } else {
    nomLabel.setText(messages.hello());
      }
View Full Code Here

  mainContent.add(errorlPanel);
  add(mainContent);
    }

    public void loadPanel() {
  UtilisateurGrpModel user = navigation.getContext().getUserModel();
  headerPanel = new HeaderPanel();
  headerPanel.setHeight(45);
  if (navigation.getContext().getUserModel() != null) {
      serviceRole.findRolesByIdUser(user.getId(), new AsyncCallback<List<RoleModel>>() {
    @Override
    public void onFailure(Throwable arg0) {
    }

    @Override
View Full Code Here

TOP

Related Classes of com.structis.fichesst.shared.dto.UtilisateurGrpModel

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.