BrightSide Workbench Full Report + Source Code
ContactFieldList.java
Go to the documentation of this file.
1
/*
2
* TurrĂ³ i Cutiller Foundation. License notice.
3
* Copyright (C) 2013 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU Affero General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Affero General Public License for more details.
14
*
15
* You should have received a copy of the GNU Affero General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
package
org.turro.contacts.control;
20
21
import
java.util.ArrayList;
22
import
org.turro.elephant.security.IUser;
23
28
public
class
ContactFieldList
extends
ArrayList<ContactField> {
29
30
public
ContactField
addContactField
(
ContactFieldType
type,
boolean
required) {
31
return
addContactField
(type, required,
null
);
32
}
33
34
public
ContactField
addContactField
(
ContactFieldType
type,
boolean
required, String fieldLabel) {
35
ContactField
cf =
new
ContactField
(type, required, fieldLabel);
36
add(cf);
37
return
cf;
38
}
39
40
public
ContactFieldList
createMinimumContact
() {
41
addContactField
(
ContactFieldType
.
CONTACT_NAME
,
true
);
42
addContactField
(
ContactFieldType
.
CONTACT_GID
,
false
);
43
addContactField
(
ContactFieldType
.
CONTACT_CONNECTOR
,
false
,
IUser
.
CONNECTOR_EMAIL
);
44
addContactField
(
ContactFieldType
.
CONTACT_CONNECTOR
,
false
,
"Cell"
);
45
addContactField
(
ContactFieldType
.
CONTACT_CONNECTOR
,
false
,
"Telephone"
);
46
addContactField
(
ContactFieldType
.
CONTACT_ADDRESS
,
false
,
"Fiscal"
);
47
return
this
;
48
}
49
50
public
ContactFieldList
createMinimumEnterprise
() {
51
addContactField
(
ContactFieldType
.
CONTACT_NAME
,
true
);
52
addContactField
(
ContactFieldType
.
CONTACT_GID
,
true
);
53
addContactField
(
ContactFieldType
.
CONTACT_CONNECTOR
,
false
,
IUser
.
CONNECTOR_EMAIL
);
54
addContactField
(
ContactFieldType
.
CONTACT_CONNECTOR
,
false
,
"Cell"
);
55
addContactField
(
ContactFieldType
.
CONTACT_CONNECTOR
,
false
,
"Telephone"
);
56
addContactField
(
ContactFieldType
.
CONTACT_CONNECTOR
,
false
,
"Fax"
);
57
addContactField
(
ContactFieldType
.
CONTACT_CONNECTOR
,
false
,
"Web"
);
58
addContactField
(
ContactFieldType
.
CONTACT_ADDRESS
,
true
,
"Fiscal"
);
59
return
this
;
60
}
61
62
}
org.turro.contacts.control.ContactFieldList
Definition:
ContactFieldList.java:28
org.turro.contacts.control.ContactFieldList.createMinimumEnterprise
ContactFieldList createMinimumEnterprise()
Definition:
ContactFieldList.java:50
org.turro.contacts.control.ContactFieldList.createMinimumContact
ContactFieldList createMinimumContact()
Definition:
ContactFieldList.java:40
org.turro.contacts.control.ContactFieldList.addContactField
ContactField addContactField(ContactFieldType type, boolean required)
Definition:
ContactFieldList.java:30
org.turro.contacts.control.ContactFieldList.addContactField
ContactField addContactField(ContactFieldType type, boolean required, String fieldLabel)
Definition:
ContactFieldList.java:34
org.turro.contacts.control.ContactField
Definition:
ContactField.java:28
org.turro.contacts.control.ContactFieldType
Definition:
ContactFieldType.java:24
org.turro.contacts.control.ContactFieldType.CONTACT_CONNECTOR
CONTACT_CONNECTOR
Definition:
ContactFieldType.java:28
org.turro.contacts.control.ContactFieldType.CONTACT_NAME
CONTACT_NAME
Definition:
ContactFieldType.java:26
org.turro.contacts.control.ContactFieldType.CONTACT_GID
CONTACT_GID
Definition:
ContactFieldType.java:27
org.turro.contacts.control.ContactFieldType.CONTACT_ADDRESS
CONTACT_ADDRESS
Definition:
ContactFieldType.java:29
org.turro.elephant.security.IUser
Definition:
IUser.java:25
org.turro.elephant.security.IUser.CONNECTOR_EMAIL
static final String CONNECTOR_EMAIL
Definition:
IUser.java:27
TurroProjects
Public
BrightSide
contacts
src
main
java
org
turro
contacts
control
ContactFieldList.java
Generated on Tue Mar 12 2024 07:01:18 for BrightSide by
1.9.1