source: DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/PrincipalDao.java @ 5385

Last change on this file since 5385 was 5385, checked in by olhsha@mpi.nl, 10 years ago

ref --> href
+ xml:id for instances
refactoring

File size: 2.5 KB
Line 
1/*
2 * Copyright (C) 2013 DASISH
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17 */
18package eu.dasish.annotation.backend.dao;
19
20import eu.dasish.annotation.backend.NotInDataBaseException;
21import eu.dasish.annotation.backend.PrincipalCannotBeDeleted;
22import eu.dasish.annotation.schema.Access;
23import eu.dasish.annotation.schema.Principal;
24import java.util.List;
25import java.util.UUID;
26
27
28/**
29 *
30 * @author olhsha
31 */
32public interface PrincipalDao extends ResourceDao{
33   
34     public Principal getPrincipal(Number internalID);
35     
36     public Principal getPrincipalByInfo(String  eMail) throws NotInDataBaseException;
37     
38     public Number getDBAdminID();
39     
40     // where is it used?
41     public boolean principalIsInUse(Number principalID);
42     
43     // where is it used??
44     public boolean principalExists(String remoteID);
45     
46     public String getTypeOfPrincipalAccount(Number internalID);
47     
48     public String getRemoteID(Number internalID);
49     
50     
51     public Number getPrincipalInternalIDFromRemoteID(String remoteID) throws NotInDataBaseException;
52     
53     public UUID getPrincipalExternalIDFromRemoteID(String remoteID) throws NotInDataBaseException;
54     
55     
56     public List<Number> getPrincipalIDsWithAccessForNotebook(Number notebookID, Access access);
57     
58     public boolean updateAccount(UUID externalID, String account) throws NotInDataBaseException;
59     
60     public Number updatePrincipal(Principal principal) throws NotInDataBaseException;
61   
62     public Number addPrincipal(Principal principal, String remoteID) throws NotInDataBaseException;
63     
64     public int addSpringUser(String username, String password, int strength, String salt);
65     
66     public int addSpringAuthorities(String username);
67     
68     public int deletePrincipal(Number intenralID) throws PrincipalCannotBeDeleted;
69     
70     
71}
Note: See TracBrowser for help on using the repository browser.