
com.linkare.commons.dao.security.GroupService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jpa.security Show documentation
Show all versions of jpa.security Show documentation
Project containing the base domain model for security concerns in JPA projects.
The newest version!
package com.linkare.commons.dao.security;
import java.util.List;
import com.linkare.commons.dao.IGenericDAO;
import com.linkare.commons.jpa.security.Group;
import com.linkare.commons.jpa.security.User;
/**
*
* @author Paulo Zenida - Linkare TI
*
*/
public interface GroupService extends IGenericDAO {
/**
*
* @param name
* the name of the group to look for.
* @return the group whose name matches the passed in name
.
*/
public Group findByName(final String name);
/**
*
* @param members
* the list of users that we want to check which ones are members of the group.
* @return the list of non members associated to the group, from the list of all members passed in as argument. This method simply removes from the list of
* members of the group the
*/
public List getNonMembers(final List members);
/**
*
* @param group
* the group to which we want to associate the list of users.
* @param users
* the users that we want to associate to the group
* @return the merged group, after the association of the users.
*/
public Group setUsersMembership(final Group group, final List users);
/**
* It adds the user whose id matches the userId
to the group
passed in, if the user is found. It does nothing otherwise.
*
* @param group
* the group to which we want to add the user
* @param userId
* the user id of the user to associate to the group
*
*/
public void addUser(final Group group, final Long userId);
/**
* It removes the user whose id matches the userId
from group
passed in, if the user is found. It does nothing otherwise.
*
* @param group
* the group from which we want to remove the user
* @param userId
* the user id of the user to disossiate from the group
*/
public void removeUser(final Group group, final Long userId);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy