Examples of User


Examples of org.nemesis.forum.User

  }

  //FROM THE PROFILEMANAGER INTERFACE//

  public User createUser(String username, String password, String email) throws UserAlreadyExistsException {
    User newUser = null;
    try {
      User existingUser = getUser(username);

      //The user already exists since now exception, so:
      throw new UserAlreadyExistsException();
    } catch (UserNotFoundException unfe) {
      //The user doesn't already exist so we can create a new user
View Full Code Here

Examples of org.neo4j.cineasts.domain.User

    }


    @RequestMapping(value = "/movies/{movieId}", method = RequestMethod.GET, headers = "Accept=text/html")
    public String singleMovieView(final Model model, @PathVariable String movieId) {
        User user = addUser(model);
        Movie movie = moviesRepository.getMovie(movieId);
        model.addAttribute("id", movieId);
        if (movie != null) {
            model.addAttribute("movie", movie);
            final int stars = movie.getStars();
View Full Code Here

Examples of org.nextime.ion.framework.business.User

    String password = lform.getPassword();

    // v�rifier l'utilisateur sur le framework
    try {
      Mapping.begin();
      User user = User.getInstance(login);
      Mapping.rollback();
      if (!lform.getPassword().equals(user.getPassword())) {
        ActionError error = new ActionError("error.login.badPassword");
        ActionErrors errors = new ActionErrors();
        errors.add("password", error);
        request.setAttribute(ERROR_KEY, errors);
        return (new ActionForward(mapping.getInput()));
      }
      Mapping.begin();
      boolean result = new SecurityManagerImpl().canLogIntoBackoffice(user);
      Mapping.rollback();
      if ( !result ) {
        ActionError error = new ActionError("error.login.notAuthorized");
        ActionErrors errors = new ActionErrors();
        errors.add("login", error);
        request.setAttribute(ERROR_KEY, errors);
        return (new ActionForward(mapping.getInput()));
      }
      request.getSession().setAttribute("userLogin",user.getLogin());
    } catch (Exception e) {
      Mapping.rollback();
      ActionError error = new ActionError("error.login.badLogin");
      ActionErrors errors = new ActionErrors();
      errors.add("login", error);
View Full Code Here

Examples of org.ngrinder.model.User

  public void testHome() {
    MockHttpServletResponse res = new MockHttpServletResponse();
    MockHttpServletRequest req = new MockHttpServletRequest();
    CookieLocaleResolver localeResolver = new CookieLocaleResolver();
    req.setAttribute(DispatcherServlet.LOCALE_RESOLVER_ATTRIBUTE, localeResolver);
    User testUser2 = getTestUser();
    testUser2.setUserLanguage("EN");
    ModelMap model = new ModelMap();
    String viewName = homeController.home(testUser2, null, null, model, res, req);
    assertThat(viewName, is("index"));

    User testUserError = Mockito.spy(testUser2);
    Mockito.when(testUserError.getRole()).thenReturn(Role.SYSTEM_USER);
    viewName = homeController.home(testUserError, "Test Error message!", null, model, res, req);
    assertThat(viewName, is("login"));

  }
View Full Code Here

Examples of org.nightlabs.jfire.security.User

    Order order = trader.createOrder(recurringOffer.getVendor(),
        recurringOffer.getCustomer(), null, recurringOffer.getCurrency());
    logger.debug("Created Order: " + JDOHelper.getObjectId(order));

    User user = SecurityReflector.getUserDescriptor().getUser(pm);

    String offerIDPrefix = recurringOffer.getOfferIDPrefix();

    Collection<Segment> recurringSegments = new HashSet<Segment>();
    for (Article article : recurringOffer.getArticles()) {
View Full Code Here

Examples of org.nutz.integration.shiro.realm.bean.User

 
  protected Dao dao;

  protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
    String username = principalCollection.getPrimaryPrincipal().toString();
    User user = dao().fetch(User.class, Cnd.where("name", "=", username));
        if (user == null)
            return null;
        if (user.isLocked())
            throw new LockedAccountException("Account [" + username + "] is locked.");
       
        SimpleAuthorizationInfo auth = new SimpleAuthorizationInfo();
        auth.setRoles(user.getRoleStrSet());
        auth.addStringPermissions(user.getPermissionStrSet());
       
        return auth;
  }
View Full Code Here

Examples of org.nutz.ngqa.bean.User

  @Ok(">>:/index.jsp")
  public Object loginAsRoot(@Param("key") String key, HttpSession session) {
    if (!Strings.isBlank(key)
        && 1 == systemconfigColl.count(new BasicDBObject(
            "root_password", key))) {
      User root = dao.findOne(User.class, new BasicDBObject("provider",
          "root"));
      session.setAttribute("me", root);
      return null;
    } else
      return new HttpStatusView(403);
View Full Code Here

Examples of org.objectweb.joram.client.jms.admin.User

      strbuf.append("<freeWriter/>\n");
    }

    List readers = getReaders();
    for (ListIterator iterator = readers.listIterator(); iterator.hasNext(); ) {
      User user = (User) (iterator.next());
      strbuf.append(XmlSerializer.indent(indent));
      strbuf.append("<reader ");
      strbuf.append(XmlSerializer.xmlAttribute(user.getName(), "user"));
      strbuf.append("/>\n");
    }

    List writers = getWriters();
    for (ListIterator iterator = writers.listIterator(); iterator.hasNext(); ) {
      User user = (User) (iterator.next());
      strbuf.append(XmlSerializer.indent(indent));
      strbuf.append("<writer ");
      strbuf.append(XmlSerializer.xmlAttribute(user.getName(), "user"));
      strbuf.append("/>\n");
    }


    strbuf.append(XmlSerializer.indent(indent));
View Full Code Here

Examples of org.objectweb.speedo.pobjects.collection.User

    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();

        final Group group = new Group("Group One");

        final User user = new User("Tom");
        user.setE_mail("tom@example.com");
        group.getUsers().add(user);
    assertTrue("User already marked as persistent before the makePersitent action: ",
      !JDOHelper.isPersistent(user));
    assertTrue("Group already marked as persistent before the makePersitent action: ",
      !JDOHelper.isPersistent(group));
View Full Code Here

Examples of org.olat.core.id.User

    if (sender == null) {
      // mail sent by plattform configured sender address
      return trans.translate("footer.no.userdata", new String[] { Settings.getServerContextPathURI() });
    }
    // mail sent by a system user
    User user = sender.getUser();
    String institution = user.getProperty(UserConstants.INSTITUTIONALNAME, null);
    if (institution == null) institution = "";
    return trans.translate("footer.with.userdata", new String[] { user.getProperty(UserConstants.FIRSTNAME, null), user.getProperty(UserConstants.LASTNAME, null), sender.getName(),
        institution, Settings.getServerContextPathURI() });

  }
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.