class BBInputSetup implements JavaDelegate {

    protected GeneralBuildingBlock getGBB(ExecuteBuildingBlock executeBB, Map<ResourceKey, String> lookupKeyMap,
            String requestAction, boolean aLaCarte, String resourceId, String vnfType) throws Exception {
        String requestId = executeBB.getRequestId();
        this.populateLookupKeyMapWithIds(executeBB.getWorkflowResourceIds(), lookupKeyMap);
        RequestDetails requestDetails = executeBB.getRequestDetails();
        if (requestDetails == null) {
            requestDetails = bbInputSetupUtils.getRequestDetails(requestId);
        }
        if (requestDetails.getModelInfo() == null) {
            return this.getGBBCM(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId);
        } else {
            ModelType modelType = requestDetails.getModelInfo().getModelType();
            if (aLaCarte && modelType.equals(ModelType.service)) {
                return this.getGBBALaCarteService(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId);
            } else if (aLaCarte && !modelType.equals(ModelType.service)) {
                return this.getGBBALaCarteNonService(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId,
                        vnfType);
            } else {
                return this.getGBBMacro(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId, vnfType);
            }
        }
    }

}