001// --------------------------------------------------------------------------------
002// Copyright 2002-2024 Echo Three, LLC
003//
004// Licensed under the Apache License, Version 2.0 (the "License");
005// you may not use this file except in compliance with the License.
006// You may obtain a copy of the License at
007//
008//     http://www.apache.org/licenses/LICENSE-2.0
009//
010// Unless required by applicable law or agreed to in writing, software
011// distributed under the License is distributed on an "AS IS" BASIS,
012// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013// See the License for the specific language governing permissions and
014// limitations under the License.
015// --------------------------------------------------------------------------------
016
017package com.echothree.control.user.contact.server;
018
019import com.echothree.control.user.contact.common.ContactRemote;
020import com.echothree.control.user.contact.common.form.*;
021import com.echothree.control.user.contact.server.command.*;
022import com.echothree.model.data.user.common.pk.UserVisitPK;
023import com.echothree.util.common.command.CommandResult;
024import javax.ejb.Stateless;
025
026@Stateless
027public class ContactBean
028        extends ContactFormsImpl
029        implements ContactRemote, ContactLocal {
030    
031    // -------------------------------------------------------------------------
032    //   Testing
033    // -------------------------------------------------------------------------
034    
035    @Override
036    public String ping() {
037        return "ContactBean is alive!";
038    }
039    
040    // --------------------------------------------------------------------------------
041    //   Contact Mechanism Types
042    // --------------------------------------------------------------------------------
043    
044    @Override
045    public CommandResult createContactMechanismType(UserVisitPK userVisitPK, CreateContactMechanismTypeForm form) {
046        return new CreateContactMechanismTypeCommand(userVisitPK, form).run();
047    }
048    
049    @Override
050    public CommandResult getContactMechanismTypes(UserVisitPK userVisitPK, GetContactMechanismTypesForm form) {
051        return new GetContactMechanismTypesCommand(userVisitPK, form).run();
052    }
053    
054    @Override
055    public CommandResult getContactMechanismTypeChoices(UserVisitPK userVisitPK, GetContactMechanismTypeChoicesForm form) {
056        return new GetContactMechanismTypeChoicesCommand(userVisitPK, form).run();
057    }
058    
059    // --------------------------------------------------------------------------------
060    //   Contact Mechanism Type Descriptions
061    // --------------------------------------------------------------------------------
062    
063    @Override
064    public CommandResult createContactMechanismTypeDescription(UserVisitPK userVisitPK, CreateContactMechanismTypeDescriptionForm form) {
065        return new CreateContactMechanismTypeDescriptionCommand(userVisitPK, form).run();
066    }
067    
068    // --------------------------------------------------------------------------------
069    //   Contact Mechanism Alias Types
070    // --------------------------------------------------------------------------------
071    
072    @Override
073    public CommandResult createContactMechanismAliasType(UserVisitPK userVisitPK, CreateContactMechanismAliasTypeForm form) {
074        return new CreateContactMechanismAliasTypeCommand(userVisitPK, form).run();
075    }
076    
077    @Override
078    public CommandResult getContactMechanismAliasTypes(UserVisitPK userVisitPK, GetContactMechanismAliasTypesForm form) {
079        return new GetContactMechanismAliasTypesCommand(userVisitPK, form).run();
080    }
081    
082    @Override
083    public CommandResult getContactMechanismAliasTypeChoices(UserVisitPK userVisitPK, GetContactMechanismAliasTypeChoicesForm form) {
084        return new GetContactMechanismAliasTypeChoicesCommand(userVisitPK, form).run();
085    }
086    
087    // --------------------------------------------------------------------------------
088    //   Contact Mechanism Alias Type Descriptions
089    // --------------------------------------------------------------------------------
090    
091    @Override
092    public CommandResult createContactMechanismAliasTypeDescription(UserVisitPK userVisitPK, CreateContactMechanismAliasTypeDescriptionForm form) {
093        return new CreateContactMechanismAliasTypeDescriptionCommand(userVisitPK, form).run();
094    }
095    
096    // --------------------------------------------------------------------------------
097    //   Contact Mechanism Purposes
098    // --------------------------------------------------------------------------------
099    
100    @Override
101    public CommandResult createContactMechanismPurpose(UserVisitPK userVisitPK, CreateContactMechanismPurposeForm form) {
102        return new CreateContactMechanismPurposeCommand(userVisitPK, form).run();
103    }
104    
105    @Override
106    public CommandResult getContactMechanismPurposes(UserVisitPK userVisitPK, GetContactMechanismPurposesForm form) {
107        return new GetContactMechanismPurposesCommand(userVisitPK, form).run();
108    }
109    
110    @Override
111    public CommandResult getContactMechanismPurposeChoices(UserVisitPK userVisitPK, GetContactMechanismPurposeChoicesForm form) {
112        return new GetContactMechanismPurposeChoicesCommand(userVisitPK, form).run();
113    }
114    
115    // --------------------------------------------------------------------------------
116    //   Contact Mechanism Purpose Descriptions
117    // --------------------------------------------------------------------------------
118    
119    @Override
120    public CommandResult createContactMechanismPurposeDescription(UserVisitPK userVisitPK, CreateContactMechanismPurposeDescriptionForm form) {
121        return new CreateContactMechanismPurposeDescriptionCommand(userVisitPK, form).run();
122    }
123    
124    // --------------------------------------------------------------------------------
125    //   Contact Mechanisms
126    // --------------------------------------------------------------------------------
127    
128    @Override
129    public CommandResult getContactMechanismChoices(UserVisitPK userVisitPK, GetContactMechanismChoicesForm form) {
130        return new GetContactMechanismChoicesCommand(userVisitPK, form).run();
131    }
132    
133    @Override
134    public CommandResult getEmailAddressStatusChoices(UserVisitPK userVisitPK, GetEmailAddressStatusChoicesForm form) {
135        return new GetEmailAddressStatusChoicesCommand(userVisitPK, form).run();
136    }
137    
138    @Override
139    public CommandResult setEmailAddressStatus(UserVisitPK userVisitPK, SetEmailAddressStatusForm form) {
140        return new SetEmailAddressStatusCommand(userVisitPK, form).run();
141    }
142    
143    @Override
144    public CommandResult getEmailAddressVerificationChoices(UserVisitPK userVisitPK, GetEmailAddressVerificationChoicesForm form) {
145        return new GetEmailAddressVerificationChoicesCommand(userVisitPK, form).run();
146    }
147    
148    @Override
149    public CommandResult setEmailAddressVerification(UserVisitPK userVisitPK, SetEmailAddressVerificationForm form) {
150        return new SetEmailAddressVerificationCommand(userVisitPK, form).run();
151    }
152    
153    @Override
154    public CommandResult getPostalAddressStatusChoices(UserVisitPK userVisitPK, GetPostalAddressStatusChoicesForm form) {
155        return new GetPostalAddressStatusChoicesCommand(userVisitPK, form).run();
156    }
157    
158    @Override
159    public CommandResult setPostalAddressStatus(UserVisitPK userVisitPK, SetPostalAddressStatusForm form) {
160        return new SetPostalAddressStatusCommand(userVisitPK, form).run();
161    }
162    
163    @Override
164    public CommandResult getTelephoneStatusChoices(UserVisitPK userVisitPK, GetTelephoneStatusChoicesForm form) {
165        return new GetTelephoneStatusChoicesCommand(userVisitPK, form).run();
166    }
167    
168    @Override
169    public CommandResult setTelephoneStatus(UserVisitPK userVisitPK, SetTelephoneStatusForm form) {
170        return new SetTelephoneStatusCommand(userVisitPK, form).run();
171    }
172    
173
174    @Override
175    public CommandResult getWebAddressStatusChoices(UserVisitPK userVisitPK, GetWebAddressStatusChoicesForm form) {
176        return new GetWebAddressStatusChoicesCommand(userVisitPK, form).run();
177    }
178    
179    @Override
180    public CommandResult setWebAddressStatus(UserVisitPK userVisitPK, SetWebAddressStatusForm form) {
181        return new SetWebAddressStatusCommand(userVisitPK, form).run();
182    }
183    
184    @Override
185    public CommandResult getContactMechanism(UserVisitPK userVisitPK, GetContactMechanismForm form) {
186        return new GetContactMechanismCommand(userVisitPK, form).run();
187    }
188
189    @Override
190    public CommandResult deleteContactMechanism(UserVisitPK userVisitPK, DeleteContactMechanismForm form) {
191        return new DeleteContactMechanismCommand(userVisitPK, form).run();
192    }
193    
194    // --------------------------------------------------------------------------------
195    //   Contact Mechanism Aliases
196    // --------------------------------------------------------------------------------
197    
198    @Override
199    public CommandResult createContactMechanismAlias(UserVisitPK userVisitPK, CreateContactMechanismAliasForm form) {
200        return new CreateContactMechanismAliasCommand(userVisitPK, form).run();
201    }
202    
203    @Override
204    public CommandResult deleteContactMechanismAlias(UserVisitPK userVisitPK, DeleteContactMechanismAliasForm form) {
205        return new DeleteContactMechanismAliasCommand(userVisitPK, form).run();
206    }
207    
208    // --------------------------------------------------------------------------------
209    //   Party Contact Mechanism Aliases
210    // --------------------------------------------------------------------------------
211    
212    @Override
213    public CommandResult createPartyContactMechanismAlias(UserVisitPK userVisitPK, CreatePartyContactMechanismAliasForm form) {
214        return new CreatePartyContactMechanismAliasCommand(userVisitPK, form).run();
215    }
216    
217    @Override
218    public CommandResult deletePartyContactMechanismAlias(UserVisitPK userVisitPK, DeletePartyContactMechanismAliasForm form) {
219        return new DeletePartyContactMechanismAliasCommand(userVisitPK, form).run();
220    }
221    
222    // --------------------------------------------------------------------------------
223    //   Contact Email Addresses
224    // --------------------------------------------------------------------------------
225    
226    @Override
227    public CommandResult createContactEmailAddress(UserVisitPK userVisitPK, CreateContactEmailAddressForm form) {
228        return new CreateContactEmailAddressCommand(userVisitPK, form).run();
229    }
230    
231    @Override
232    public CommandResult editContactEmailAddress(UserVisitPK userVisitPK, EditContactEmailAddressForm form) {
233        return new EditContactEmailAddressCommand(userVisitPK, form).run();
234    }
235    
236    // --------------------------------------------------------------------------------
237    //   Contact Postal Addresses
238    // --------------------------------------------------------------------------------
239    
240    @Override
241    public CommandResult createContactPostalAddress(UserVisitPK userVisitPK, CreateContactPostalAddressForm form) {
242        return new CreateContactPostalAddressCommand(userVisitPK, form).run();
243    }
244    
245    @Override
246    public CommandResult editContactPostalAddress(UserVisitPK userVisitPK, EditContactPostalAddressForm form) {
247        return new EditContactPostalAddressCommand(userVisitPK, form).run();
248    }
249    
250    // --------------------------------------------------------------------------------
251    //   Contact Telephones
252    // --------------------------------------------------------------------------------
253    
254    @Override
255    public CommandResult createContactTelephone(UserVisitPK userVisitPK, CreateContactTelephoneForm form) {
256        return new CreateContactTelephoneCommand(userVisitPK, form).run();
257    }
258    
259    @Override
260    public CommandResult editContactTelephone(UserVisitPK userVisitPK, EditContactTelephoneForm form) {
261        return new EditContactTelephoneCommand(userVisitPK, form).run();
262    }
263    
264    // --------------------------------------------------------------------------------
265    //   Contact Web Addresses
266    // --------------------------------------------------------------------------------
267    
268    @Override
269    public CommandResult createContactWebAddress(UserVisitPK userVisitPK, CreateContactWebAddressForm form) {
270        return new CreateContactWebAddressCommand(userVisitPK, form).run();
271    }
272    
273    @Override
274    public CommandResult editContactWebAddress(UserVisitPK userVisitPK, EditContactWebAddressForm form) {
275        return new EditContactWebAddressCommand(userVisitPK, form).run();
276    }
277    
278    // --------------------------------------------------------------------------------
279    //   Party Contact Mechanism Purposes
280    // --------------------------------------------------------------------------------
281    
282    @Override
283    public CommandResult createPartyContactMechanismPurpose(UserVisitPK userVisitPK, CreatePartyContactMechanismPurposeForm form) {
284        return new CreatePartyContactMechanismPurposeCommand(userVisitPK, form).run();
285    }
286    
287    @Override
288    public CommandResult setDefaultPartyContactMechanismPurpose(UserVisitPK userVisitPK, SetDefaultPartyContactMechanismPurposeForm form) {
289        return new SetDefaultPartyContactMechanismPurposeCommand(userVisitPK, form).run();
290    }
291    
292    @Override
293    public CommandResult deletePartyContactMechanismPurpose(UserVisitPK userVisitPK, DeletePartyContactMechanismPurposeForm form) {
294        return new DeletePartyContactMechanismPurposeCommand(userVisitPK, form).run();
295    }
296    
297    // --------------------------------------------------------------------------------
298    //   Party Contact Mechanism Relationships
299    // --------------------------------------------------------------------------------
300    
301    @Override
302    public CommandResult createPartyContactMechanismRelationship(UserVisitPK userVisitPK, CreatePartyContactMechanismRelationshipForm form) {
303        return new CreatePartyContactMechanismRelationshipCommand(userVisitPK, form).run();
304    }
305    
306    @Override
307    public CommandResult deletePartyContactMechanismRelationship(UserVisitPK userVisitPK, DeletePartyContactMechanismRelationshipForm form) {
308        return new DeletePartyContactMechanismRelationshipCommand(userVisitPK, form).run();
309    }
310    
311    // --------------------------------------------------------------------------------
312    //   Postal Address Element Types
313    // --------------------------------------------------------------------------------
314    
315    @Override
316    public CommandResult createPostalAddressElementType(UserVisitPK userVisitPK, CreatePostalAddressElementTypeForm form) {
317        return new CreatePostalAddressElementTypeCommand(userVisitPK, form).run();
318    }
319    
320    @Override
321    public CommandResult getPostalAddressElementTypeChoices(UserVisitPK userVisitPK, GetPostalAddressElementTypeChoicesForm form) {
322        return new GetPostalAddressElementTypeChoicesCommand(userVisitPK, form).run();
323    }
324    
325    // --------------------------------------------------------------------------------
326    //   Postal Address Element Type Descriptions
327    // --------------------------------------------------------------------------------
328    
329    @Override
330    public CommandResult createPostalAddressElementTypeDescription(UserVisitPK userVisitPK, CreatePostalAddressElementTypeDescriptionForm form) {
331        return new CreatePostalAddressElementTypeDescriptionCommand(userVisitPK, form).run();
332    }
333    
334    // -------------------------------------------------------------------------
335    //   Postal Address Formats
336    // -------------------------------------------------------------------------
337    
338    @Override
339    public CommandResult createPostalAddressFormat(UserVisitPK userVisitPK, CreatePostalAddressFormatForm form) {
340        return new CreatePostalAddressFormatCommand(userVisitPK, form).run();
341    }
342    
343    @Override
344    public CommandResult getPostalAddressFormat(UserVisitPK userVisitPK, GetPostalAddressFormatForm form) {
345        return new GetPostalAddressFormatCommand(userVisitPK, form).run();
346    }
347    
348    @Override
349    public CommandResult getPostalAddressFormats(UserVisitPK userVisitPK, GetPostalAddressFormatsForm form) {
350        return new GetPostalAddressFormatsCommand(userVisitPK, form).run();
351    }
352    
353    @Override
354    public CommandResult getPostalAddressFormatChoices(UserVisitPK userVisitPK, GetPostalAddressFormatChoicesForm form) {
355        return new GetPostalAddressFormatChoicesCommand(userVisitPK, form).run();
356    }
357    
358    @Override
359    public CommandResult setDefaultPostalAddressFormat(UserVisitPK userVisitPK, SetDefaultPostalAddressFormatForm form) {
360        return new SetDefaultPostalAddressFormatCommand(userVisitPK, form).run();
361    }
362    
363    @Override
364    public CommandResult editPostalAddressFormat(UserVisitPK userVisitPK, EditPostalAddressFormatForm form) {
365        return new EditPostalAddressFormatCommand(userVisitPK, form).run();
366    }
367    
368    @Override
369    public CommandResult deletePostalAddressFormat(UserVisitPK userVisitPK, DeletePostalAddressFormatForm form) {
370        return new DeletePostalAddressFormatCommand(userVisitPK, form).run();
371    }
372    
373    // -------------------------------------------------------------------------
374    //   Postal Address Format Descriptions
375    // -------------------------------------------------------------------------
376    
377    @Override
378    public CommandResult createPostalAddressFormatDescription(UserVisitPK userVisitPK, CreatePostalAddressFormatDescriptionForm form) {
379        return new CreatePostalAddressFormatDescriptionCommand(userVisitPK, form).run();
380    }
381    
382    @Override
383    public CommandResult getPostalAddressFormatDescriptions(UserVisitPK userVisitPK, GetPostalAddressFormatDescriptionsForm form) {
384        return new GetPostalAddressFormatDescriptionsCommand(userVisitPK, form).run();
385    }
386    
387    @Override
388    public CommandResult editPostalAddressFormatDescription(UserVisitPK userVisitPK, EditPostalAddressFormatDescriptionForm form) {
389        return new EditPostalAddressFormatDescriptionCommand(userVisitPK, form).run();
390    }
391    
392    @Override
393    public CommandResult deletePostalAddressFormatDescription(UserVisitPK userVisitPK, DeletePostalAddressFormatDescriptionForm form) {
394        return new DeletePostalAddressFormatDescriptionCommand(userVisitPK, form).run();
395    }
396    
397    // --------------------------------------------------------------------------------
398    //   Postal Address Lines
399    // --------------------------------------------------------------------------------
400    
401    @Override
402    public CommandResult createPostalAddressLine(UserVisitPK userVisitPK, CreatePostalAddressLineForm form) {
403        return new CreatePostalAddressLineCommand(userVisitPK, form).run();
404    }
405    
406    @Override
407    public CommandResult getPostalAddressLines(UserVisitPK userVisitPK, GetPostalAddressLinesForm form) {
408        return new GetPostalAddressLinesCommand(userVisitPK, form).run();
409    }
410    
411    @Override
412    public CommandResult editPostalAddressLine(UserVisitPK userVisitPK, EditPostalAddressLineForm form) {
413        return new EditPostalAddressLineCommand(userVisitPK, form).run();
414    }
415    
416    @Override
417    public CommandResult deletePostalAddressLine(UserVisitPK userVisitPK, DeletePostalAddressLineForm form) {
418        return new DeletePostalAddressLineCommand(userVisitPK, form).run();
419    }
420    
421    // --------------------------------------------------------------------------------
422    //   Postal Address Line Elements
423    // --------------------------------------------------------------------------------
424    
425    @Override
426    public CommandResult createPostalAddressLineElement(UserVisitPK userVisitPK, CreatePostalAddressLineElementForm form) {
427        return new CreatePostalAddressLineElementCommand(userVisitPK, form).run();
428    }
429    
430    @Override
431    public CommandResult getPostalAddressLineElements(UserVisitPK userVisitPK, GetPostalAddressLineElementsForm form) {
432        return new GetPostalAddressLineElementsCommand(userVisitPK, form).run();
433    }
434    
435    @Override
436    public CommandResult editPostalAddressLineElement(UserVisitPK userVisitPK, EditPostalAddressLineElementForm form) {
437        return new EditPostalAddressLineElementCommand(userVisitPK, form).run();
438    }
439    
440    @Override
441    public CommandResult deletePostalAddressLineElement(UserVisitPK userVisitPK, DeletePostalAddressLineElementForm form) {
442        return new DeletePostalAddressLineElementCommand(userVisitPK, form).run();
443    }
444    
445}