api/src/main/java/com/epam/pipeline/manager/cluster/InstanceOfferManager.java
public boolean isPriceTypeAllowed(final String priceType,
                                      final ContextualPreferenceExternalResource toolResource,
                                      final boolean isMaster) {
        final List<String> priceTypesPreferences = isMaster
                                     ? MASTER_PRICE_TYPES_PREFERENCES
                                     : PRICE_TYPES_PREFERENCES;
        return getContextualPreferenceValueAsList(toolResource, priceTypesPreferences).stream()
            .anyMatch(priceType::equals);
    }
/**
     * Checks if the given price type is allowed for the authorized user and tool.
     *
     * @param priceType To be checked.
     * @param toolResource Optional tool resource.
     * @param isMaster is checking node a master in cluster run
     */
Checks if the given price type is allowed for the authorized user and tool.
@param priceType To be checked.
@param toolResource Optional tool resource.
@param isMaster is checking node a master in cluster run
Checks if the given price type is allowed for the authorized user and tool . @param priceType To be checked . @param toolResource Optional tool resource . @param isMaster is checking node a master in cluster run
public boolean isPriceTypeAllowed(final String priceType,
                                      final ContextualPreferenceExternalResource toolResource,
                                      final boolean isMaster) {
        final List<String> priceTypesPreferences = isMaster
                                     ? MASTER_PRICE_TYPES_PREFERENCES
                                     : PRICE_TYPES_PREFERENCES;
        return getContextualPreferenceValueAsList(toolResource, priceTypesPreferences).stream()
            .anyMatch(priceType::equals);
    }
public boolean isPriceTypeAllowed ( final String priceType , final ContextualPreferenceExternalResource toolResource , final boolean isMaster ) { final List < String > priceTypesPreferences = isMaster ? MASTER_PRICE_TYPES_PREFERENCES : PRICE_TYPES_PREFERENCES ; return getContextualPreferenceValueAsList ( toolResource , priceTypesPreferences ) . stream ( ) . anyMatch ( priceType :: equals ) ; }
Checks if the given price type is allowed for the authorized user and tool.
Checks if the given price type is allowed for the authorized user and tool .