|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.base.database.DbGroup
public class DbGroup
Database implementation of the Group interface.
Group,
Serialized Form| Constructor Summary | |
|---|---|
|
DbGroup()
Constructor for internal use only. |
protected |
DbGroup(long id)
Loads a group from the database based on its id. |
protected |
DbGroup(long id,
java.lang.String name)
Creates a new group. |
protected |
DbGroup(java.lang.String name)
Creates a new group. |
protected |
DbGroup(java.lang.String name,
java.lang.Object fake)
Loads a group from the database based on its name. |
| Method Summary | |
|---|---|
void |
addAdministrator(User user)
Grants administrator privileges of the group to a user. |
void |
addMember(User user)
Adds a member to the group. |
void |
deleteProperty(java.lang.String name)
Deletes an extended property. |
boolean |
equals(java.lang.Object object)
|
int |
getAdministratorCount()
Returns the number of group administrators. |
java.util.Iterator |
getAdministrators()
An iterator for all the users that are administrators of the group. |
int |
getCachedSize()
Returns the approximate size of the Object in bytes. |
java.util.Date |
getCreationDate()
Returns the date that the group was created. |
java.lang.String |
getDescription()
Returns the description of the group. |
long |
getID()
Returns the id of the group. |
int |
getMemberCount()
Returns the number of group members. |
java.util.Iterator |
getMembers()
An iterator for all the users that are members of the group. |
java.util.Date |
getModificationDate()
Returns the date that the group was last modified. |
java.lang.String |
getName()
Returns the name of the group. |
Permissions |
getPermissions(AuthToken auth)
Returns the permissions for the group that correspond to the passed-in AuthToken. |
java.lang.String |
getProperty(java.lang.String name)
Returns an extended property of the group. |
java.util.Iterator |
getPropertyNames()
Returns an Iterator for all the names of the extended group properties. |
int |
hashCode()
|
boolean |
isAdministrator(User user)
Returns true if the User has group administrator permissions. |
boolean |
isAuthorized(long permissionType)
Returns true if the handle on the object has the permission specified. |
boolean |
isMember(User user)
Returns true if if the User is a member of the group. |
void |
readExternal(java.io.DataInput in)
|
void |
removeAdministrator(User user)
Revokes administrator privileges of the group to a user. |
void |
removeMember(User user)
Removes a member from the group. |
void |
setCreationDate(java.util.Date creationDate)
Sets the creation date of the group. |
void |
setDescription(java.lang.String description)
Sets the description of the group. |
void |
setModificationDate(java.util.Date modificationDate)
Sets the date the group was last modified. |
void |
setName(java.lang.String name)
Sets the name of the group. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets an extended property of the group. |
java.lang.String |
toString()
Returns a String representation of the Group object using the group name. |
protected void |
updateModificationDate(long date,
java.sql.Connection con)
Updates the modified date. |
void |
writeExternal(java.io.DataOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected DbGroup(java.lang.String name)
name - the name of the group.
protected DbGroup(long id,
java.lang.String name)
protected DbGroup(long id)
throws GroupNotFoundException
id - the id of the group to load.
GroupNotFoundException
protected DbGroup(java.lang.String name,
java.lang.Object fake)
throws GroupNotFoundException
name - the name of the group to load.fake - a fake paramater that can always be null.
GroupNotFoundExceptionpublic DbGroup()
| Method Detail |
|---|
public void readExternal(java.io.DataInput in)
throws java.io.IOException
readExternal in interface com.tangosol.io.ExternalizableLitejava.io.IOException
public void writeExternal(java.io.DataOutput out)
throws java.io.IOException
writeExternal in interface com.tangosol.io.ExternalizableLitejava.io.IOExceptionpublic long getID()
Group
getID in interface Grouppublic java.lang.String getName()
Group
getName in interface Group
public void setName(java.lang.String name)
throws UnauthorizedException
Group
setName in interface Groupname - the name for the group.
UnauthorizedException - if does not have group administrator permissions.public java.lang.String getDescription()
Group
getDescription in interface Group
public void setDescription(java.lang.String description)
throws UnauthorizedException
Group
setDescription in interface Groupdescription - the description of the group.
UnauthorizedException - if does not have group administrator permissions.public java.util.Date getCreationDate()
Group
getCreationDate in interface Group
public void setCreationDate(java.util.Date creationDate)
throws UnauthorizedException
Group
setCreationDate in interface GroupcreationDate - the date the group was created.
UnauthorizedException - if does not have administrator permissions.public java.util.Date getModificationDate()
Group
getModificationDate in interface Group
public void setModificationDate(java.util.Date modificationDate)
throws UnauthorizedException
Group
setModificationDate in interface GroupmodificationDate - the date the group was modified.
UnauthorizedException - if does not have administrator permissions.public java.lang.String getProperty(java.lang.String name)
Group
getProperty in interface Groupname - the name of the property to get.
public void setProperty(java.lang.String name,
java.lang.String value)
Group
setProperty in interface Groupname - the name of the property to set.value - the new value for the property.public void deleteProperty(java.lang.String name)
Groupname does not exist,
this method will do nothing.
deleteProperty in interface Groupname - the name of the property to delete.public java.util.Iterator getPropertyNames()
Group
getPropertyNames in interface Group
public void addAdministrator(User user)
throws UnauthorizedException
Group
addAdministrator in interface Groupuser - the User to grant adminstrative privileges to.
UnauthorizedException - if does not have group administrator permissions.
public void removeAdministrator(User user)
throws UnauthorizedException
Group
removeAdministrator in interface Groupuser - the User to grant adminstrative privileges to.
UnauthorizedException - if does not have group administrator permissions.
public void addMember(User user)
throws UnauthorizedException
Group
addMember in interface Groupuser - the User to add to the group.
UnauthorizedException - if does not have group administrator permissions.
public void removeMember(User user)
throws UnauthorizedException
Group
removeMember in interface Groupuser - the User to remove from the group.
UnauthorizedException - if does not have group administrator permissions.public boolean isAdministrator(User user)
Group
isAdministrator in interface Grouppublic boolean isMember(User user)
Group
isMember in interface Grouppublic int getAdministratorCount()
Group
getAdministratorCount in interface Grouppublic int getMemberCount()
Group
getMemberCount in interface Grouppublic java.util.Iterator getMembers()
Group
getMembers in interface Grouppublic java.util.Iterator getAdministrators()
Group
getAdministrators in interface Grouppublic Permissions getPermissions(AuthToken auth)
Group
getPermissions in interface Groupauth - the auth token to lookup permissions for.
Permissionspublic boolean isAuthorized(long permissionType)
Group
isAuthorized in interface GrouppermissionType - a permission type.
Permissionspublic int getCachedSize()
Cacheable
getCachedSize in interface Cacheablepublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Object
protected void updateModificationDate(long date,
java.sql.Connection con)
throws java.sql.SQLException
java.sql.SQLException
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||