182 |
ilm |
1 |
/*
|
|
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
|
|
3 |
*
|
|
|
4 |
* Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
|
|
|
5 |
*
|
|
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
|
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
|
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
|
|
9 |
* language governing permissions and limitations under the License.
|
|
|
10 |
*
|
|
|
11 |
* When distributing the software, include this License Header Notice in each file.
|
|
|
12 |
*/
|
|
|
13 |
|
|
|
14 |
package org.openconcerto.task.config;
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
import net.jcip.annotations.Immutable;
|
|
|
18 |
|
|
|
19 |
@Immutable
|
|
|
20 |
public class ComptaOptions {
|
|
|
21 |
|
|
|
22 |
private final Customer customer;
|
|
|
23 |
|
|
|
24 |
public ComptaOptions(final Customer customer) {
|
|
|
25 |
this.customer = customer;
|
|
|
26 |
}
|
|
|
27 |
|
|
|
28 |
public final Customer getCustomer() {
|
|
|
29 |
return this.customer;
|
|
|
30 |
}
|
|
|
31 |
|
|
|
32 |
public final boolean customerUseControle() {
|
|
|
33 |
return customerIsPreventec() || customerIsKD();
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
public final boolean customerIsKD() {
|
|
|
37 |
final boolean kd = getCustomer() == Customer.KD;
|
|
|
38 |
return kd;
|
|
|
39 |
}
|
|
|
40 |
|
|
|
41 |
public final boolean customerIsODT() {
|
|
|
42 |
final boolean kd = getCustomer() == Customer.ODT;
|
|
|
43 |
return kd;
|
|
|
44 |
}
|
|
|
45 |
|
|
|
46 |
public final boolean customerIsTCP() {
|
|
|
47 |
final boolean kd = getCustomer() == Customer.TCP;
|
|
|
48 |
return kd;
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
public final boolean customerIsPreventec() {
|
|
|
52 |
final boolean prev = getCustomer() == Customer.PREVENTEC;
|
|
|
53 |
return prev;
|
|
|
54 |
}
|
|
|
55 |
|
|
|
56 |
public final boolean customerIsProfilbat() {
|
|
|
57 |
return getCustomer() == Customer.PROFILBAT;
|
|
|
58 |
}
|
|
|
59 |
}
|