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.queue.server; 018 019import com.echothree.control.user.queue.common.QueueRemote; 020import com.echothree.control.user.queue.common.form.*; 021import com.echothree.control.user.queue.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 QueueBean 028 extends QueueFormsImpl 029 implements QueueRemote, QueueLocal { 030 031 // ------------------------------------------------------------------------- 032 // Testing 033 // ------------------------------------------------------------------------- 034 035 @Override 036 public String ping() { 037 return "QueueBean is alive!"; 038 } 039 040 // -------------------------------------------------------------------------------- 041 // Queue Types 042 // -------------------------------------------------------------------------------- 043 044 @Override 045 public CommandResult createQueueType(UserVisitPK userVisitPK, CreateQueueTypeForm form) { 046 return new CreateQueueTypeCommand(userVisitPK, form).run(); 047 } 048 049 @Override 050 public CommandResult getQueueTypeChoices(UserVisitPK userVisitPK, GetQueueTypeChoicesForm form) { 051 return new GetQueueTypeChoicesCommand(userVisitPK, form).run(); 052 } 053 054 @Override 055 public CommandResult getQueueType(UserVisitPK userVisitPK, GetQueueTypeForm form) { 056 return new GetQueueTypeCommand(userVisitPK, form).run(); 057 } 058 059 @Override 060 public CommandResult getQueueTypes(UserVisitPK userVisitPK, GetQueueTypesForm form) { 061 return new GetQueueTypesCommand(userVisitPK, form).run(); 062 } 063 064 @Override 065 public CommandResult setDefaultQueueType(UserVisitPK userVisitPK, SetDefaultQueueTypeForm form) { 066 return new SetDefaultQueueTypeCommand(userVisitPK, form).run(); 067 } 068 069 @Override 070 public CommandResult editQueueType(UserVisitPK userVisitPK, EditQueueTypeForm form) { 071 return new EditQueueTypeCommand(userVisitPK, form).run(); 072 } 073 074 @Override 075 public CommandResult deleteQueueType(UserVisitPK userVisitPK, DeleteQueueTypeForm form) { 076 return new DeleteQueueTypeCommand(userVisitPK, form).run(); 077 } 078 079 // -------------------------------------------------------------------------------- 080 // Queue Type Descriptions 081 // -------------------------------------------------------------------------------- 082 083 @Override 084 public CommandResult createQueueTypeDescription(UserVisitPK userVisitPK, CreateQueueTypeDescriptionForm form) { 085 return new CreateQueueTypeDescriptionCommand(userVisitPK, form).run(); 086 } 087 088 @Override 089 public CommandResult getQueueTypeDescription(UserVisitPK userVisitPK, GetQueueTypeDescriptionForm form) { 090 return new GetQueueTypeDescriptionCommand(userVisitPK, form).run(); 091 } 092 093 @Override 094 public CommandResult getQueueTypeDescriptions(UserVisitPK userVisitPK, GetQueueTypeDescriptionsForm form) { 095 return new GetQueueTypeDescriptionsCommand(userVisitPK, form).run(); 096 } 097 098 @Override 099 public CommandResult editQueueTypeDescription(UserVisitPK userVisitPK, EditQueueTypeDescriptionForm form) { 100 return new EditQueueTypeDescriptionCommand(userVisitPK, form).run(); 101 } 102 103 @Override 104 public CommandResult deleteQueueTypeDescription(UserVisitPK userVisitPK, DeleteQueueTypeDescriptionForm form) { 105 return new DeleteQueueTypeDescriptionCommand(userVisitPK, form).run(); 106 } 107 108}