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.inventory.server.graphql; 018 019import com.echothree.control.user.inventory.server.command.GetAllocationPrioritiesCommand; 020import com.echothree.control.user.inventory.server.command.GetAllocationPriorityCommand; 021import com.echothree.control.user.inventory.server.command.GetInventoryAdjustmentTypeCommand; 022import com.echothree.control.user.inventory.server.command.GetInventoryAdjustmentTypesCommand; 023import com.echothree.control.user.inventory.server.command.GetInventoryBucketTypeCommand; 024import com.echothree.control.user.inventory.server.command.GetInventoryBucketTypesCommand; 025import com.echothree.control.user.inventory.server.command.GetInventoryConditionCommand; 026import com.echothree.control.user.inventory.server.command.GetInventoryConditionsCommand; 027import com.echothree.control.user.inventory.server.command.GetInventoryCostingMethodCommand; 028import com.echothree.control.user.inventory.server.command.GetInventoryCostingMethodsCommand; 029import com.echothree.control.user.inventory.server.command.GetInventoryLocationCommand; 030import com.echothree.control.user.inventory.server.command.GetInventoryLocationBucketCommand; 031import com.echothree.control.user.inventory.server.command.GetInventoryLocationBucketsCommand; 032import com.echothree.control.user.inventory.server.command.GetInventoryLocationGroupCommand; 033import com.echothree.control.user.inventory.server.command.GetInventoryLocationGroupsCommand; 034import com.echothree.control.user.inventory.server.command.GetInventoryLocationsCommand; 035import com.echothree.control.user.inventory.server.command.GetInventoryDispositionCommand; 036import com.echothree.control.user.inventory.server.command.GetInventoryDispositionsCommand; 037import com.echothree.control.user.inventory.server.command.GetInventoryTransactionTypeCommand; 038import com.echothree.control.user.inventory.server.command.GetInventoryTransactionTypesCommand; 039import com.echothree.control.user.inventory.server.command.GetInventoryTransactionTimeTypeCommand; 040import com.echothree.control.user.inventory.server.command.GetInventoryTransactionTimeTypesCommand; 041import com.echothree.control.user.inventory.server.command.GetInventoryTransactionRoleTypeCommand; 042import com.echothree.control.user.inventory.server.command.GetInventoryTransactionRoleTypesCommand; 043import com.echothree.control.user.inventory.server.command.GetInventoryTransactionReasonCommand; 044import com.echothree.control.user.inventory.server.command.GetInventoryDispositionAdjustmentCommand; 045import com.echothree.control.user.inventory.server.command.GetInventoryDispositionAdjustmentsCommand; 046import com.echothree.control.user.inventory.server.command.GetInventoryTransactionReasonsCommand; 047import com.echothree.control.user.inventory.server.command.GetPartyInventoryCostingMethodCommand; 048import com.echothree.control.user.inventory.server.command.GetPartyInventoryCostingMethodsCommand; 049import com.echothree.control.user.inventory.server.command.GetPartyBucketCommand; 050import com.echothree.control.user.inventory.server.command.GetPartyBucketsCommand; 051import com.echothree.model.control.graphql.server.util.BaseGraphQl; 052import graphql.schema.DataFetchingEnvironment; 053 054public interface InventorySecurityUtils { 055 056 static boolean getHasInventoryConditionAccess(final DataFetchingEnvironment env) { 057 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryConditionCommand.class); 058 } 059 060 static boolean getHasInventoryConditionsAccess(final DataFetchingEnvironment env) { 061 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryConditionsCommand.class); 062 } 063 064 static boolean getHasAllocationPriorityAccess(final DataFetchingEnvironment env) { 065 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetAllocationPriorityCommand.class); 066 } 067 068 static boolean getHasAllocationPrioritiesAccess(final DataFetchingEnvironment env) { 069 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetAllocationPrioritiesCommand.class); 070 } 071 072 static boolean getHasInventoryTransactionTypeAccess(final DataFetchingEnvironment env) { 073 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryTransactionTypeCommand.class); 074 } 075 076 static boolean getHasInventoryTransactionTypesAccess(final DataFetchingEnvironment env) { 077 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryTransactionTypesCommand.class); 078 } 079 080 static boolean getHasInventoryTransactionTimeTypeAccess(final DataFetchingEnvironment env) { 081 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryTransactionTimeTypeCommand.class); 082 } 083 084 static boolean getHasInventoryTransactionTimeTypesAccess(final DataFetchingEnvironment env) { 085 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryTransactionTimeTypesCommand.class); 086 } 087 088 static boolean getHasInventoryTransactionRoleTypeAccess(final DataFetchingEnvironment env) { 089 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryTransactionRoleTypeCommand.class); 090 } 091 092 static boolean getHasInventoryTransactionRoleTypesAccess(final DataFetchingEnvironment env) { 093 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryTransactionRoleTypesCommand.class); 094 } 095 096 static boolean getHasInventoryTransactionReasonAccess(final DataFetchingEnvironment env) { 097 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryTransactionReasonCommand.class); 098 } 099 100 static boolean getHasInventoryDispositionAdjustmentAccess(final DataFetchingEnvironment env) { 101 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryDispositionAdjustmentCommand.class); 102 } 103 104 static boolean getHasInventoryDispositionAdjustmentsAccess(final DataFetchingEnvironment env) { 105 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryDispositionAdjustmentsCommand.class); 106 } 107 108 static boolean getHasInventoryTransactionReasonsAccess(final DataFetchingEnvironment env) { 109 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryTransactionReasonsCommand.class); 110 } 111 112 static boolean getHasInventoryDispositionAccess(final DataFetchingEnvironment env) { 113 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryDispositionCommand.class); 114 } 115 116 static boolean getHasInventoryDispositionsAccess(final DataFetchingEnvironment env) { 117 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryDispositionsCommand.class); 118 } 119 120 static boolean getHasInventoryLocationGroupAccess(final DataFetchingEnvironment env) { 121 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryLocationGroupCommand.class); 122 } 123 124 static boolean getHasInventoryLocationGroupsAccess(final DataFetchingEnvironment env) { 125 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryLocationGroupsCommand.class); 126 } 127 128 static boolean getHasInventoryLocationAccess(final DataFetchingEnvironment env) { 129 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryLocationCommand.class); 130 } 131 132 static boolean getHasInventoryLocationsAccess(final DataFetchingEnvironment env) { 133 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryLocationsCommand.class); 134 } 135 136 static boolean getHasInventoryLocationBucketAccess(final DataFetchingEnvironment env) { 137 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryLocationBucketCommand.class); 138 } 139 140 static boolean getHasInventoryLocationBucketsAccess(final DataFetchingEnvironment env) { 141 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryLocationBucketsCommand.class); 142 } 143 144 static boolean getHasInventoryCostingMethodAccess(final DataFetchingEnvironment env) { 145 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryCostingMethodCommand.class); 146 } 147 148 static boolean getHasInventoryCostingMethodsAccess(final DataFetchingEnvironment env) { 149 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryCostingMethodsCommand.class); 150 } 151 152 static boolean getHasPartyInventoryCostingMethodAccess(final DataFetchingEnvironment env) { 153 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetPartyInventoryCostingMethodCommand.class); 154 } 155 156 static boolean getHasPartyInventoryCostingMethodsAccess(final DataFetchingEnvironment env) { 157 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetPartyInventoryCostingMethodsCommand.class); 158 } 159 160 static boolean getHasInventoryAdjustmentTypeAccess(final DataFetchingEnvironment env) { 161 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryAdjustmentTypeCommand.class); 162 } 163 164 static boolean getHasInventoryAdjustmentTypesAccess(final DataFetchingEnvironment env) { 165 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryAdjustmentTypesCommand.class); 166 } 167 168 static boolean getHasInventoryBucketTypeAccess(final DataFetchingEnvironment env) { 169 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryBucketTypeCommand.class); 170 } 171 172 static boolean getHasInventoryBucketTypesAccess(final DataFetchingEnvironment env) { 173 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetInventoryBucketTypesCommand.class); 174 } 175 176 static boolean getHasPartyBucketAccess(final DataFetchingEnvironment env) { 177 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetPartyBucketCommand.class); 178 } 179 180 static boolean getHasPartyBucketsAccess(final DataFetchingEnvironment env) { 181 return BaseGraphQl.getGraphQlExecutionContext(env).hasAccess(GetPartyBucketsCommand.class); 182 } 183 184}