class ServicePluginFactory {

    @SuppressWarnings("unchecked")
    public String doProcessSiteLocation(ServiceDecomposition serviceDecomposition, String uuiRequest) {
        if (!isNeedProcessSite(uuiRequest)) {
            return 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());
        List<Object> resources =
                (List<Object>) serviceParametersObject.getOrDefault("resources", Collections.emptyList());

        if (isSiteLocationLocal(serviceRequestInputs, resources)) {
            // resources changed : added TP info
            return getJsonString(uuiObject);
        }

        List<Resource> addResourceList = new ArrayList<>();
        addResourceList.addAll(serviceDecomposition.getServiceResources());

        serviceDecomposition.setVnfResources(null);
        serviceDecomposition.setAllottedResources(null);
        serviceDecomposition.setNetworkResources(null);
        serviceDecomposition.setConfigResources(null);
        for (Resource resource : addResourceList) {
            String resourcemodelName = resource.getModelInfo().getModelName();
            if (StringUtils.containsIgnoreCase(resourcemodelName, "sppartner")) {
                // change serviceDecomposition
                serviceDecomposition.addResource(resource);
                break;
            }
        }

        return uuiRequest;
    }

    private  ServicePluginFactory();

}