Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.ejb.user.persist
Class UserPersistBean  view UserPersistBean download UserPersistBean.java

java.lang.Object
  extended bycom.flexstor.ejb.EjbBean
      extended bycom.flexstor.ejb.PersistSessionBean
          extended bycom.flexstor.ejb.user.persist.UserPersistBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

public class UserPersistBean
extends com.flexstor.ejb.PersistSessionBean

UserPersist

Defines a user of the FLEXSTORdb system, allowing it to authenticate, retrieve and update information.

Uses cache: yes State Management Type: Stateless

Configurable properties in flexdm.properties:

NONE


Field Summary
static java.lang.String IDENTIFIER
           
 
Fields inherited from class com.flexstor.ejb.PersistSessionBean
C_DUPLICATE_RECORD
 
Fields inherited from class com.flexstor.ejb.EjbBean
beanName, sCacheDirectory, sEJBVendor
 
Constructor Summary
UserPersistBean()
          Default constructor for the UserPersistBean class
 
Method Summary
 void addGroup(com.flexstor.common.keys.ejb.GroupKey aGroupKey, com.flexstor.common.data.ejb.user.UserData uData)
          Add a group to the current collection of groups for a user Transaction Attribute: Required
private  com.flexstor.ejb.sql.NestedUserGroupT addUserToGroups(java.util.Vector vAssignedGroups)
           
 com.flexstor.common.data.ejb.user.UserData authenticate(java.lang.String aUserID, java.lang.String aLoginPassword)
          Confirms that the user logging into Flexstor.DB is authorized to do so.
 boolean authenticateNumber(java.lang.Long nUserNumber)
          Confirms that the user logging into Flexstor.DB is authorized to do so.
private  java.util.Vector createProperties(java.util.Vector props)
           
 void ejbCreate()
          EJB container calls ejbCreate in order to create an instance of the object.
 boolean fastAuthenticate(java.lang.String aUserID, java.lang.String aLoginPassword)
          Confirms that the user logging into Flexstor.DB is authorized to do so.
private  java.lang.String getColumnUPDATE(java.lang.String aUserID, java.lang.String aColumnName)
          Retrieve the actual SQL query used to update a column in a user record
private  com.flexstor.ejb.address.persist.EmailAddressPersist getEMailAddressPersist()
           
private  com.flexstor.ejb.address.persist.FtpAddressPersist getFtpAddressPersist()
           
private  com.flexstor.ejb.property.persist.PropertyPersist getPropertyPersist()
           
private  com.flexstor.ejb.role.persist.RolePersist getRolePersistBean()
           
 com.flexstor.common.data.ejb.user.UserData getShallow(java.lang.String aUserID)
          This will retrieve a user data object with no keys or references associations.
private  com.flexstor.ejb.translog.persist.TransactionLogPersist getTransLogBean()
           
 com.flexstor.common.data.ejb.user.UserData getUser(java.lang.String aUserID)
          Retrieve User's state data by user identification Transaction Attribute: Not Supported
 com.flexstor.common.data.ejb.user.UserData getUser(com.flexstor.common.keys.ejb.UserKey aKey)
          Retrieve the data object represented by the object reference Transaction Attribute: Not Supported
 java.util.Hashtable getUserList()
          Retrieve the entire list of users registered in the system Transaction Attribute: Not Supported
 java.util.Hashtable getUserList(int[] nDisguiseIDs)
          Retrieve the users that have access to a disguise Transaction Attribute: Not Supported
 com.flexstor.common.data.ejb.user.UserData insert(com.flexstor.common.data.ejb.user.UserData aUser)
          Add a FLEXSTOR.db user to the database Transaction Attribute: Required
private  void logTransaction(int transType, java.lang.String sDescription, java.lang.String sUser)
          Log an update to a table in the transaction log
 void remove(com.flexstor.common.keys.ejb.UserKey aUserKey)
          Remove a FLEXSTOR.db user from the database Transaction Attribute: Required
 void removeGroup(com.flexstor.common.keys.ejb.GroupKey aGroupKey, com.flexstor.common.data.ejb.user.UserData uData)
          Remove a group from the current collection of groups for a user Transaction Attribute: Required
 java.lang.String returnUserID(java.lang.Long nUserNumber)
          Confirms that the user logging into Flexstor.DB is authorized to do so.
 void setEMailAddress(com.flexstor.common.keys.ejb.EmailAddressKey aKey, com.flexstor.common.keys.ejb.UserKey key)
          Assign an email address or change the current email address of a user Transaction Attribute: Required
 void setFtpAddress(com.flexstor.common.keys.ejb.FtpAddressKey aKey, com.flexstor.common.keys.ejb.UserKey key)
          Assign an ftp address or change the current ftp address of a user Transaction Attribute: Required
 com.flexstor.common.data.ejb.user.UserData update(com.flexstor.common.data.ejb.user.UserData aUser)
          Update FLEXSTOR.db user information in the database Transaction Attribute: Required
 void updatePassword(java.lang.String aUserID, java.lang.String aPassword)
          Change a user's FLEXSTOR.db password Transaction Attribute: Required
private  java.util.Vector updateProperties(java.util.Vector props)
           
 com.flexstor.common.data.ejb.user.UserData updateShallow(com.flexstor.common.data.ejb.user.UserData aUser)
          Shallow Update FLEXSTOR.db user information in the database Just take care about primary info, email\ftp address and language.
 
Methods inherited from class com.flexstor.ejb.PersistSessionBean
cacheExists, closeConnection, closePhysicalConnection, dateFormat, ejbRemove, fromCache, getConnection, getDisguiseStructure, getPhysicalConnection, getSequenceFromBean, getSequenceFromBean, getSequenceFromBean, toCache, xCache
 
Methods inherited from class com.flexstor.ejb.EjbBean
assertBoolean, assertEmptyString, assertNull, buildInitialContext, cacheEnabled, ejbActivate, ejbPassivate, getBeanHome, getBooleanProperty, getCacheDirectory, getEJBObject, getInitialContext, getIntegerProperty, getIntegerProperty, getProperty, getProperty, getSessionContext, keepAlive, setSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDENTIFIER

public static final java.lang.String IDENTIFIER
See Also:
Constant Field Values
Constructor Detail

UserPersistBean

public UserPersistBean()
Default constructor for the UserPersistBean class

Method Detail

addGroup

public void addGroup(com.flexstor.common.keys.ejb.GroupKey aGroupKey,
                     com.flexstor.common.data.ejb.user.UserData uData)
              throws com.flexstor.common.exceptions.ejb.EjbException,
                     java.rmi.RemoteException
Add a group to the current collection of groups for a user Transaction Attribute: Required


ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException,
                      com.flexstor.common.exceptions.ejb.EjbException,
                      java.rmi.RemoteException
EJB container calls ejbCreate in order to create an instance of the object. ejbCreate initalizes the state of
the EJB object. This method corresponds to the create method in the home interface "UserPersistHome".


getColumnUPDATE

private java.lang.String getColumnUPDATE(java.lang.String aUserID,
                                         java.lang.String aColumnName)
Retrieve the actual SQL query used to update a column in a user record


getUser

public com.flexstor.common.data.ejb.user.UserData getUser(com.flexstor.common.keys.ejb.UserKey aKey)
                                                   throws com.flexstor.common.exceptions.ejb.EjbException,
                                                          java.rmi.RemoteException,
                                                          com.flexstor.common.exceptions.ejb.NotFoundException
Retrieve the data object represented by the object reference Transaction Attribute: Not Supported


getUser

public com.flexstor.common.data.ejb.user.UserData getUser(java.lang.String aUserID)
                                                   throws com.flexstor.common.exceptions.ejb.NotFoundException,
                                                          com.flexstor.common.exceptions.ejb.EjbException,
                                                          java.rmi.RemoteException
Retrieve User's state data by user identification Transaction Attribute: Not Supported


getShallow

public com.flexstor.common.data.ejb.user.UserData getShallow(java.lang.String aUserID)
                                                      throws com.flexstor.common.exceptions.ejb.NotFoundException,
                                                             com.flexstor.common.exceptions.ejb.EjbException,
                                                             java.rmi.RemoteException
This will retrieve a user data object with no keys or references associations. This is strictly for Fast retrieval of user info. An update can be done on this data object by using the updateShallow() method. Transaction Attribute: Not Supported


getUserList

public java.util.Hashtable getUserList()
                                throws com.flexstor.common.exceptions.ejb.EjbException,
                                       java.rmi.RemoteException
Retrieve the entire list of users registered in the system Transaction Attribute: Not Supported


getUserList

public java.util.Hashtable getUserList(int[] nDisguiseIDs)
                                throws com.flexstor.common.exceptions.ejb.EjbException,
                                       java.rmi.RemoteException
Retrieve the users that have access to a disguise Transaction Attribute: Not Supported


insert

public com.flexstor.common.data.ejb.user.UserData insert(com.flexstor.common.data.ejb.user.UserData aUser)
                                                  throws com.flexstor.common.exceptions.ejb.DuplicateRecordException,
                                                         com.flexstor.common.exceptions.ejb.EjbException,
                                                         java.rmi.RemoteException
Add a FLEXSTOR.db user to the database Transaction Attribute: Required


remove

public void remove(com.flexstor.common.keys.ejb.UserKey aUserKey)
            throws com.flexstor.common.exceptions.ejb.EjbException,
                   java.rmi.RemoteException,
                   com.flexstor.common.exceptions.ejb.NotFoundException
Remove a FLEXSTOR.db user from the database Transaction Attribute: Required


removeGroup

public void removeGroup(com.flexstor.common.keys.ejb.GroupKey aGroupKey,
                        com.flexstor.common.data.ejb.user.UserData uData)
                 throws com.flexstor.common.exceptions.ejb.EjbException,
                        java.rmi.RemoteException
Remove a group from the current collection of groups for a user Transaction Attribute: Required


setEMailAddress

public void setEMailAddress(com.flexstor.common.keys.ejb.EmailAddressKey aKey,
                            com.flexstor.common.keys.ejb.UserKey key)
                     throws com.flexstor.common.exceptions.ejb.EjbException,
                            java.rmi.RemoteException
Assign an email address or change the current email address of a user Transaction Attribute: Required


setFtpAddress

public void setFtpAddress(com.flexstor.common.keys.ejb.FtpAddressKey aKey,
                          com.flexstor.common.keys.ejb.UserKey key)
                   throws com.flexstor.common.exceptions.ejb.EjbException,
                          java.rmi.RemoteException
Assign an ftp address or change the current ftp address of a user Transaction Attribute: Required


update

public com.flexstor.common.data.ejb.user.UserData update(com.flexstor.common.data.ejb.user.UserData aUser)
                                                  throws java.rmi.RemoteException,
                                                         com.flexstor.common.exceptions.ejb.EjbException,
                                                         com.flexstor.common.exceptions.ejb.DuplicateRecordException
Update FLEXSTOR.db user information in the database Transaction Attribute: Required


addUserToGroups

private com.flexstor.ejb.sql.NestedUserGroupT addUserToGroups(java.util.Vector vAssignedGroups)
                                                       throws com.flexstor.common.exceptions.ejb.EjbException,
                                                              java.sql.SQLException,
                                                              java.rmi.RemoteException

updateShallow

public com.flexstor.common.data.ejb.user.UserData updateShallow(com.flexstor.common.data.ejb.user.UserData aUser)
                                                         throws java.rmi.RemoteException,
                                                                com.flexstor.common.exceptions.ejb.EjbException,
                                                                com.flexstor.common.exceptions.ejb.DuplicateRecordException,
                                                                com.flexstor.common.exceptions.ejb.RecordUpdatedException
Shallow Update FLEXSTOR.db user information in the database Just take care about primary info, email\ftp address and language. Transaction Attribute: Required


updatePassword

public void updatePassword(java.lang.String aUserID,
                           java.lang.String aPassword)
                    throws com.flexstor.common.exceptions.ejb.EjbException,
                           java.rmi.RemoteException
Change a user's FLEXSTOR.db password Transaction Attribute: Required


authenticate

public com.flexstor.common.data.ejb.user.UserData authenticate(java.lang.String aUserID,
                                                               java.lang.String aLoginPassword)
                                                        throws com.flexstor.common.exceptions.ejb.EjbException,
                                                               com.flexstor.common.exceptions.ejb.NotFoundException,
                                                               com.flexstor.common.exceptions.ejb.AuthenticationFailedException,
                                                               java.rmi.RemoteException
Confirms that the user logging into Flexstor.DB is authorized to do so. Transaction Attribute: Not Supported


authenticateNumber

public boolean authenticateNumber(java.lang.Long nUserNumber)
                           throws com.flexstor.common.exceptions.ejb.EjbException,
                                  com.flexstor.common.exceptions.ejb.NotFoundException,
                                  java.rmi.RemoteException
Confirms that the user logging into Flexstor.DB is authorized to do so. Transaction Attribute: Not Supported


returnUserID

public java.lang.String returnUserID(java.lang.Long nUserNumber)
                              throws com.flexstor.common.exceptions.ejb.EjbException,
                                     com.flexstor.common.exceptions.ejb.NotFoundException,
                                     java.rmi.RemoteException
Confirms that the user logging into Flexstor.DB is authorized to do so. Transaction Attribute: Not Supported


fastAuthenticate

public boolean fastAuthenticate(java.lang.String aUserID,
                                java.lang.String aLoginPassword)
                         throws com.flexstor.common.exceptions.ejb.EjbException,
                                com.flexstor.common.exceptions.ejb.NotFoundException,
                                com.flexstor.common.exceptions.ejb.AuthenticationFailedException,
                                java.rmi.RemoteException
Confirms that the user logging into Flexstor.DB is authorized to do so. Transaction Attribute: Not Supported


logTransaction

private void logTransaction(int transType,
                            java.lang.String sDescription,
                            java.lang.String sUser)
                     throws com.flexstor.common.exceptions.ejb.EjbException,
                            java.rmi.RemoteException
Log an update to a table in the transaction log


createProperties

private java.util.Vector createProperties(java.util.Vector props)
                                   throws com.flexstor.common.exceptions.ejb.EjbException,
                                          java.rmi.RemoteException,
                                          java.sql.SQLException,
                                          com.flexstor.common.exceptions.ejb.NotFoundException

updateProperties

private java.util.Vector updateProperties(java.util.Vector props)
                                   throws com.flexstor.common.exceptions.ejb.EjbException,
                                          java.rmi.RemoteException

getTransLogBean

private com.flexstor.ejb.translog.persist.TransactionLogPersist getTransLogBean()
                                                                         throws com.flexstor.common.exceptions.ejb.EjbException

getRolePersistBean

private com.flexstor.ejb.role.persist.RolePersist getRolePersistBean()
                                                              throws com.flexstor.common.exceptions.ejb.EjbException

getEMailAddressPersist

private com.flexstor.ejb.address.persist.EmailAddressPersist getEMailAddressPersist()
                                                                             throws com.flexstor.common.exceptions.ejb.EjbException

getFtpAddressPersist

private com.flexstor.ejb.address.persist.FtpAddressPersist getFtpAddressPersist()
                                                                         throws com.flexstor.common.exceptions.ejb.EjbException

getPropertyPersist

private com.flexstor.ejb.property.persist.PropertyPersist getPropertyPersist()
                                                                      throws com.flexstor.common.exceptions.ejb.EjbException