org.opennms.acl.domain
Class GenericUser

java.lang.Object
  extended by org.opennms.acl.domain.GenericUser
All Implemented Interfaces:
Serializable

public class GenericUser
extends Object
implements Serializable

This entity represent a user managed by Acl application.

Since:
jdk 1.5.0
Version:
$Id: $
Author:
Massimiliano Dessì (desmax74@yahoo.it)
See Also:
Serialized Form

Constructor Summary
GenericUser(UserAuthoritiesDTO user, UserService userService, GroupService groupService)
          Constructor
 
Method Summary
 List<?> getAuthorities()
          Return a list of authorities of this GenericUser
 List<GroupDTO> getFreeGroups()
          Return a list of groups that this GenericUser don't have
 List<GroupDTO> getGroups()
          getGroups
 Long getId()
          Return the GenericUser unique identifier
 String getUsername()
          Return the username of this GenericUser
 UserView getUserView()
          Return a read only GenericUser
 void save()
          Save the user
 void setNewGroups(List<Integer> groups)
          Add a list of groups to this GenericUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericUser

public GenericUser(UserAuthoritiesDTO user,
                   UserService userService,
                   GroupService groupService)
Constructor

Parameters:
user - a UserAuthoritiesDTO object.
userService - a UserService object.
groupService - a GroupService object.
Method Detail

save

public void save()
Save the user


setNewGroups

public void setNewGroups(List<Integer> groups)
Add a list of groups to this GenericUser

Parameters:
groups - a List object.

getFreeGroups

public List<GroupDTO> getFreeGroups()
Return a list of groups that this GenericUser don't have

Returns:
free groups

getGroups

public List<GroupDTO> getGroups()

getGroups

Returns:
a List object.

getUserView

public UserView getUserView()
Return a read only GenericUser

Returns:
a UserView object.

getId

public Long getId()
Return the GenericUser unique identifier

Returns:
a Long object.

getUsername

public String getUsername()
Return the username of this GenericUser

Returns:
a String object.

getAuthorities

public List<?> getAuthorities()
Return a list of authorities of this GenericUser

Returns:
a List object.


Copyright © 2011. All Rights Reserved.