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

org.springframework.social.partnercenter.api.AbstractTemplate Maven / Gradle / Ivy

package org.springframework.social.partnercenter.api;

import org.springframework.social.MissingAuthorizationException;

public abstract class AbstractTemplate {
	private boolean isAuthorized;

	protected AbstractTemplate(boolean isAuthorized){
		this.isAuthorized = isAuthorized;
		checkAuthorization();
	}
	private void checkAuthorization(){
		if (!isAuthorized) {
			throw new MissingAuthorizationException(getProviderId());
		}
	}

	protected abstract String getProviderId();
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy