org.tigris.scarab.om
Class AbstractScarabUser

java.lang.Object
  extended byorg.apache.torque.om.BaseObject
      extended byorg.tigris.scarab.om.AbstractScarabUser
All Implemented Interfaces:
org.apache.torque.om.Persistent, java.io.Serializable

public abstract class AbstractScarabUser
extends org.apache.torque.om.BaseObject

This class contains common code for the use in ScarabUser implementations. Functionality that is not implementation specific should go here.

Version:
$Id: AbstractScarabUser.java 10275 2006-08-31 14:43:23Z jorgeuriarte $
Author:
Jon S. Stevens, John McNally
See Also:
Serialized Form

Field Summary
protected  java.util.Locale locale
          The user's preferred locale.
 
Fields inherited from class org.apache.torque.om.BaseObject
NEW_ID
 
Constructor Summary
AbstractScarabUser()
          Calls the superclass constructor to initialize this object.
 
Method Summary
 void addRMITsToCurrentMITList(java.util.List rmits)
           
protected abstract  void deleteRModuleUserAttribute(RModuleUserAttribute rmua)
           
protected  void filterRMITList(java.util.List rmits, java.lang.String searchField, java.lang.String searchString)
          Filter on module or issue type name.
 java.util.List getAllRModuleIssueTypes(Module module)
           
 java.util.Map getAssociatedUsersMap()
           
 java.util.List getCopyToModules(Module currentModule)
           
 java.util.List getCopyToModules(Module currentModule, java.lang.String action)
           
 java.util.List getCopyToModules(Module currentModule, java.lang.String action, java.lang.String searchString)
          Get modules user can copy or move to.
 IssueType getCurrentIssueType()
          The current issue type
 MITList getCurrentMITList()
           
 Module getCurrentModule()
          The current module
 ReportBridge getCurrentReport(java.lang.String key)
           
 RModuleIssueType getCurrentRModuleIssueType()
           
 java.util.List getEditableModules()
           
 java.util.List getEditableModules(Module currEditModule)
           
abstract  java.lang.String getEmail()
           
 int getEnterIssueRedirect()
          Returns integer representing user preference for Which screen to return to after entering an issue. 1 = Enter New Issue. 2 = Assign Issue (default) 3 = View Issue. 4 = Issue Types index.
abstract  java.lang.String getFirstName()
           
 java.lang.String getHomePage()
           
 java.lang.String getHomePage(Module module)
           
abstract  java.lang.String getLastName()
           
 java.util.Locale getLocale()
          Gets the users default locale from the users preferences.
 java.lang.String getMatrixTarget()
           
 java.util.List getMITLists()
          Gets active, named lists
abstract  java.util.List getModules()
           
abstract  java.util.List getModules(boolean showDeletedModules)
           
abstract  Module[] getModules(java.lang.String permission)
           
 java.lang.String getMostRecentQuery()
           
 java.lang.String getName()
           
protected  RModuleUserAttribute getNewRModuleUserAttribute(Attribute attribute, Module module, IssueType issueType)
           
 java.util.Locale getPreferredLocale()
          get preferred Locale from user preferences
 java.lang.String getQueryTarget()
           
 Issue getReportingIssue(java.lang.String key)
           
 RModuleUserAttribute getRModuleUserAttribute(Module module, Attribute attribute, IssueType issueType)
           
protected abstract  java.util.List getRModuleUserAttributes(org.apache.torque.util.Criteria crit)
          Should return a list of RModuleUserAttribute's that meet the given criteria.
 java.util.List getRModuleUserAttributes(Module module, IssueType issueType)
           
 java.util.List getSearchableRMITs(java.lang.String searchField, java.lang.String searchString, java.lang.String sortColumn, java.lang.String sortPolarity, Module skipModule)
           
 java.util.Map getSelectedUsersMap()
           
 java.lang.String getStats()
          Report the sizes of maps used to hold per-thread attributes
 java.lang.Object getThreadKey()
           
 java.util.List getUnusedRModuleIssueTypes(Module module)
           
abstract  java.lang.Integer getUserId()
          The Primary Key used to reference this user in storage
 boolean hasAnySearchableRMITs()
           
 boolean hasMostRecentQuery()
           
 boolean hasPermission(java.lang.String perm, java.util.List modules)
           
abstract  boolean hasPermission(java.lang.String perm, Module module)
           
 boolean isShowOtherModulesInIssueTypeList()
           
 java.lang.Object lastEnteredIssueTypeOrTemplate()
           
 void removeItemsFromCurrentMITList(java.lang.String[] ids)
           
 void save()
           
 void save(java.sql.Connection dbCon)
           
 void save(java.lang.String dbName)
           
 void setAssociatedUsersMap(java.util.Map associatedUsers)
           
 void setCurrentIssueType(IssueType v)
          The current issue type
 void setCurrentMITList(MITList list)
           
 void setCurrentModule(Module v)
          The current module
 java.lang.String setCurrentReport(ReportBridge report)
           
 void setCurrentReport(java.lang.String key, ReportBridge report)
           
 void setEnterIssueRedirect(int templateCode)
          Sets integer representing user preference for Which screen to return to after entering an issue. 1 = Enter New Issue. 2 = Assign Issue (default) 3 = View Issue. 4 = Issue Types index.
 void setHomePage(java.lang.String homePage)
           
 void setLastEnteredIssueType(IssueType type)
           
 void setLastEnteredTemplate(Issue template)
           
 void setLocale(java.util.Locale newLocale)
          Set the user's locale to a new value.
 void setMostRecentQuery(java.lang.String queryString)
           
 java.lang.String setReportingIssue(Issue issue)
           
 void setReportingIssue(java.lang.String key, Issue issue)
           
 void setSelectedUsersMap(java.util.Map selectedUsers)
           
 void setShowOtherModulesInIssueTypeList(boolean newShowOtherModulesInIssueTypeList)
           
 void setSingleIssueTypeQueryTarget(IssueType type, java.lang.String target)
           
 void setThreadKey(java.lang.Integer key)
           
protected  void sortRMITList(java.util.List rmits, java.lang.String sortColumn, java.lang.String sortPolarity)
          Sort module or issue type name.
 void updateIssueListAttributes(java.util.List attributes)
           
 
Methods inherited from class org.apache.torque.om.BaseObject
equals, equals, getByName, getByPeerName, getByPosition, getLog, getPrimaryKey, hashCode, isModified, isNew, resetModified, setModified, setNew, setPrimaryKey, setPrimaryKey, setPrimaryKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locale

protected java.util.Locale locale
The user's preferred locale.

Constructor Detail

AbstractScarabUser

public AbstractScarabUser()
Calls the superclass constructor to initialize this object.

Method Detail

getUserId

public abstract java.lang.Integer getUserId()
The Primary Key used to reference this user in storage


getEmail

public abstract java.lang.String getEmail()
See Also:
User.getEmail()

getFirstName

public abstract java.lang.String getFirstName()
See Also:
User.getFirstName()

getLastName

public abstract java.lang.String getLastName()
See Also:
User.getLastName()

hasPermission

public abstract boolean hasPermission(java.lang.String perm,
                                      Module module)
See Also:
ScarabUser.hasPermission(String, Module)

hasPermission

public boolean hasPermission(java.lang.String perm,
                             java.util.List modules)
See Also:
ScarabUser.hasPermission(String, List)

getName

public java.lang.String getName()
See Also:
It will be the "FirstName LastName", if both names have a value.

getModules

public abstract java.util.List getModules()
                                   throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.getModules()

getModules

public abstract Module[] getModules(java.lang.String permission)
                             throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.getModules(String)

getModules

public abstract java.util.List getModules(boolean showDeletedModules)
                                   throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.getModules(boolean)

getEditableModules

public java.util.List getEditableModules()
                                  throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.getEditableModules()

getCopyToModules

public java.util.List getCopyToModules(Module currentModule,
                                       java.lang.String action,
                                       java.lang.String searchString)
                                throws org.apache.torque.TorqueException
Get modules user can copy or move to. If copying, requires ISSUE_ENTER permission If moving, requires ISSUE_MOVE permission to move To another module, or ISSUE_EDIT to move to another issue type.

Throws:
org.apache.torque.TorqueException

getCopyToModules

public java.util.List getCopyToModules(Module currentModule)
                                throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.getCopyToModules(Module)

getCopyToModules

public java.util.List getCopyToModules(Module currentModule,
                                       java.lang.String action)
                                throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.getCopyToModules(Module, String)

getEditableModules

public java.util.List getEditableModules(Module currEditModule)
                                  throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.getEditableModules(Module)

getRModuleUserAttributes

public java.util.List getRModuleUserAttributes(Module module,
                                               IssueType issueType)
                                        throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.getRModuleUserAttributes(Module, IssueType)

getRModuleUserAttributes

protected abstract java.util.List getRModuleUserAttributes(org.apache.torque.util.Criteria crit)
                                                    throws org.apache.torque.TorqueException
Should return a list of RModuleUserAttribute's that meet the given criteria.

Throws:
org.apache.torque.TorqueException

getRModuleUserAttribute

public RModuleUserAttribute getRModuleUserAttribute(Module module,
                                                    Attribute attribute,
                                                    IssueType issueType)
                                             throws org.apache.torque.TorqueException,
                                                    ScarabException
Throws:
org.apache.torque.TorqueException
ScarabException
See Also:
ScarabUser.getRModuleUserAttribute(Module, Attribute, IssueType)

getNewRModuleUserAttribute

protected RModuleUserAttribute getNewRModuleUserAttribute(Attribute attribute,
                                                          Module module,
                                                          IssueType issueType)
                                                   throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getReportingIssue

public Issue getReportingIssue(java.lang.String key)
See Also:
ScarabUser.getReportingIssue(String)

setReportingIssue

public java.lang.String setReportingIssue(Issue issue)
                                   throws ScarabException
Throws:
ScarabException
See Also:
ScarabUser.setReportingIssue(Issue)

setReportingIssue

public void setReportingIssue(java.lang.String key,
                              Issue issue)
See Also:
ScarabUser.setReportingIssue(String, Issue)

getCurrentReport

public ReportBridge getCurrentReport(java.lang.String key)
See Also:
ScarabUser.getCurrentReport(String)

setCurrentReport

public java.lang.String setCurrentReport(ReportBridge report)
                                  throws ScarabException
Throws:
ScarabException
See Also:
ScarabUser.setCurrentReport(ReportBridge)

setCurrentReport

public void setCurrentReport(java.lang.String key,
                             ReportBridge report)
See Also:
ScarabUser.setCurrentReport(String, ReportBridge)

save

public void save()
          throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
this implementation throws an UnsupportedOperationException.

save

public void save(java.lang.String dbName)
          throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
this implementation throws an UnsupportedOperationException.

save

public void save(java.sql.Connection dbCon)
          throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
this implementation throws an UnsupportedOperationException.

getEnterIssueRedirect

public int getEnterIssueRedirect()
                          throws org.apache.torque.TorqueException
Returns integer representing user preference for Which screen to return to after entering an issue. 1 = Enter New Issue. 2 = Assign Issue (default) 3 = View Issue. 4 = Issue Types index.

Throws:
org.apache.torque.TorqueException

setEnterIssueRedirect

public void setEnterIssueRedirect(int templateCode)
                           throws org.apache.torque.TorqueException
Sets integer representing user preference for Which screen to return to after entering an issue. 1 = Enter New Issue. 2 = Assign Issue (default) 3 = View Issue. 4 = Issue Types index.

Throws:
org.apache.torque.TorqueException

getHomePage

public java.lang.String getHomePage()
                             throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.getHomePage()

getHomePage

public java.lang.String getHomePage(Module module)
See Also:
ScarabUser.getHomePage(Module)

setHomePage

public void setHomePage(java.lang.String homePage)
                 throws org.apache.torque.TorqueException,
                        ScarabException
Throws:
org.apache.torque.TorqueException
ScarabException
See Also:
ScarabUser.setHomePage(String)

getQueryTarget

public java.lang.String getQueryTarget()
See Also:
ScarabUser.getQueryTarget()

getMatrixTarget

public java.lang.String getMatrixTarget()

setSingleIssueTypeQueryTarget

public void setSingleIssueTypeQueryTarget(IssueType type,
                                          java.lang.String target)
See Also:
ScarabUser.setSingleIssueTypeQueryTarget(IssueType, String)

getMITLists

public java.util.List getMITLists()
                           throws org.apache.torque.TorqueException
Gets active, named lists

Returns:
a List value
Throws:
org.apache.torque.TorqueException - if an error occurs

hasAnySearchableRMITs

public boolean hasAnySearchableRMITs()
                              throws org.apache.torque.TorqueException,
                                     com.workingdogs.village.DataSetException
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
See Also:
ScarabUser.hasAnySearchableRMITs().

getUnusedRModuleIssueTypes

public java.util.List getUnusedRModuleIssueTypes(Module module)
                                          throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.getUnusedRModuleIssueTypes(Module).

getAllRModuleIssueTypes

public java.util.List getAllRModuleIssueTypes(Module module)
                                       throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.getAllRModuleIssueTypes(Module).

getSearchableRMITs

public java.util.List getSearchableRMITs(java.lang.String searchField,
                                         java.lang.String searchString,
                                         java.lang.String sortColumn,
                                         java.lang.String sortPolarity,
                                         Module skipModule)
                                  throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
This list does not include RModuleIssueTypes that are part of the current MITList.

filterRMITList

protected void filterRMITList(java.util.List rmits,
                              java.lang.String searchField,
                              java.lang.String searchString)
                       throws org.apache.torque.TorqueException
Filter on module or issue type name.

Throws:
org.apache.torque.TorqueException

sortRMITList

protected void sortRMITList(java.util.List rmits,
                            java.lang.String sortColumn,
                            java.lang.String sortPolarity)
                     throws org.apache.torque.TorqueException
Sort module or issue type name.

Throws:
org.apache.torque.TorqueException

addRMITsToCurrentMITList

public void addRMITsToCurrentMITList(java.util.List rmits)
                              throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getThreadKey

public java.lang.Object getThreadKey()
See Also:
ScarabUser.getThreadKey()

setThreadKey

public void setThreadKey(java.lang.Integer key)
See Also:
ScarabUser.setThreadKey(Integer)

getCurrentMITList

public MITList getCurrentMITList()

setCurrentMITList

public void setCurrentMITList(MITList list)
See Also:
ScarabUser.setCurrentMITList(MITList)

removeItemsFromCurrentMITList

public void removeItemsFromCurrentMITList(java.lang.String[] ids)

hasMostRecentQuery

public boolean hasMostRecentQuery()
See Also:
ScarabUser.hasMostRecentQuery()

getMostRecentQuery

public java.lang.String getMostRecentQuery()
See Also:
ScarabUser.getMostRecentQuery()

setMostRecentQuery

public void setMostRecentQuery(java.lang.String queryString)
See Also:
ScarabUser.setMostRecentQuery(String)

lastEnteredIssueTypeOrTemplate

public java.lang.Object lastEnteredIssueTypeOrTemplate()

setLastEnteredIssueType

public void setLastEnteredIssueType(IssueType type)
See Also:
ScarabUser.setLastEnteredIssueType(IssueType)

setLastEnteredTemplate

public void setLastEnteredTemplate(Issue template)
See Also:
ScarabUser.setLastEnteredTemplate(Issue)

getAssociatedUsersMap

public java.util.Map getAssociatedUsersMap()
                                    throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.getAssociatedUsersMap()

setAssociatedUsersMap

public void setAssociatedUsersMap(java.util.Map associatedUsers)
                           throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.setAssociatedUsersMap(Map)

getSelectedUsersMap

public java.util.Map getSelectedUsersMap()
                                  throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.getSelectedUsersMap()

setSelectedUsersMap

public void setSelectedUsersMap(java.util.Map selectedUsers)
                         throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.setSelectedUsersMap(Map)

getCurrentModule

public Module getCurrentModule()
The current module


setCurrentModule

public void setCurrentModule(Module v)
The current module


getCurrentIssueType

public IssueType getCurrentIssueType()
                              throws org.apache.torque.TorqueException
The current issue type

Throws:
org.apache.torque.TorqueException

setCurrentIssueType

public void setCurrentIssueType(IssueType v)
The current issue type


getCurrentRModuleIssueType

public RModuleIssueType getCurrentRModuleIssueType()
                                            throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException
See Also:
ScarabUser.getCurrentRModuleIssueType()

updateIssueListAttributes

public void updateIssueListAttributes(java.util.List attributes)
                               throws org.apache.torque.TorqueException,
                                      org.apache.fulcrum.security.util.TurbineSecurityException
Throws:
org.apache.torque.TorqueException
org.apache.fulcrum.security.util.TurbineSecurityException
See Also:
ScarabUser.updateIssueListAttributes(List)

deleteRModuleUserAttribute

protected abstract void deleteRModuleUserAttribute(RModuleUserAttribute rmua)
                                            throws org.apache.torque.TorqueException,
                                                   org.apache.fulcrum.security.util.TurbineSecurityException
Throws:
org.apache.torque.TorqueException
org.apache.fulcrum.security.util.TurbineSecurityException

getStats

public java.lang.String getStats()
Report the sizes of maps used to hold per-thread attributes


setLocale

public void setLocale(java.util.Locale newLocale)
Set the user's locale to a new value.


getLocale

public java.util.Locale getLocale()
Gets the users default locale from the users preferences.


getPreferredLocale

public java.util.Locale getPreferredLocale()
get preferred Locale from user preferences

Returns:

isShowOtherModulesInIssueTypeList

public boolean isShowOtherModulesInIssueTypeList()
See Also:
ScarabUser.isShowOtherModulesInIssueTypeList()

setShowOtherModulesInIssueTypeList

public void setShowOtherModulesInIssueTypeList(boolean newShowOtherModulesInIssueTypeList)
See Also:
ScarabUser.setShowOtherModulesInIssueTypeList(boolean)


Copyright © 2000-2004 Tigris.org. All Rights Reserved.