class ServicePluginFactory {

    @SuppressWarnings("unchecked")
    public String doTPResourcesAllocation(DelegateExecution execution, String uuiRequest) {
        Map<String, Object> uuiObject = getJsonObject(uuiRequest, Map.class);
        if (uuiObject == null) {
            return uuiRequest;
        }
        Map<String, Object> serviceObject =
                (Map<String, Object>) uuiObject.getOrDefault("service", Collections.emptyMap());
        Map<String, Object> serviceParametersObject =
                (Map<String, Object>) serviceObject.getOrDefault("parameters", Collections.emptyMap());
        Map<String, Object> serviceRequestInputs =
                (Map<String, Object>) serviceParametersObject.getOrDefault("requestInputs", Collections.emptyMap());

        if (!isNeedAllocateCrossTPResources(serviceRequestInputs)) {
            return uuiRequest;
        }

        allocateCrossTPResources(execution, serviceRequestInputs);
        return getJsonString(uuiObject);
    }

    private  ServicePluginFactory();

}