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