1 package com.atlassian.core.ofbiz.association;
2
3 import com.opensymphony.user.EntityNotFoundException;
4 import com.opensymphony.user.User;
5 import org.ofbiz.core.entity.GenericEntityException;
6 import org.ofbiz.core.entity.GenericValue;
7
8 import java.util.List;
9
10 public interface AssociationManager
11 {
12 public GenericValue createAssociation(User user, GenericValue sink, String associationType)
13 throws GenericEntityException;
14
15
16
17
18
19
20
21
22
23
24 public GenericValue createAssociation(String userName, Long sinkNodeId, String sinkNodeEntity, String associationType)
25 throws GenericEntityException;
26
27
28
29
30
31
32
33
34 public GenericValue createAssociation(GenericValue source, GenericValue sink, String associationType)
35 throws GenericEntityException;
36
37
38
39
40
41
42
43
44
45
46
47 public GenericValue createAssociation(Long sourceNodeId, String sourceNodeEntity, Long sinkNodeId, String sinkNodeEntity, String associationType)
48 throws GenericEntityException;
49
50 public void removeAssociation(GenericValue source, GenericValue sink, String associationType)
51 throws GenericEntityException;
52
53 public void removeAssociation(User user, GenericValue sink, String associationType) throws GenericEntityException;
54
55
56
57
58
59
60
61
62
63 public void removeAssociation(String username, GenericValue sink, String associationType)
64 throws GenericEntityException;
65
66
67
68
69 public void removeAssociationsFromSource(GenericValue source) throws GenericEntityException;
70
71 public void removeAssociationsFromSink(GenericValue sink) throws GenericEntityException;
72
73
74
75
76 public void removeUserAssociationsFromSink(GenericValue sink) throws GenericEntityException;
77
78
79
80
81
82
83
84
85 public void removeUserAssociationsFromSink(GenericValue sink, String associationType) throws GenericEntityException;
86
87
88
89
90 public void removeUserAssociationsFromUser(User user) throws GenericEntityException;
91
92
93
94
95
96
97
98
99 public void removeUserAssociationsFromUser(User user, String associationType) throws GenericEntityException;
100
101
102
103
104
105
106
107
108
109 public void removeUserAssociationsFromUser(User user, String associationType, String entityName)
110 throws GenericEntityException;
111
112
113
114
115
116
117
118 public void swapAssociation(String sourceEntityType, String associationType, GenericValue fromSink, GenericValue toSink)
119 throws GenericEntityException;
120
121 public void swapAssociation(List entities, String associationType, GenericValue fromSink, GenericValue toSink)
122 throws GenericEntityException;
123
124
125
126
127
128 public List getSinkFromSource(GenericValue source, String sinkName, String associationType, boolean useCache)
129 throws GenericEntityException;
130
131 public List getSinkFromSource(GenericValue source, String sinkName, String associationType, boolean useCache, boolean useSequence)
132 throws GenericEntityException;
133
134
135
136
137 public List getSourceFromSink(GenericValue sink, String sourceName, String associationType, boolean useCache)
138 throws GenericEntityException;
139
140
141
142
143 public List getSourceFromSink(GenericValue sink, String sourceName, String associationType, boolean useCache, boolean useSequence)
144 throws GenericEntityException;
145
146
147
148
149 public List getSinkFromUser(User source, String sinkName, String associationType, boolean useCache)
150 throws GenericEntityException;
151
152
153
154
155
156
157
158
159
160
161 public List
162 throws GenericEntityException;
163
164
165
166
167 public List getSinkFromUser(User source, String sinkName, String associationType, boolean useCache, boolean useSequence)
168 throws GenericEntityException;
169
170
171
172
173 public List getUserFromSink(GenericValue sink, String associationType, boolean useCache)
174 throws GenericEntityException, EntityNotFoundException;
175
176
177
178
179 public List getUserFromSink(GenericValue sink, String associationType, boolean useCache, boolean useSequence)
180 throws GenericEntityException, EntityNotFoundException;
181
182
183
184
185
186
187
188
189
190
191
192 public List
193 throws GenericEntityException;
194
195 public GenericValue getAssociation(GenericValue source, GenericValue sink, String associationType)
196 throws GenericEntityException;
197
198 public GenericValue getAssociation(User user, GenericValue sink, String associationType)
199 throws GenericEntityException;
200
201 public List getSinkIdsFromSource(GenericValue source, String sinkEntity, String associationType)
202 throws GenericEntityException;
203
204 public List getSourceIdsFromSink(GenericValue sink, String sourceEntity, String associationType)
205 throws GenericEntityException;
206
207
208 }