OSLC Jira Provider v7.1.7 Java classes/JiraChangeRequest.java
public static String parseOSLCLinks(final List<AppLink> appLinkList) {
		// prepare GSON
		GsonBuilder gsonBuilder = new GsonBuilder();
		Gson gson = gsonBuilder.create();

		AppLinksRepository appLinkRepository = new AppLinksRepository();

		// return empty string to save empty content to customfield
		if (appLinkList.isEmpty()) {
			return "";
		}
		for (AppLink appLink : appLinkList) {
			appLinkRepository.addAppLink(appLink, true);
		}

		String jsonAppLinks = gson.toJson(appLinkRepository);
		if (jsonAppLinks == null) {
			jsonAppLinks = "";
		}

		return jsonAppLinks;
	}
/**
	 * Converts data class of Application link to GSON format
	 * 
	 * @param the
	 *            list of Application links
	 * @return Application links in GSON format
	 */
Converts data class of Application link to GSON format

@param the
list of Application links
@return Application links in GSON format
Converts data class of Application link to GSON format @param the list of Application links @return Application links in GSON format
public static String parseOSLCLinks(final List<AppLink> appLinkList) {
		GsonBuilder gsonBuilder = new GsonBuilder();
		Gson gson = gsonBuilder.create();
		AppLinksRepository appLinkRepository = new AppLinksRepository();
		if (appLinkList.isEmpty()) {
			return "";
		}
		for (AppLink appLink : appLinkList) {
			appLinkRepository.addAppLink(appLink, true);
		}
		String jsonAppLinks = gson.toJson(appLinkRepository);
		if (jsonAppLinks == null) {
			jsonAppLinks = "";
		}
		return jsonAppLinks;
	}
public static String parseOSLCLinks ( final List < AppLink > appLinkList ) { GsonBuilder gsonBuilder = new GsonBuilder ( ) ; Gson gson = gsonBuilder . create ( ) ; AppLinksRepository appLinkRepository = new AppLinksRepository ( ) ; if ( appLinkList . isEmpty ( ) ) { return "" ; } for ( AppLink appLink : appLinkList ) { appLinkRepository . addAppLink ( appLink , true ) ; } String jsonAppLinks = gson . toJson ( appLinkRepository ) ; if ( jsonAppLinks == null ) { jsonAppLinks = "" ; } return jsonAppLinks ; }
Converts data class of Application link to GSON format
Converts data class of Application link to GSON format
// prepare GSON // return empty string to save empty content to customfield