All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.talk2object.plum.view.web.WebFileUtils Maven / Gradle / Ivy

The newest version!
package com.talk2object.plum.view.web;

import org.apache.commons.lang3.RandomUtils;

public class WebFileUtils {
	public static final String PARAMETER_FILE = "_plum_file";

	public static String generateUrl(String componentId, String shortName) {

		long rand = RandomUtils.nextLong(0, Long.MAX_VALUE);
		String imageTagName = String.format("%s_%s", componentId, shortName);

		return String.format("?%s=%s&random=%d", PARAMETER_FILE, imageTagName, rand);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy