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

com.jwebmp.plugins.security.ipgeography.IPGeographyPageConfigurator Maven / Gradle / Ivy

Go to download

This plugin provides information of geography details from GeoBytes provider (first 16k free). It also shows a good way of how to implement it

There is a newer version: 1.2.2.1-jre17
Show newest version
package com.jwebmp.plugins.security.ipgeography;

import com.google.inject.Singleton;
import com.jwebmp.core.Page;
import com.jwebmp.core.services.IPageConfigurator;

import javax.validation.constraints.NotNull;

@Singleton
public class IPGeographyPageConfigurator
		implements IPageConfigurator
{
	/**
	 * The local storage
	 */
	private boolean enabled = true;

	@Override
	public @NotNull Page configure(Page page)
	{

		return page;
	}

	@Override
	public boolean enabled()
	{
		return enabled;
	}


	/**
	 * If this page should be rendered with dynamic local storage support
	 *
	 * @return
	 */
	public boolean isEnabled()
	{
		return enabled;
	}

	/**
	 * If the page should be rendered with dynamic local storage support. This renders a default page that is then fetched from the server to support cordova applications
	 *
	 * @param enabled
	 */
	public void setEnabled(boolean enabled)
	{
		this.enabled = enabled;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy