Synergy Home Page

au.edu.swin.synergy.plugin.userdb
Class BPrivileged

java.lang.Object
  |
  +--au.edu.swin.synergy.plugin.userdb.BPrivileged
Direct Known Subclasses:
BGroup, BUser

public abstract class BPrivileged
extends Object
implements Serializable

Anything that has privileges extends this class. It contains various generic privilege settings that may be applied to such classes as users and groups.

Author:
Tristan Austin Please complete these missing tags
Copyright Belongs To:
 
See Also:
Serialized Form

Field Summary
static int kAdministrator
          The constant identifying the privilage "administrator"
static int kUser
          The constant identifying the privilage "user"
 
Constructor Summary
BPrivileged()
          Creates a new privileged object with no values.
BPrivileged(Long uniqueID, String name)
          Creates an object with the given name and the ip address of the client machine Please complete the missing tags for BPrivileged
BPrivileged(String name)
          Creates a privileged object with the given name and the ip address of the client machine Please complete the missing tags for BPrivileged
 
Method Summary
 void addMember(String newMember)
          Adds the new member to the list of members
 boolean equals(Object item)
          Determines whether this item is equal to the item passed in.
 String getComments()
          Supplies the comments associated with this
 Vector getMembers()
          Returns the Vector containing the list of memberships relating to this item.
 String getName()
          Gets the name of this item
 int getPrivilege()
          Supplies the privilage associated with this
 Long getUniqueID()
          Gets the unique id of this item
 boolean isNew()
          Indicates whether this requires a unique ID or not.
 void removeAllMembers()
          This will remove all references to other members in this privileged item.
 void removeMember(String oldMember)
          Removes the member from the list of members.
 void setComments(String comments)
          Sets the comments of this to that specified
 void setMembers(Vector members)
          Takes the Vector containing the list of memberships relating to this item.
 void setName(String name)
          Sets the name to that specified
 void setPrivilege(int privilege)
          Sets the privilage of this to that specified
 void setUniqueID(Long newID)
          Sets the unique id of this item
 String toString()
          Returns a representation of this as a string
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

kUser

public static final int kUser
The constant identifying the privilage "user"

kAdministrator

public static final int kAdministrator
The constant identifying the privilage "administrator"
Constructor Detail

BPrivileged

public BPrivileged()
Creates a new privileged object with no values. Please complete the missing tags for BPrivileged
Parameters:
-  

BPrivileged

public BPrivileged(String name)
            throws BInvalidPropertyException
Creates a privileged object with the given name and the ip address of the client machine Please complete the missing tags for BPrivileged
Parameters:
-  

BPrivileged

public BPrivileged(Long uniqueID,
                   String name)
            throws BInvalidPropertyException
Creates an object with the given name and the ip address of the client machine Please complete the missing tags for BPrivileged
Parameters:
-  
Method Detail

getName

public final String getName()
Gets the name of this item
Parameters:
-  
Returns:
The name Please complete the missing tags for getName
Pre Condition:
 
Post Condition:
 

setName

public final void setName(String name)
                   throws BInvalidPropertyException
Sets the name to that specified
Parameters:
name - The name of this item Please complete the missing tags for setName
Returns:
 
Pre Condition:
 
Post Condition:
 

getUniqueID

public final Long getUniqueID()
Gets the unique id of this item
Parameters:
-  
Returns:
The unique id identifying this item Please complete the missing tags for getUniqueID
Pre Condition:
 
Post Condition:
 

setUniqueID

public final void setUniqueID(Long newID)
Sets the unique id of this item
Parameters:
The - unique id identifying this item Please complete the missing tags for setUniqueID
Returns:
 
Pre Condition:
 
Post Condition:
 

getPrivilege

public final int getPrivilege()
Supplies the privilage associated with this
Parameters:
-  
Returns:
The Privilage as defined in this class Please complete the missing tags for getPrivilege
Pre Condition:
 
Post Condition:
 

setPrivilege

public final void setPrivilege(int privilege)
                        throws BInvalidPropertyException
Sets the privilage of this to that specified
Parameters:
privilage - The new privilage of this Please complete the missing tags for setPrivilege
Returns:
 
Pre Condition:
 
Post Condition:
 

getComments

public final String getComments()
Supplies the comments associated with this
Parameters:
-  
Returns:
The comments regarding this user Please complete the missing tags for getComments
Pre Condition:
 
Post Condition:
 

setComments

public final void setComments(String comments)
Sets the comments of this to that specified
Parameters:
comments - The new comments of this Please complete the missing tags for setComments
Returns:
 
Pre Condition:
 
Post Condition:
 

getMembers

public final Vector getMembers()
Returns the Vector containing the list of memberships relating to this item. This may be a list of groups a user is a member of, or a list of users a group has as members.
Parameters:
-  
Returns:
The list of members names Please complete the missing tags for getMembers
Pre Condition:
 
Post Condition:
 

setMembers

public final void setMembers(Vector members)
Takes the Vector containing the list of memberships relating to this item. This may be a list of groups a user is a member of, or a list of users a group has as members.
Parameters:
-  
Returns:
The list of members names Please complete the missing tags for setMembers
Pre Condition:
 
Post Condition:
 

isNew

public boolean isNew()
Indicates whether this requires a unique ID or not. This is the case when the item is being added to the database.
Parameters:
-  
Returns:
True if it does, false otherwise Please complete the missing tags for isNew
Pre Condition:
 
Post Condition:
 

addMember

public final void addMember(String newMember)
Adds the new member to the list of members
Parameters:
newMember - The new member for this privileged item Please complete the missing tags for addMember
Returns:
 
Pre Condition:
 
Post Condition:
 

removeAllMembers

public final void removeAllMembers()
This will remove all references to other members in this privileged item.
Parameters:
-  
Returns:
 
Pre Condition:
 
Post Condition:
Vector of members will be either null or empty Please complete the missing tags for removeAllMembers

removeMember

public final void removeMember(String oldMember)
Removes the member from the list of members. If the member doesn't already exist it will be ignored.
Parameters:
oldMember - The member to be removed from this privileged item Please complete the missing tags for removeMember
Returns:
 
Pre Condition:
 
Post Condition:
 

toString

public String toString()
Returns a representation of this as a string
Parameters:
-  
Returns:
The name of the this item Please complete the missing tags for toString
Overrides:
toString in class Object
Pre Condition:
 
Post Condition:
 

equals

public final boolean equals(Object item)
Determines whether this item is equal to the item passed in.
Parameters:
user - The user to compare Please complete the missing tags for equals
Returns:
 
Overrides:
equals in class Object
Pre Condition:
 
Post Condition:
 

Synergy Home Page