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.icon.server;
018
019import com.echothree.control.user.icon.common.IconRemote;
020import com.echothree.control.user.icon.common.form.*;
021import com.echothree.control.user.icon.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 IconBean
028        extends IconFormsImpl
029        implements IconRemote, IconLocal {
030    
031    // -------------------------------------------------------------------------
032    //   Testing
033    // -------------------------------------------------------------------------
034    
035    @Override
036    public String ping() {
037        return "IconBean is alive!";
038    }
039    
040    // --------------------------------------------------------------------------------
041    //   Icon Usage Types
042    // --------------------------------------------------------------------------------
043    
044    @Override
045    public CommandResult createIconUsageType(UserVisitPK userVisitPK, CreateIconUsageTypeForm form) {
046        return new CreateIconUsageTypeCommand(userVisitPK, form).run();
047    }
048    
049    // --------------------------------------------------------------------------------
050    //   Icon Usage Type Descriptions
051    // --------------------------------------------------------------------------------
052    
053    @Override
054    public CommandResult createIconUsageTypeDescription(UserVisitPK userVisitPK, CreateIconUsageTypeDescriptionForm form) {
055        return new CreateIconUsageTypeDescriptionCommand(userVisitPK, form).run();
056    }
057    
058    // --------------------------------------------------------------------------------
059    //   Icons
060    // --------------------------------------------------------------------------------
061    
062    @Override
063    public CommandResult getIconChoices(UserVisitPK userVisitPK, GetIconChoicesForm form) {
064        return new GetIconChoicesCommand(userVisitPK, form).run();
065    }
066    
067}