/**
   * Initializes bean by downloading user details from the users api.
   *
   * <p>Parameter {@link VcmsGuiPaths#USER_ID} is required, which indicates requested user id. Note
   * that if {@link #ACTIVE_TAB} parameter is provided during bean initialization, it will
   * automatically switch to tab identified by given id.
   */
  @PostConstruct
  public void loadUser() {
    collectAccessTokenOptions();

    if (user == null) {
      user = usersApi.getUser(getRequestedUserId());
    }

    if (requestParameters.hasParameter(VcmsGuiPathParams.ACTIVE_TAB_ID)) {
      activeTabId = requestParameters.getParameter(VcmsGuiPathParams.ACTIVE_TAB_ID);
    }
  }
 private void loadUserAccessTokens() {
   List<ScopeType> scopes = new ArrayList<ScopeType>();
   scopes.add(ScopeType.TOKEN_SCOPED);
   scopes.add(ScopeType.USER_SCOPED);
   this.userAccessTokens = usersApi.getUserAccessTokens(user.getId(), scopes);
 }
 private void loadUserProjects() {
   this.userProjects = usersApi.getUserProjects(user.getId());
 }
 private void loadUserGroups() {
   this.userGroups = usersApi.getUserGroups(user.getId());
 }