コード例 #1
0
  @Override
  public void sendInvite(final String email) {
    if (email == null || email.isEmpty()) {
      ProfileGinjector.get
          .instance()
          .getNotifier()
          .displayMessage(Message.createErrorMessage("Please enter an email"));
      return;
    } else if (!ValidationUtils.isValidEmail(email)) {
      ProfileGinjector.get
          .instance()
          .getNotifier()
          .displayMessage(Message.createErrorMessage("Please enter a valid email"));
      return;
    }

    ProfileEntryPoint.getInstance()
        .getProfileService()
        .inviteUserForProject(
            email,
            project.getIdentifier(),
            new AsyncCallbackSupport<Void>() {

              @Override
              protected void success(Void result) {
                // Set a status message indicating that this user was invited
                view.inviteEmail.setText("");
                ProfileGinjector.get
                    .instance()
                    .getNotifier()
                    .displayMessage(
                        Message.createSuccessMessage("Invitation email sent to " + email));
              }
            });
  }
コード例 #2
0
 @Override
 public void updateTeamMember(ProjectTeamMember teamMember) {
   OperationMessage message = new OperationMessage("Saving");
   message.setSuccessText("Member Updated");
   ProfileEntryPoint.getInstance()
       .getProfileService()
       .updateTeamMemberRoles(
           project.getIdentifier(),
           teamMember,
           new AsyncCallbackSupport<Boolean>(message) {
             @Override
             protected void success(Boolean result) {}
           });
 }