Examples of User


Examples of cz.cvut.fel.restauracefel.hibernate.User

     * Test of run method, of class SmenyController.
     */
    @Test
    public void testRun() {
        System.out.println("run");
        User user = new User();
        String[] rights = new String[]{"Zápis","Mazání"};
        smenyController.run(user, rights);
        boolean expResult = true;
        boolean result = smenyController.user.equals(user) && smenyController.prava.equals(rights);
        assertEquals(expResult, result);                      
View Full Code Here

Examples of cz.muni.fi.pa165.ddtroops.entities.User

    @Transactional
    public UserDTO createNewUser(String name, String password, String authority)
    {

        User u = new EntityBuilder<User>(User.class)
                .withProperty("Name", name)
                .withProperty("Password", password)
                .withProperty("Authority", authority)
                .Build();
View Full Code Here

Examples of cz.muni.fi.pa165.stis.entity.User

            fail("exception should be thrown");
        } catch (IllegalArgumentException ex) {
            // ok
        }

        User u = createUser("mrkvicka", "345sac", false);
        UserTO uto = mapper.map(u, UserTO.class);
        try {
            service.update(uto);
            fail("null id exception should be thrown");
        } catch (IllegalArgumentException ex) {
View Full Code Here

Examples of cz.podcastee.domain.entities.User

    public void init() {
        users = new ListDataModel(accountManager.getAllUsers());
    }

    public String grantAdminAction() {
        User user = (User) users.getRowData();
        accountManager.changePrivileges(user, true);
        return "success";
    }
View Full Code Here

Examples of data.User

      InetAddress inetAddress = InetAddress.getLocalHost();
      String ip = inetAddress.getHostAddress().toString();
      //nun mit dem Server connecten und ihm die Logindaten senden!
      user = Datenbank.getInstance().getLoggedUser(tfNickname.getText(),
        User.toHash(new String(pfPasswort.getPassword())));
      newUser = new User(user.getNick(), user.getNachname(), user.getVorname(),
        user.getKlasse(), user.getPwHash(), user.getKoop(), user.getNKoop(),
        user.getPunkteG(), user.getPunkte5(), user.getPunkte10(),
        user.getPunkte20(), user.getPunkte50(), user.getOnline(), ip);
      isOk = true;
      dispose();
View Full Code Here

Examples of databeans.User

  }

  public void create(User user) throws DAOException {
    try {
      Transaction.begin();
      User dbUser = factory.create(user.getEmailAddress());
      factory.copyInto(user,dbUser);
      Transaction.commit();
    } catch (DuplicateKeyException e) {
      throw new DAOException("A user named "+user.getEmailAddress()+" already exists");
    } catch (RollbackException e) {
View Full Code Here

Examples of db.User

 
  private void logon(){
    HttpSession session = request.getSession(true);
    String user = request.getParameter("user");
    String password = request.getParameter("password");
    User userTable = new User();
    userTable.setUserName(user);
    userTable.setPassword(password);
    userTable.setActive(1);
    userTable.setRights(0);
    response.setContentType("text/xml");
    try {
      PrintWriter out = response.getWriter();
      out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
      out.println("<AjaxResponse data=\"login\">");
      if(userTable.logon(dbConnection)){
        out.println("<Login>true</Login>");
        session.setAttribute("user", user);
        session.setAttribute("rights", 0);
      }else{
        out.println("<Login>false</Login>");
View Full Code Here

Examples of de.bananaco.bpermissions.api.User

    }

    @Override
    public Set<String> hasOfflinePermissions(String player, Set<String> perms) {
        HashSet<String> hasperms = new HashSet<String>();
        User usr = wm.getDefaultWorld().getUser(player);
        if(usr != null) {
            try { usr.calculateEffectivePermissions(); } catch (Exception x) {}
            Map<String,Boolean> p = usr.getMappedPermissions();
            for (String pp : perms) {
                String permval = name + "." + pp;
                Boolean v = p.get(permval);
                if (v != null) {
                    if(v.booleanValue())
View Full Code Here

Examples of de.bananaco.permissions.util.User

    if (world == null || world.equals("")) {
      System.err.println("[bPermissions] Some silly developer is checking for a blank world!");
      return "BLANKWORLD";
    }
    WorldPermissions perms = wpm.getPermissionSet(world).getWorldPermissions();
    User us = perms.getUser(player);
    if(us.contains(valueToGet))
      return us.getValue(valueToGet);
   
    String value = "";
    int priority = -1;
    for (Permission perm : us.getEffectivePermissions()) {
      if (perm.isTrue()) {
        String name = perm.name();
        String[] index = name.split("\\.", 3);
        if (index.length == 3 && index[0].equals(valueToGet)) {
          int pr = Integer.parseInt(index[1]);
          if (pr > priority) {
            value = index[2];
            priority = pr;
          }
        }
      }
    }
    us.setValue(valueToGet, value);
    return value;
  }
View Full Code Here

Examples of de.fhdw.ify208.ticketmaster.dataaccess.User

     * @param theCustomer
     * @return AddressListDTO
     */
    public AddressListDTO getCustomerAddresses(CustomerDTO theCustomer) {
        AddressListDTO addressListDTO = new AddressListDTO();
        User customer = _checkCustomerExists(theCustomer.getid());
        if (customer == null) {
            addressListDTO.setReturncode(99);
            addressListDTO.setMessage("Customer does not exist on database.");
        } else {
            EntityMapper mapper = new EntityMapper();
            List<Address> addressList = customer.getAddresses();
            for (Iterator<Address> i = addressList.iterator(); i.hasNext(); ) {
                addressListDTO.addAddressToList(mapper.getAddressDTOfromAddress(i.next()));
            }
        }
        return addressListDTO;
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.