1
|
/**
|
2
|
* Copyright (C) 2017 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.vaadin.view.name;
|
10
|
|
11
|
public class TypeDesignationWorkingsetEditorIdSet {
|
12
|
Integer registrationId;
|
13
|
Integer workingsetId;
|
14
|
Integer publicationId;
|
15
|
Integer typifiedNameId;
|
16
|
|
17
|
/**
|
18
|
* @param registrationId
|
19
|
* must be present
|
20
|
* @param workingsetId
|
21
|
* can <code>null</code>. In this case the <code>publicationId</code>
|
22
|
* and and typifiedNameId must be set.
|
23
|
* <code>RegistrationAndWorkingsetId</code> refers to a not yet
|
24
|
* existing working set, which should be created by the code in
|
25
|
* case this makes sense.
|
26
|
* @param publicationId
|
27
|
* Can <code>null</code> if the <code>workingsetId</code> is given.
|
28
|
* @param typifiedNameId
|
29
|
* Can <code>null</code> if the <code>workingsetId</code> is given
|
30
|
*/
|
31
|
protected TypeDesignationWorkingsetEditorIdSet(Integer registrationId, Integer workingsetId, Integer publicationId, Integer typifiedNameId) {
|
32
|
this.registrationId = registrationId;
|
33
|
this.workingsetId = workingsetId;
|
34
|
this.publicationId = publicationId;
|
35
|
this.typifiedNameId = typifiedNameId;
|
36
|
if(workingsetId == null && publicationId == null|| workingsetId == null && typifiedNameId == null){
|
37
|
throw new NullPointerException("When workingsetId is null, publicationId and typifiedNameId must be non null.");
|
38
|
}
|
39
|
}
|
40
|
|
41
|
public TypeDesignationWorkingsetEditorIdSet(Integer registrationId, Integer workingsetId) {
|
42
|
this(registrationId, workingsetId, null, null);
|
43
|
}
|
44
|
|
45
|
public TypeDesignationWorkingsetEditorIdSet(Integer registrationId, Integer publicationId, Integer typifiedNameId) {
|
46
|
this(registrationId, null, publicationId, typifiedNameId);
|
47
|
}
|
48
|
}
|