org.mozdev.MacroTracker.classes
Class User

java.lang.Object
  extended by org.mozdev.MacroTracker.classes.User
All Implemented Interfaces:
java.io.Serializable

public final class User
extends java.lang.Object
implements java.io.Serializable

Represents a user stored in the MacroTracker database. Information stored in the class is the username of the user, the password of the user, and the email of the user. Email is kept so that it can be displayed in the MacroTracker owner field and other areas. This class also contains the permissions on what the user is allowed to modify in the database.

Version:
0.1
Author:
R.J. Keller , Pete Bohan
See Also:
Serialized Form

Constructor Summary
User(java.lang.String name, java.lang.String email)
          Creates a new User with the user's name and email entered into the user.
 
Method Summary
 boolean canConfirm()
          Returns whether or not this user can confirm bugs.
 boolean canCreateGroups()
          Returns whether or not this user can create groups.
 boolean canEditBugs()
          Returns whether or not the current user can edit bugs.
 boolean canEditKeywords()
          Returns whether or not this user can edit Bugzilla keywords.
 boolean canEditUsers()
          Returns whether or not this user can edit other users settings.
 boolean equals(User userToCompare)
          Returns true if the user is equal to that of another user.
 boolean getEditComponents()
          Returns whether or not this user can edit components.
 java.lang.String getEmail()
          Returns the user's email.
 java.lang.String getName()
          Returns the user's name.
 java.lang.String getPassword()
          Returns the user's password.
 java.lang.String getUsername()
          Returns the user's username.
 void setCanConfirm(boolean confirm)
          This field is only used if you have enabled the "unconfirmed" status.
 void setCreateGroups(boolean crtgrp)
          This option will allow a user to create and destroy groups in Bugzilla.
 void setEditBugs(boolean ceb)
          Unless a user has this bit set, they can only edit those bugs for which they are the assignee or the reporter.
 void setEditComponents(boolean cec)
          This flag allows a user to create new products and components, as well as modify and destroy those that have no bugs associated with them.
 void setEditKeywords(boolean cek)
          If you use Bugzilla's keyword functionality, enabling this feature allows a user to create and destroy keywords.
 void setEditUsers(boolean ceu)
          This flag allows a user to do what you're doing right now: edit other users.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

User

public User(java.lang.String name,
            java.lang.String email)
Creates a new User with the user's name and email entered into the user.

Parameters:
name - The user's name
email - The user's email
Method Detail

setEditUsers

public void setEditUsers(boolean ceu)
This flag allows a user to do what you're doing right now: edit other users. This will allow those with the right to do so to remove administrator privileges from other users or grant them to themselves. Enable with care.


canEditUsers

public boolean canEditUsers()
Returns whether or not this user can edit other users settings.

Returns:
whether or not this user can edit other users settings.
See Also:
setEditUsers(boolean)

setEditKeywords

public void setEditKeywords(boolean cek)
If you use Bugzilla's keyword functionality, enabling this feature allows a user to create and destroy keywords. As always, the keywords for existing bugs containing the keyword the user wishes to destroy must be changed before Bugzilla will allow it to die.


canEditKeywords

public boolean canEditKeywords()
Returns whether or not this user can edit Bugzilla keywords.

Returns:
whether or not this user can edit Bugzilla keywords.
See Also:
setEditKeywords(boolean)

setEditComponents

public void setEditComponents(boolean cec)
This flag allows a user to create new products and components, as well as modify and destroy those that have no bugs associated with them. If a product or component has bugs associated with it, those bugs must be moved to a different product or component before Bugzilla will allow them to be destroyed.


getEditComponents

public boolean getEditComponents()
Returns whether or not this user can edit components.

Returns:
whether or not this user can edit components.
See Also:
setEditComponents(boolean)

setEditBugs

public void setEditBugs(boolean ceb)
Unless a user has this bit set, they can only edit those bugs for which they are the assignee or the reporter. Even if this option is unchecked, users can still add comments to bugs.


canEditBugs

public boolean canEditBugs()
Returns whether or not the current user can edit bugs.

Returns:
whether or not the current user can edit bugs.
See Also:
setEditBugs(boolean)

setCreateGroups

public void setCreateGroups(boolean crtgrp)
This option will allow a user to create and destroy groups in Bugzilla.

Parameters:
crtgrp - Whether or not the user can create or destroy groups.

canCreateGroups

public boolean canCreateGroups()
Returns whether or not this user can create groups.

Returns:
Whether or not this user can create groups.
See Also:
setCreateGroups(boolean)

setCanConfirm

public void setCanConfirm(boolean confirm)
This field is only used if you have enabled the "unconfirmed" status. If you enable this for a user, that user can then move bugs from "Unconfirmed" to a "Confirmed" status (e.g.: "New" status).

Parameters:
confirm - Whether or not this user can confirm bugs.

canConfirm

public boolean canConfirm()
Returns whether or not this user can confirm bugs.

Returns:
whether or not the user can confirm bugs.
See Also:
setCanConfirm(boolean)

equals

public boolean equals(User userToCompare)
Returns true if the user is equal to that of another user.

Parameters:
userToCompare - The user to compare to this user.
Returns:
Whether or not the user equals the user taken in.

getName

public java.lang.String getName()
Returns the user's name.


getEmail

public java.lang.String getEmail()
Returns the user's email.


getUsername

public java.lang.String getUsername()
Returns the user's username.


getPassword

public java.lang.String getPassword()
Returns the user's password.



Copyright © 2003-2004 R.J. Keller. All Rights Reserved.