class WsImportPortlet extends Sw360Portlet {

    void setNewImportSource(TokenCredentials newCredentials, PortletSession session, JSONObject responseData) {
        String serverUrl = nullToEmpty(newCredentials.getServerUrl());

        if (serverUrl.isEmpty()) {
            responseData.put(ProjectImportConstants.RESPONSE__STATUS,
                    ProjectImportConstants.RESPONSE__DB_URL_NOT_SET);
        } else {
            putTokenCredentialsIntoSession(session, newCredentials);
            responseData.put(ProjectImportConstants.RESPONSE__STATUS,
                    ProjectImportConstants.RESPONSE__DB_CHANGED);
            responseData.put(ProjectImportConstants.RESPONSE__DB_URL, serverUrl);
        }
    }

}