示例#1
0
  /**
   * 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);
    }
  }
示例#2
0
 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);
 }
示例#3
0
 private void loadUserProjects() {
   this.userProjects = usersApi.getUserProjects(user.getId());
 }
示例#4
0
 private void loadUserGroups() {
   this.userGroups = usersApi.getUserGroups(user.getId());
 }