Statistics
| Branch: | Tag: | Revision:

root / src / gr / ebs / gss / server / ejb / AdminAPI.java @ 769f9814

History | View | Annotate | Download (2.8 kB)

1
/*
2
 * Copyright 2010 Electronic Business Systems Ltd.
3
 *
4
 * This file is part of GSS.
5
 *
6
 * GSS is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * GSS is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with GSS.  If not, see <http://www.gnu.org/licenses/>.
18
 */
19
package gr.ebs.gss.server.ejb;
20

    
21
import gr.ebs.gss.client.exceptions.InsufficientPermissionsException;
22
import gr.ebs.gss.client.exceptions.ObjectNotFoundException;
23
import gr.ebs.gss.server.domain.dto.FileBodyDTO;
24
import gr.ebs.gss.server.domain.dto.FileHeaderDTO;
25
import gr.ebs.gss.server.domain.dto.PermissionDTO;
26
import gr.ebs.gss.server.domain.dto.StatsDTO;
27
import gr.ebs.gss.server.domain.dto.SystemStatsDTO;
28
import gr.ebs.gss.server.domain.dto.UserClassDTO;
29
import gr.ebs.gss.server.domain.dto.UserDTO;
30

    
31
import java.util.Date;
32
import java.util.List;
33
import java.util.Set;
34

    
35
import javax.ejb.Local;
36

    
37

    
38
/**
39
 * @author kman
40
 *
41
 */
42
@Local
43
public interface AdminAPI {
44

    
45
        public List<UserDTO> searchUsers(String query) throws ObjectNotFoundException;
46

    
47
        public StatsDTO getUserStatistics(Long userId) throws ObjectNotFoundException;
48

    
49
        public UserDTO getUser(Long userId) throws ObjectNotFoundException;
50

    
51
        public void toggleActiveUser(Long userId) throws ObjectNotFoundException;
52

    
53
        public FileHeaderDTO getFile(String uri) throws ObjectNotFoundException;
54

    
55
        public void setFilePermissions(String uri, Set<PermissionDTO> permissions) throws ObjectNotFoundException;
56

    
57
        public SystemStatsDTO getSystemStatistics();
58

    
59
        public List<UserDTO> getLastLoggedInUsers(Date lastLoginDate);
60

    
61
        List<FileBodyDTO> getVersions(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
62

    
63
        UserDTO getUser(String username) throws ObjectNotFoundException;
64

    
65
        FileHeaderDTO getFile(Long fileId) throws ObjectNotFoundException;
66

    
67
        List<FileHeaderDTO> getFiles(String uri) throws ObjectNotFoundException, InsufficientPermissionsException;
68

    
69
        List<UserDTO> getUsersWaitingActivation();
70

    
71
        void changeUserClass(Long userId, Long userClassId) throws ObjectNotFoundException;
72

    
73
        List<UserClassDTO> getUserClasses();
74

    
75
        void saveOrUpdateUserClass(UserClassDTO dto) throws ObjectNotFoundException;
76

    
77
        void removeUserClass(UserClassDTO dto) throws ObjectNotFoundException;
78

    
79
        public List<FileHeaderDTO> searchFileByFilename(String fileName);
80

    
81
        public void removeUser(Long userId) throws ObjectNotFoundException, InsufficientPermissionsException;
82

    
83
}