001// --------------------------------------------------------------------------------
002// Copyright 2002-2026 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.model.control.geo.server.graphql;
018
019import com.echothree.control.user.geo.server.command.GetGeoCodeAliasCommand;
020import com.echothree.control.user.geo.server.command.GetGeoCodeAliasTypeCommand;
021import com.echothree.control.user.geo.server.command.GetGeoCodeAliasTypesCommand;
022import com.echothree.control.user.geo.server.command.GetGeoCodeAliasesCommand;
023import com.echothree.control.user.geo.server.command.GetGeoCodeCommand;
024import com.echothree.control.user.geo.server.command.GetGeoCodeCurrenciesCommand;
025import com.echothree.control.user.geo.server.command.GetGeoCodeCurrencyCommand;
026import com.echothree.control.user.geo.server.command.GetGeoCodeDateTimeFormatCommand;
027import com.echothree.control.user.geo.server.command.GetGeoCodeDateTimeFormatsCommand;
028import com.echothree.control.user.geo.server.command.GetGeoCodeLanguageCommand;
029import com.echothree.control.user.geo.server.command.GetGeoCodeLanguagesCommand;
030import com.echothree.control.user.geo.server.command.GetGeoCodeScopeCommand;
031import com.echothree.control.user.geo.server.command.GetGeoCodeScopesCommand;
032import com.echothree.control.user.geo.server.command.GetGeoCodeTimeZoneCommand;
033import com.echothree.control.user.geo.server.command.GetGeoCodeTimeZonesCommand;
034import com.echothree.control.user.geo.server.command.GetGeoCodeTypeCommand;
035import com.echothree.control.user.geo.server.command.GetGeoCodeTypesCommand;
036import com.echothree.model.control.graphql.server.util.BaseGraphQl;
037import graphql.schema.DataFetchingEnvironment;
038
039public interface GeoSecurityUtils {
040
041    static boolean getHasGeoCodeTypeAccess(final DataFetchingEnvironment env) {
042        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeTypeCommand.class);
043    }
044
045    static boolean getHasGeoCodeTypesAccess(final DataFetchingEnvironment env) {
046        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeTypesCommand.class);
047    }
048
049    static boolean getHasGeoCodeAliasTypeAccess(final DataFetchingEnvironment env) {
050        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeAliasTypeCommand.class);
051    }
052
053    static boolean getHasGeoCodeAliasTypesAccess(final DataFetchingEnvironment env) {
054        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeAliasTypesCommand.class);
055    }
056
057    static boolean getHasGeoCodeAliasAccess(final DataFetchingEnvironment env) {
058        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeAliasCommand.class);
059    }
060
061    static boolean getHasGeoCodeAliasesAccess(final DataFetchingEnvironment env) {
062        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeAliasesCommand.class);
063    }
064
065    static boolean getHasGeoCodeScopeAccess(final DataFetchingEnvironment env) {
066        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeScopeCommand.class);
067    }
068
069    static boolean getHasGeoCodeScopesAccess(final DataFetchingEnvironment env) {
070        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeScopesCommand.class);
071    }
072
073    static boolean getHasGeoCodeAccess(final DataFetchingEnvironment env) {
074        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeCommand.class);
075    }
076
077    static boolean getHasGeoCodeLanguageAccess(final DataFetchingEnvironment env) {
078        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeLanguageCommand.class);
079    }
080
081    static boolean getHasGeoCodeLanguagesAccess(final DataFetchingEnvironment env) {
082        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeLanguagesCommand.class);
083    }
084
085    static boolean getHasGeoCodeCurrencyAccess(final DataFetchingEnvironment env) {
086        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeCurrencyCommand.class);
087    }
088
089    static boolean getHasGeoCodeCurrenciesAccess(final DataFetchingEnvironment env) {
090        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeCurrenciesCommand.class);
091    }
092
093    static boolean getHasGeoCodeTimeZoneAccess(final DataFetchingEnvironment env) {
094        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeTimeZoneCommand.class);
095    }
096
097    static boolean getHasGeoCodeTimeZonesAccess(final DataFetchingEnvironment env) {
098        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeTimeZonesCommand.class);
099    }
100
101    static boolean getHasGeoCodeDateTimeFormatAccess(final DataFetchingEnvironment env) {
102        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeDateTimeFormatCommand.class);
103    }
104
105    static boolean getHasGeoCodeDateTimeFormatsAccess(final DataFetchingEnvironment env) {
106        return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetGeoCodeDateTimeFormatsCommand.class);
107    }
108
109}