Package org.apache.tapestry.vlib.ejb

Examples of org.apache.tapestry.vlib.ejb.Person


    {
        Connection connection = null;
        IStatement statement = null;
        ResultSet set = null;

        Person result = null;

        try
        {
            connection = getConnection();
View Full Code Here


    public Person login(String email, String password)
        throws RemoteException, LoginException
    {
        IPersonHome home = getPersonHome();
        IPerson person = null;
        Person result = null;

        try
        {
            person = home.findByEmail(email);
        }
        catch (FinderException ex)
        {
            throw new LoginException("Unknown e-mail address.", false);
        }

        if (!person.getPassword().equals(password))
            throw new LoginException("Invalid password.", true);

        try
        {
            result = getPerson((Integer) person.getPrimaryKey());
        }
        catch (FinderException ex)
        {
            throw new LoginException("Could not read person.", false);
        }

        if (result.isLockedOut())
            throw new LoginException(
                    "You have been locked out of the Virtual Library.", false);

        // Set the last access time for any subsequent login.
View Full Code Here

        int count = Tapestry.size(updated);

        for(int i = 0; i < count; i++)
        {
            Person u = updated[i];
            IPerson person = home.findByPrimaryKey(u.getId());

            person.setAdmin(u.isAdmin());
            person.setLockedOut(u.isLockedOut());
        }

        count = Tapestry.size(resetPassword);

        for(int i = 0; i < count; i++)
View Full Code Here

        columns[Person.EMAIL_COLUMN] = set.getString(column++);
        columns[Person.LOCKED_OUT_COLUMN] = getBoolean(set, column++);
        columns[Person.ADMIN_COLUMN] = getBoolean(set, column++);
        columns[Person.LAST_ACCESS_COLUMN] = set.getTimestamp(column++);

        return new Person(columns);
    }
View Full Code Here

            public Object doRemote() throws RemoteException
            {

                try
                {
                    Person person = getOperations().login(getEmail(), password);

                    loginUser(person);

                    return null;
                }
View Full Code Here

    {
        Connection connection = null;
        IStatement statement = null;
        ResultSet set = null;

        Person result = null;

        try
        {
            connection = getConnection();
View Full Code Here

    public Person login(String email, String password) throws RemoteException, LoginException
    {
        IPersonHome home = getPersonHome();
        IPerson person = null;
        Person result = null;

        try
        {
            person = home.findByEmail(email);
        }
        catch (FinderException ex)
        {
            throw new LoginException("Unknown e-mail address.", false);
        }

        if (!person.getPassword().equals(password))
            throw new LoginException("Invalid password.", true);

        try
        {
            result = getPerson((Integer) person.getPrimaryKey());
        }
        catch (FinderException ex)
        {
            throw new LoginException("Could not read person.", false);
        }

        if (result.isLockedOut())
            throw new LoginException("You have been locked out of the Virtual Library.", false);

        // Set the last access time for any subsequent login.

        person.setLastAccess(new Timestamp(System.currentTimeMillis()));
View Full Code Here

        int count = Tapestry.size(updated);

        for (int i = 0; i < count; i++)
        {
            Person u = updated[i];
            IPerson person = home.findByPrimaryKey(u.getId());

            person.setAdmin(u.isAdmin());
            person.setLockedOut(u.isLockedOut());
        }

        count = Tapestry.size(resetPassword);

        for (int i = 0; i < count; i++)
View Full Code Here

        columns[Person.EMAIL_COLUMN] = set.getString(column++);
        columns[Person.LOCKED_OUT_COLUMN] = getBoolean(set, column++);
        columns[Person.ADMIN_COLUMN] = getBoolean(set, column++);
        columns[Person.LAST_ACCESS_COLUMN] = set.getTimestamp(column++);

        return new Person(columns);
    }
View Full Code Here

        {
            public Object doRemote() throws RemoteException
            {
                try
                {
                    Person user = getOperations().registerNewUser(
                            getFirstName(),
                            getLastName(),
                            getEmail(),
                            password1);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.vlib.ejb.Person

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.