Examples of AdminServiceManager


Examples of edu.stanford.bmir.protege.web.client.rpc.AdminServiceManager

        });
    }


    private void handleSuccess(final SignupInfo data, final WebProtegeDialogCloser dialogCloser) {
        final AdminServiceManager adminServiceManager = AdminServiceManager.getInstance();
        adminServiceManager.getNewSalt(new AsyncCallback<String>() {
            public void onFailure(Throwable caught) {
                MessageBox.showAlert("Error",
                        "There was a problem registering the specified user account. " +
                                "Please contact admin. (Problem " + caught.getMessage() + ")");
            }

            public void onSuccess(String salt) {
                HashAlgorithm hashAlgorithm = new HashAlgorithm();
                String userName = data.getUserName();
                String email = data.getEmailAddress().getEmailAddress();
                String hashedPassword = hashAlgorithm.md5(salt + data.getPassword());
                adminServiceManager.registerUserViaEncrption(userName, hashedPassword, email, new AsyncCallback<UserData>() {
                    public void onFailure(Throwable caught) {
                        if(caught instanceof UserNameAlreadyExistsException) {
                            String username = ((UserNameAlreadyExistsException) caught).getUsername();
                            MessageBox.showAlert("User name already taken", "A user named "
                                    + username
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.