Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.turbine.services.security.torque
Class UserPeerManager

    java.lang.Object
      org.apache.turbine.services.security.torque.UserPeerManager

All Implemented Interfaces:
  Serializable, UserPeerManagerConstants

    public class UserPeerManager

extends Object
implements UserPeerManagerConstants

This class capsulates all direct Peer access for the User entities. It allows the exchange of the default Turbine supplied TurbineUserPeer class against a custom class.

Version:
  $Id: UserPeerManager.java 1096130 2011-04-23 10:37:19Z ludwig $
Author:
  Henning P. Schmiedehausen
See Also:
  Serialized Form

Field Summary

Fields inherited from interface org.apache.turbine.services.security.torque.UserPeerManagerConstants
`USER_CLASS_KEY, USER_CONFIRM_COLUMN_DEFAULT, USER_CONFIRM_COLUMN_KEY, USER_CONFIRM_PROPERTY_DEFAULT, USER_CONFIRM_PROPERTY_KEY, USER_CREATE_COLUMN_DEFAULT, USER_CREATE_COLUMN_KEY, USER_CREATE_PROPERTY_DEFAULT, USER_CREATE_PROPERTY_KEY, USER_EMAIL_COLUMN_DEFAULT, USER_EMAIL_COLUMN_KEY, USER_EMAIL_PROPERTY_DEFAULT, USER_EMAIL_PROPERTY_KEY, USER_FIRST_NAME_COLUMN_DEFAULT, USER_FIRST_NAME_COLUMN_KEY, USER_FIRST_NAME_PROPERTY_DEFAULT, USER_FIRST_NAME_PROPERTY_KEY, USER_ID_COLUMN_DEFAULT, USER_ID_COLUMN_KEY, USER_ID_PROPERTY_DEFAULT, USER_ID_PROPERTY_KEY, USER_LAST_LOGIN_COLUMN_DEFAULT, USER_LAST_LOGIN_COLUMN_KEY, USER_LAST_LOGIN_PROPERTY_DEFAULT, USER_LAST_LOGIN_PROPERTY_KEY, USER_LAST_NAME_COLUMN_DEFAULT, USER_LAST_NAME_COLUMN_KEY, USER_LAST_NAME_PROPERTY_DEFAULT, USER_LAST_NAME_PROPERTY_KEY, USER_NAME_COLUMN_DEFAULT, USER_NAME_COLUMN_KEY, USER_NAME_PROPERTY_DEFAULT, USER_NAME_PROPERTY_KEY, USER_OBJECTDATA_COLUMN_DEFAULT, USER_OBJECTDATA_COLUMN_KEY, USER_OBJECTDATA_PROPERTY_DEFAULT, USER_OBJECTDATA_PROPERTY_KEY, USER_PASSWORD_COLUMN_DEFAULT, USER_PASSWORD_COLUMN_KEY, USER_PASSWORD_PROPERTY_DEFAULT, USER_PASSWORD_PROPERTY_KEY, USER_PEER_CLASS_DEFAULT, USER_PEER_CLASS_KEY`

Constructor Summary
`UserPeerManager()`

Method Summary
`static org.apache.torque.util.Criteria` | `buildCriteria(User user)` Calls buildCriteria(User user) in the configured UserPeer.
`static boolean` | `checkExists(User user)` Checks if a User is defined in the system.
`static void` | `doDelete(org.apache.torque.util.Criteria criteria)` Invokes doDelete(Criteria c) on the configured Peer Object
`static void` | `doInsert(org.apache.torque.util.Criteria criteria)` Invokes doInsert(Criteria c) on the configured Peer Object
`static List` | `doSelect(org.apache.torque.util.Criteria criteria)` Invokes doSelect(Criteria c) on the configured Peer Object
`static void` | `doUpdate(org.apache.torque.util.Criteria criteria)` Invokes doUpdate(Criteria c) on the configured Peer Object
`static String` | `getColumnName(String name)` Returns the full name of a column.
`static String` | `getConfirmColumn()` Returns the fully qualified name of the Column to use as the Confirm Column for a role
`static String` | `getCreateDateColumn()` Returns the fully qualified name of the Column to use as the CreateDate Column for a role
`static String` | `getEmailColumn()` Returns the fully qualified name of the Column to use as the Email Column for a role
`static String` | `getFirstNameColumn()` Returns the fully qualified name of the Column to use as the FirstName Column for a role
`String` | `getFullColumnName(String name)` Deprecated. use getColumnName(String name)
`static Integer` | `getIdAsObj(org.apache.torque.om.Persistent obj)` Invokes getId() on the supplied base object
`static String` | `getIdColumn()` Returns the fully qualified name of the Column to use as the Id Column for a group
`static String` | `getLastLoginColumn()` Returns the fully qualified name of the Column to use as the LastLogin Column for a role
`static String` | `getLastNameColumn()` Returns the fully qualified name of the Column to use as the LastName Column for a role
`static String` | `getName(org.apache.torque.om.Persistent obj)` Invokes getName() on the supplied base object
`static String` | `getNameColumn()` Returns the fully qualified name of the Column to use as the Name Column for a group
`static User` | `getNewUser(org.apache.torque.om.Persistent p)` Returns a new, configured User Object with a supplied Persistent object at its core
`static String` | `getObjectdataColumn()` Returns the fully qualified name of the Column to use as the objectdata Column for a role
`static String` | `getPasswordColumn()` Returns the fully qualified name of the Column to use as the Password Column for a role
`static String` | `getTableName()` Get the name of this table.
`static String` | `getUserConfirmed(org.apache.torque.om.Persistent obj)` Invokes getConfirmed() on the supplied base object
`static Date` | `getUserCreateDate(org.apache.torque.om.Persistent obj)` Invokes getCreateDate() on the supplied base object
`static String` | `getUserEmail(org.apache.torque.om.Persistent obj)` Invokes getEmail() on the supplied base object
`static String` | `getUserFirstName(org.apache.torque.om.Persistent obj)` Invokes getFirstName() on the supplied base object
`static Date` | `getUserLastLogin(org.apache.torque.om.Persistent obj)` Invokes getLastLogin() on the supplied base object
`static String` | `getUserLastName(org.apache.torque.om.Persistent obj)` Invokes getLastName() on the supplied base object
`static String` | `getUserName(org.apache.torque.om.Persistent obj)` Deprecated. use getName(obj)
`static byte[]` | `getUserObjectdata(org.apache.torque.om.Persistent obj)` Invokes getObjectdata() on the supplied base object
`static String` | `getUserPassword(org.apache.torque.om.Persistent obj)` Invokes getPassword() on the supplied base object
`static void` | `init(org.apache.commons.configuration.Configuration conf)` Initializes the UserPeerManager, loading the class object for the Peer used to retrieve User objects
`static org.apache.torque.om.Persistent` | `newPersistentInstance()` Returns a new, empty object for the underlying peer.
`static List` | `selectAllConfirmedUsers()` Returns a List of all confirmed User objects.
`static List` | `selectAllUsers()` Returns a List of all User objects.
`static void` | `setId(org.apache.torque.om.Persistent obj, int id)` Invokes setId(int n) on the supplied base object
`static void` | `setUserConfirmed(org.apache.torque.om.Persistent obj, String confirm)` Invokes setConfirmed(String s) on the supplied base object
`static void` | `setUserCreateDate(org.apache.torque.om.Persistent obj, Date createDate)` Invokes setCreateDate(java.util.Date date) on the supplied base object
`static void` | `setUserEmail(org.apache.torque.om.Persistent obj, String email)` Invokes setEmail(String s) on the supplied base object
`static void` | `setUserFirstName(org.apache.torque.om.Persistent obj, String firstName)` Invokes setFirstName(String s) on the supplied base object
`static void` | `setUserLastLogin(org.apache.torque.om.Persistent obj, Date lastLogin)` Invokes setLastLogin(java.util.Date date) on the supplied base object
`static void` | `setUserLastName(org.apache.torque.om.Persistent obj, String lastName)` Invokes setLastName(String s) on the supplied base object
`static void` | `setUserName(org.apache.torque.om.Persistent obj, String name)` Invokes setName(String s) on the supplied base object
`static void` | `setUserObjectdata(org.apache.torque.om.Persistent obj, byte[] objectdata)` Invokes setObjectdata(byte [] date) on the supplied base object
`static void` | `setUserPassword(org.apache.torque.om.Persistent obj, String password)` Invokes setPassword(String s) on the supplied base object

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### UserPeerManager

    public UserPeerManager()

Method Detail

### init

    public static void init(org.apache.commons.configuration.Configuration conf)
                     throws InitializationException

  Initializes the UserPeerManager, loading the class object for the Peer used to retrieve User objects

  Parameters:
    `conf` - The configuration object used to configure the Manager
  Throws:
    `InitializationException` - A problem occured during initialization

### getTableName

    public static String getTableName()

  Get the name of this table.

  Returns:
    A String with the name of the table.

### getNameColumn

    public static String getNameColumn()

  Returns the fully qualified name of the Column to use as the Name Column for a group

  Returns:
    A String containing the column name

### getIdColumn

    public static String getIdColumn()

  Returns the fully qualified name of the Column to use as the Id Column for a group

  Returns:
    A String containing the column id

### getPasswordColumn

    public static String getPasswordColumn()

  Returns the fully qualified name of the Column to use as the Password Column for a role

  Returns:
    A String containing the column name

### getFirstNameColumn

    public static String getFirstNameColumn()

  Returns the fully qualified name of the Column to use as the FirstName Column for a role

  Returns:
    A String containing the column name

### getLastNameColumn

    public static String getLastNameColumn()

  Returns the fully qualified name of the Column to use as the LastName Column for a role

  Returns:
    A String containing the column name

### getEmailColumn

    public static String getEmailColumn()

  Returns the fully qualified name of the Column to use as the Email Column for a role

  Returns:
    A String containing the column name

### getConfirmColumn

    public static String getConfirmColumn()

  Returns the fully qualified name of the Column to use as the Confirm Column for a role

  Returns:
    A String containing the column name

### getCreateDateColumn

    public static String getCreateDateColumn()

  Returns the fully qualified name of the Column to use as the CreateDate Column for a role

  Returns:
    A String containing the column name

### getLastLoginColumn

    public static String getLastLoginColumn()

  Returns the fully qualified name of the Column to use as the LastLogin Column for a role

  Returns:
    A String containing the column name

### getObjectdataColumn

    public static String getObjectdataColumn()

  Returns the fully qualified name of the Column to use as the objectdata Column for a role

  Returns:
    A String containing the column name

### getColumnName

    public static String getColumnName(String name)

  Returns the full name of a column.

  Parameters:
    `name` - The column to fully qualify
  Returns:
    A String with the full name of the column.

### getFullColumnName

    public String getFullColumnName(String name)

  Deprecated. use getColumnName(String name)

  Returns the full name of a column.

  Parameters:
    `name` - The column to fully qualify
  Returns:
    A String with the full name of the column.

### newPersistentInstance

    public static org.apache.torque.om.Persistent newPersistentInstance()

  Returns a new, empty object for the underlying peer. Used to create a new underlying object

  Returns:
    A new object which is compatible to the Peer and can be used as a User object

### checkExists

    public static boolean checkExists(User user)
                               throws DataBackendException,
                                      Exception

  Checks if a User is defined in the system. The name is used as query criteria.

  Parameters:
    `user` - The User to be checked.
  Returns:
    `true` if given User exists in the system.
  Throws:
    `DataBackendException` - when more than one User with the same name exists.
    `Exception` - A generic exception.

### selectAllUsers

    public static List selectAllUsers()
                               throws Exception

  Returns a List of all User objects.

  Returns:
    A List with all users in the system.
  Throws:
    `Exception` - A generic exception.

### selectAllConfirmedUsers

    public static List selectAllConfirmedUsers()
                                        throws Exception

  Returns a List of all confirmed User objects.

  Returns:
    A List with all confirmed users in the system.
  Throws:
    `Exception` - A generic exception.

### buildCriteria

    public static org.apache.torque.util.Criteria buildCriteria(User user)

  Calls buildCriteria(User user) in the configured UserPeer. If you get a ClassCastException in this routine, you put a User object into this method which can't be cast into an object for the TorqueSecurityService. This is a configuration error most of the time.

  Parameters:
    `user` - An object which implements the User interface
  Returns:
    A criteria for the supplied user object

### doUpdate

    public static void doUpdate(org.apache.torque.util.Criteria criteria)
                         throws org.apache.torque.TorqueException

  Invokes doUpdate(Criteria c) on the configured Peer Object

  Parameters:
    `criteria` - A Criteria Object
  Throws:
    `org.apache.torque.TorqueException` - A problem occured.

### doInsert

    public static void doInsert(org.apache.torque.util.Criteria criteria)
                         throws org.apache.torque.TorqueException

  Invokes doInsert(Criteria c) on the configured Peer Object

  Parameters:
    `criteria` - A Criteria Object
  Throws:
    `org.apache.torque.TorqueException` - A problem occured.

### doSelect

    public static List doSelect(org.apache.torque.util.Criteria criteria)
                         throws org.apache.torque.TorqueException

  Invokes doSelect(Criteria c) on the configured Peer Object

  Parameters:
    `criteria` - A Criteria Object
  Returns:
    A List of User Objects selected by the Criteria
  Throws:
    `org.apache.torque.TorqueException` - A problem occured.

### doDelete

    public static void doDelete(org.apache.torque.util.Criteria criteria)
                         throws org.apache.torque.TorqueException

  Invokes doDelete(Criteria c) on the configured Peer Object

  Parameters:
    `criteria` - A Criteria Object
  Throws:
    `org.apache.torque.TorqueException` - A problem occured.

### setUserName

    public static void setUserName(org.apache.torque.om.Persistent obj,
                                   String name)

  Invokes setName(String s) on the supplied base object

  Parameters:
    `obj` - The object to use for setting the name
    `name` - The Name to set

### getUserName

    public static String getUserName(org.apache.torque.om.Persistent obj)

  Deprecated. use getName(obj)

  Invokes getName() on the supplied base object

  Parameters:
    `obj` - The object to use for getting the name
  Returns:
    A string containing the name

### getName

    public static String getName(org.apache.torque.om.Persistent obj)

  Invokes getName() on the supplied base object

  Parameters:
    `obj` - The object to use for getting the name
  Returns:
    A string containing the name

### setUserPassword

    public static void setUserPassword(org.apache.torque.om.Persistent obj,
                                       String password)

  Invokes setPassword(String s) on the supplied base object

  Parameters:
    `obj` - The object to use for setting the password
    `password` - The Password to set

### getUserPassword

    public static String getUserPassword(org.apache.torque.om.Persistent obj)

  Invokes getPassword() on the supplied base object

  Parameters:
    `obj` - The object to use for getting the password
  Returns:
    A string containing the password

### setUserFirstName

    public static void setUserFirstName(org.apache.torque.om.Persistent obj,
                                        String firstName)

  Invokes setFirstName(String s) on the supplied base object

  Parameters:
    `obj` - The object to use for setting the first name
    `firstName` - The first name to set

### getUserFirstName

    public static String getUserFirstName(org.apache.torque.om.Persistent obj)

  Invokes getFirstName() on the supplied base object

  Parameters:
    `obj` - The object to use for getting the first name
  Returns:
    A string containing the first name

### setUserLastName

    public static void setUserLastName(org.apache.torque.om.Persistent obj,
                                       String lastName)

  Invokes setLastName(String s) on the supplied base object

  Parameters:
    `obj` - The object to use for setting the last name
    `lastName` - The Last Name to set

### getUserLastName

    public static String getUserLastName(org.apache.torque.om.Persistent obj)

  Invokes getLastName() on the supplied base object

  Parameters:
    `obj` - The object to use for getting the last name
  Returns:
    A string containing the last name

### setUserEmail

    public static void setUserEmail(org.apache.torque.om.Persistent obj,
                                    String email)

  Invokes setEmail(String s) on the supplied base object

  Parameters:
    `obj` - The object to use for setting the email
    `email` - The Email to set

### getUserEmail

    public static String getUserEmail(org.apache.torque.om.Persistent obj)

  Invokes getEmail() on the supplied base object

  Parameters:
    `obj` - The object to use for getting the email
  Returns:
    A string containing the email

### setUserConfirmed

    public static void setUserConfirmed(org.apache.torque.om.Persistent obj,
                                        String confirm)

  Invokes setConfirmed(String s) on the supplied base object

  Parameters:
    `obj` - The object to use for setting the confirm value
    `confirm` - The confirm value to set

### getUserConfirmed

    public static String getUserConfirmed(org.apache.torque.om.Persistent obj)

  Invokes getConfirmed() on the supplied base object

  Parameters:
    `obj` - The object to use for getting the confirm value
  Returns:
    A string containing the confirm value

### setUserCreateDate

    public static void setUserCreateDate(org.apache.torque.om.Persistent obj,
                                         Date createDate)

  Invokes setCreateDate(java.util.Date date) on the supplied base object

  Parameters:
    `obj` - The object to use for setting the create date
    `createDate` - The create date to set

### getUserCreateDate

    public static Date getUserCreateDate(org.apache.torque.om.Persistent obj)

  Invokes getCreateDate() on the supplied base object

  Parameters:
    `obj` - The object to use for getting the create date
  Returns:
    A string containing the create date

### setUserLastLogin

    public static void setUserLastLogin(org.apache.torque.om.Persistent obj,
                                        Date lastLogin)

  Invokes setLastLogin(java.util.Date date) on the supplied base object

  Parameters:
    `obj` - The object to use for setting the last login daet
    `lastLogin` - The last login date to set

### getUserLastLogin

    public static Date getUserLastLogin(org.apache.torque.om.Persistent obj)

  Invokes getLastLogin() on the supplied base object

  Parameters:
    `obj` - The object to use for getting the last login date
  Returns:
    A string containing the last login date

### setUserObjectdata

    public static void setUserObjectdata(org.apache.torque.om.Persistent obj,
                                         byte[] objectdata)

  Invokes setObjectdata(byte [] date) on the supplied base object

  Parameters:
    `obj` - The object to use for setting the last login daet
    `objectdata` - The objectdata to use

### getUserObjectdata

    public static byte[] getUserObjectdata(org.apache.torque.om.Persistent obj)

  Invokes getObjectdata() on the supplied base object

  Parameters:
    `obj` - The object to use for getting the last login date
  Returns:
    A string containing the last login date

### setId

    public static void setId(org.apache.torque.om.Persistent obj,
                             int id)

  Invokes setId(int n) on the supplied base object

  Parameters:
    `obj` - The object to use for setting the name
    `id` - The new Id

### getIdAsObj

    public static Integer getIdAsObj(org.apache.torque.om.Persistent obj)

  Invokes getId() on the supplied base object

  Parameters:
    `obj` - The object to use for getting the id
  Returns:
    The Id of this object

### getNewUser

    public static User getNewUser(org.apache.torque.om.Persistent p)

  Returns a new, configured User Object with a supplied Persistent object at its core

  Parameters:
    `p` - The persistent object
  Returns:
    a new, configured User Object
  Throws:
    `Exception` - Could not create a new Object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 The Apache Software Foundation. All Rights Reserved.