Project

General

Profile

Download (4.08 KB) Statistics
| Branch: | Tag: | Revision:
1 c2f269f9 Andreas Kohlbecker
// $Id$
2 25663b56 Andreas Müller
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy 
5
* http://www.e-taxonomy.eu
6
* 
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
11 2d993c6e Andreas Müller
package eu.etaxonomy.cdm.api.service;
12
13 78f4027b Andreas Müller
import java.util.Collection;
14 2d993c6e Andreas Müller
import java.util.List;
15 78f4027b Andreas Müller
import java.util.Map;
16 2d993c6e Andreas Müller
import java.util.UUID;
17
18 d57c0df0 ben.clark
import eu.etaxonomy.cdm.api.service.pager.Pager;
19 bcb513cd ben.clark
import eu.etaxonomy.cdm.model.agent.Address;
20 6dc51956 ben.clark
import eu.etaxonomy.cdm.model.agent.AgentBase;
21 2c398184 p.kelbert
import eu.etaxonomy.cdm.model.agent.Institution;
22 d57c0df0 ben.clark
import eu.etaxonomy.cdm.model.agent.InstitutionalMembership;
23
import eu.etaxonomy.cdm.model.agent.Person;
24
import eu.etaxonomy.cdm.model.agent.Team;
25 89842e70 n.hoffmann
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
26
import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
27 aba8d6ad ben.clark
import eu.etaxonomy.cdm.persistence.query.OrderHint;
28 2d993c6e Andreas Müller
29 6dc51956 ben.clark
public interface IAgentService extends IIdentifiableEntityService<AgentBase> {
30 c4e812bc ben.clark
		
31 58452b54 Katja Luther
	public List<Institution> searchInstitutionByCode(String code);
32 d57c0df0 ben.clark
	
33
	/**
34
	 * Return a paged list of the institutional memberships held by a person
35
	 * 
36
	 * @param person the person
37
	 * @param pageSize The maximum number of memberships returned (can be null for all memberships)
38
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
39
	 * @return a Pager containing InstitutionalMembership  instances
40
	 */
41
	public Pager<InstitutionalMembership> getInstitutionalMemberships(Person person, Integer pageSize, Integer pageNumber);
42
	
43
	/**
44
	 * Return a paged list of the members of a team
45
	 * 
46
	 * @param team the team
47
	 * @param pageSize The maximum number of members returned (can be null for all members)
48
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
49
	 * @return a Pager containing Person  instances
50
	 */
51
	public Pager<Person> getMembers(Team team, Integer pageSize, Integer pageNumber);
52 bcb513cd ben.clark
	
53
	/**
54
	 * Return a paged list of the addresses of an agent
55
	 * 
56
	 * @param agent the agent
57
	 * @param pageSize The maximum number of addresses returned (can be null for all members)
58
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
59
	 * @return a Pager containing Address  instances
60
	 */
61
	public Pager<Address> getAddresses(AgentBase agent, Integer pageSize, Integer pageNumber);
62 aba8d6ad ben.clark
	
63
	/**
64
	 * Returns a Paged List of AgentBase instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
65
	 * 
66
	 * @param clazz filter the results by class (or pass null to return all AgentBase instances)
67
	 * @param queryString
68
	 * @param pageSize The maximum number of agents returned (can be null for all matching agents)
69
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
70
	 * @param orderHints
71
	 *            Supports path like <code>orderHints.propertyNames</code> which
72
	 *            include *-to-one properties like createdBy.username or
73
	 *            authorTeam.persistentTitleCache
74
	 * @param propertyPaths properties to be initialized
75
	 * @return a Pager Agent instances
76
	 * @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>
77
	 */
78
	public Pager<AgentBase> search(Class<? extends AgentBase> clazz, String queryString, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
79 89842e70 n.hoffmann
	
80
	/**
81
	 * Returns a list of <code>UuidAndTitleCache</code> containing all <code>Person</code>s
82
	 * 
83
	 * @return a list of <code>UuidAndTitleCache</code> instances
84
	 */
85
	public List<UuidAndTitleCache<Person>> getPersonUuidAndNomenclaturalTitle();
86
	
87
	/**
88
	 * Returns a list of <code>UuidAndTitleCache</code> containing all <code>TeamOrPersonBase</code> obejcts
89
	 * with their respective nomenclaturalTitle instead of regular titleCache
90
	 * 
91
	 * @return a list of <code>UuidAndTitleCache</code> instances
92
	 */
93
	public List<UuidAndTitleCache<TeamOrPersonBase>> getTeamOrPersonBaseUuidAndNomenclaturalTitle();
94 2d993c6e Andreas Müller
}