Project

General

Profile

Download (1.14 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2014 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.persistence.hibernate.permission.voter;
10

    
11
import eu.etaxonomy.cdm.model.common.CdmBase;
12
import eu.etaxonomy.cdm.model.reference.Reference;
13

    
14
/**
15
 * @author a.kohlbecker
16
 * @date Feb 24, 2014
17
 *
18
 */
19
public class ReferenceVoter extends CdmPermissionVoter {
20

    
21
    /* (non-Javadoc)
22
     * @see eu.etaxonomy.cdm.persistence.hibernate.permission.voter.CdmPermissionVoter#getResponsibilityClass()
23
     */
24
    @Override
25
    public Class<? extends CdmBase> getResponsibilityClass() {
26
        return Reference.class;
27
    }
28

    
29
    /* (non-Javadoc)
30
     * @see eu.etaxonomy.cdm.persistence.hibernate.permission.voter.CdmPermissionVoter#isOrpahn(eu.etaxonomy.cdm.model.common.CdmBase)
31
     */
32
    @Override
33
    public boolean isOrpahn(CdmBase object) {
34
        // References must never be considered orphan. So the must not be deleted without explicit DELETE permission
35
        return false;
36
    }
37

    
38
}
(6-6/12)