Package uk.ac.osswatch.simal.service

Examples of uk.ac.osswatch.simal.service.IPersonService


    assertTrue("User not authenticated", sessionData.isAuthenticated());

    assertEquals("username is not correct", username, sessionData
        .getUsername());
   
    IPersonService service = SimalRepositoryFactory.getPersonService();
    IPerson user = service.findByUsername(username);
    user.delete();
  }
View Full Code Here


    tester.assertRenderedPage(LoginPage.class);

    String[] errors = {LoginPage.DUPLICATE_USERNAME_ERROR};
    tester.assertErrorMessages(errors);
   
    IPersonService service = SimalRepositoryFactory.getPersonService();
    IPerson user = service.findByUsername(username);
    user.delete();
  }
View Full Code Here

      private static final long serialVersionUID = 1L;

      public void onSubmit() {
        if (passwordRequested.equals(passwordConfirm)) {
          try {
            IPersonService service = SimalRepositoryFactory.getPersonService();
            IPerson user = service.findByUsername(usernameRequested);
            if (user == null) {
              String id = SimalRepositoryFactory.getPersonService().getNewID();
              String uri = RDFUtils.getDefaultPersonURI(id);
              IPerson person = service.create(uri);
              person.setUsername(usernameRequested);
              person.setPassword(passwordRequested);
             
              SimalSession.get().authenticate(usernameRequested, passwordRequested);
            } else {
View Full Code Here

    String adminPassword = SimalWebProperties.getProperty(SimalWebProperties.ADMIN_PASSWORD, "simal");
    if (username.equals(adminUsername) && password.equals(adminPassword)) {
      setUsername(username);
      setAuthenticated(true);
    } else {
      IPersonService service = SimalRepositoryFactory.getPersonService();
      IPerson user = service.findByUsername(username);
      if (user == null) {
        setAuthenticated(false);
      } else {
        if (user.getPassword().equals(password)) {
          setAuthenticated(true);
View Full Code Here

TOP

Related Classes of uk.ac.osswatch.simal.service.IPersonService

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.