1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.settings4j.connector;
18
19 import java.util.ArrayList;
20 import java.util.Collections;
21 import java.util.List;
22
23 import org.settings4j.Connector;
24 import org.settings4j.ContentResolver;
25 import org.settings4j.ObjectResolver;
26
27
28
29
30
31
32
33 public abstract class AbstractConnector implements Connector {
34
35 private String name;
36 private ContentResolver contentResolver;
37 private ObjectResolver objectResolver;
38 private final List<Connector> connectors = Collections.synchronizedList(new ArrayList<Connector>());
39
40 public List<Connector> getConnectors() {
41 return Collections.unmodifiableList(this.connectors);
42 }
43
44
45 public void addConnector(final Connector connector) {
46 this.connectors.add(connector);
47 }
48
49 protected ContentResolver getContentResolver() {
50 return this.contentResolver;
51 }
52
53 public void setContentResolver(final ContentResolver contentResolver) {
54 this.contentResolver = contentResolver;
55 }
56
57 protected ObjectResolver getObjectResolver() {
58 return this.objectResolver;
59 }
60
61 public void setObjectResolver(final ObjectResolver objectResolver) {
62 this.objectResolver = objectResolver;
63 }
64
65 public String getName() {
66 return this.name;
67 }
68
69 public void setName(final String name) {
70 this.name = name;
71 }
72
73
74 public void init() {
75
76
77 }
78
79 }