1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.api.service;
|
10
|
|
11
|
import java.util.List;
|
12
|
import java.util.UUID;
|
13
|
|
14
|
import org.hibernate.criterion.Criterion;
|
15
|
import org.springframework.security.provisioning.GroupManager;
|
16
|
|
17
|
import eu.etaxonomy.cdm.model.permission.Group;
|
18
|
import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
|
19
|
import eu.etaxonomy.cdm.persistence.query.MatchMode;
|
20
|
import eu.etaxonomy.cdm.persistence.query.OrderHint;
|
21
|
|
22
|
/**
|
23
|
* Service for {@link Group user groups}
|
24
|
*
|
25
|
* @author n.hoffmann
|
26
|
* @since Mar 9, 2011
|
27
|
*/
|
28
|
public interface IGroupService extends IService<Group>, GroupManager{
|
29
|
|
30
|
/**
|
31
|
* Return a List of groups matching the given query string, optionally filtered by class, optionally with a particular MatchMode
|
32
|
*
|
33
|
* @param queryString the query string to filter by
|
34
|
* @param matchmode use a particular type of matching (can be null - defaults to exact matching)
|
35
|
* @param criteria additional criteria to filter by
|
36
|
* @param pageSize The maximum number of objects returned (can be null for all objects)
|
37
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
38
|
* @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
|
39
|
* @param orderHints
|
40
|
* Supports path like <code>orderHints.propertyNames</code> which
|
41
|
* include *-to-one properties like createdBy.username or
|
42
|
* authorTeam.persistentTitleCache
|
43
|
* @return a list of instances of type Group matching the queryString
|
44
|
*
|
45
|
* @see {@link IIdentifiableEntityService#listByTitle(Class, String, MatchMode, List, Integer, Integer, List, List)}
|
46
|
*/
|
47
|
public List<Group> listByName(String queryString, MatchMode matchmode, List<Criterion> criteria, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
|
48
|
|
49
|
public UUID saveGroup(Group group);
|
50
|
|
51
|
/**
|
52
|
* Checks whether or not a group with the given name exists.
|
53
|
* @param username
|
54
|
*/
|
55
|
public boolean groupExists(String groupName);
|
56
|
|
57
|
/**
|
58
|
* Returns the group with the given group name or <code>null</code> if such a user
|
59
|
* does not exist.
|
60
|
*/
|
61
|
public Group findGroup(String groupName);
|
62
|
}
|