Package com.uc4.api.objects
Class UserAssignment
- java.lang.Object
-
- com.uc4.api.objects.UserAssignment
-
public class UserAssignment extends java.lang.Object
This class enables the assignment of single users to this User Group.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UserAssignment(com.uc4.util.XMLDocument doc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addUser(UC4UserName userName)
Adds a user to this UserGroup.int
getMemberListSize()
int
getNoMemberListSize()
boolean
isInNoMembersList(UC4UserName userName)
Checks if the user is member of the groupboolean
isRevision()
Returns the Revision from this UserGroup.java.util.Iterator<UC4UserName>
memberListIterator()
Returns a list of users who are members of this User Group The returnedjava.util.Iterator
cannot be used to remove users.java.util.Iterator<UC4UserName>
noMemberListIterator()
Returns a list of users who are not members of this User Group The returnedjava.util.Iterator
cannot be used to remove users.void
removeAllUsers()
Removes a all users from this UserGroup.boolean
removeUser(UC4UserName userName)
Removes a user from this UserGroup.protected void
store(com.uc4.util.XMLDocument doc, org.w3c.dom.Element objectElement)
-
-
-
Method Detail
-
memberListIterator
public java.util.Iterator<UC4UserName> memberListIterator()
Returns a list of users who are members of this User Group The returnedjava.util.Iterator
cannot be used to remove users.- Returns:
- Iterator to get a list of user names
-
noMemberListIterator
public java.util.Iterator<UC4UserName> noMemberListIterator()
Returns a list of users who are not members of this User Group The returnedjava.util.Iterator
cannot be used to remove users.- Returns:
- Iterator to get a list of user names
-
getMemberListSize
public int getMemberListSize()
- Returns:
- Number of Users who are part of this User Group.
-
getNoMemberListSize
public int getNoMemberListSize()
- Returns:
- Number of Users who are not part of this User Group.
-
removeAllUsers
public void removeAllUsers()
Removes a all users from this UserGroup.- Throws:
java.lang.IllegalStateException
- when revisioning is set
-
addUser
public boolean addUser(UC4UserName userName)
Adds a user to this UserGroup.- Parameters:
userName
- Name of the user- Returns:
- true if successful, false if the operation failed
- Throws:
java.lang.IllegalStateException
- when revisioning is set
-
removeUser
public boolean removeUser(UC4UserName userName)
Removes a user from this UserGroup.- Parameters:
userName
- Name of the user- Returns:
- true if successful, false if the operation failed
- Throws:
java.lang.IllegalStateException
- when revisioning is set
-
isRevision
public boolean isRevision()
Returns the Revision from this UserGroup.- Returns:
- true/false
-
store
protected void store(com.uc4.util.XMLDocument doc, org.w3c.dom.Element objectElement)
-
isInNoMembersList
public boolean isInNoMembersList(UC4UserName userName)
Checks if the user is member of the group- Parameters:
userName
- Name of the user- Returns:
- true/false
-
-