ref #7099 rename model.rights to model.permission
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / permission / CdmAuthority.java
1 /**
2 * Copyright (C) 2019 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.model.permission;
10
11 import java.util.UUID;
12
13 import javax.persistence.Column;
14 import javax.persistence.Entity;
15 import javax.validation.constraints.NotNull;
16 import javax.xml.bind.annotation.XmlAccessType;
17 import javax.xml.bind.annotation.XmlAccessorType;
18 import javax.xml.bind.annotation.XmlElement;
19 import javax.xml.bind.annotation.XmlRootElement;
20 import javax.xml.bind.annotation.XmlType;
21
22 /**
23 * CDM authority class.<BR>
24 *
25 * @see https://dev.e-taxonomy.eu/redmine/issues/7099
26 *
27 * @author a.mueller
28 * @since 09.08.2019
29 */
30 @XmlAccessorType(XmlAccessType.FIELD)
31 @XmlType(name = "CdmAuthority", propOrder = {
32 "property",
33 "targetUuid"}
34 )
35 @XmlRootElement(name = "CdmAuthority")
36 @Entity
37 public class CdmAuthority extends AuthorityBase {
38
39 private static final long serialVersionUID = 3777547489226033333L;
40
41 @XmlElement(name = "property")
42 @Column(unique = true)
43 @NotNull
44 private String property;
45
46 private UUID targetUuid;
47 }