package eu.dnetlib.enabling.aas.ws.nh;

import org.apache.log4j.Logger;


/**
 * Notification utilities.
 * @author mhorst
 *
 */
public class NotificationUtils {

	protected static final Logger log = Logger.getLogger(NotificationUtils.class);

	static final char topicRegistrationDelimiter 				= '/';
	
	/**
	 * Builds topic for given topic type, resource type and profile id.
	 * @param topicType
	 * @param resourceType
	 * @param profId
	 * @return topic 
	 */
	public static String buildTopicForProfId(String topicType, String resourceType, 
			String profId) {
		return topicType + topicRegistrationDelimiter + 
			resourceType + topicRegistrationDelimiter + profId;
	}
	
	/**
	 * Builds topic for given topic type and resource type.
	 * @param topicType
	 * @param resourceType
	 * @return topic 
	 */
	public static String buildTopic(String topicType, String resourceType) {
		return topicType + topicRegistrationDelimiter + resourceType;
	}
}
