/**
 * Copyright 2008-2009 DRIVER PROJECT (Bielefeld University)
 * Original author: Marek Imialek <marek.imialek at uni-bielefeld.de>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package eu.dnetlib.common.ws;

import eu.dnetlib.common.ws.subscription.AbstractSubscription;


/**
 * The Class RegisterServiceJobProperties.
 * 
 * @author <a href="mailto:marek.imialek at uni-bielefeld.de">Marek Imialek</a>
 */
public class RegisterServiceJobProperties {
	

	/** The service name. */
	private String serviceName;
	
	/** The service base address. */
	private String serviceBaseAddress;

	private boolean doBlackboardRegistration;

	/** The subscription flag. */
	private boolean doSubscribe;
	
	/** The service profile id. */
	private String serviceProfileId;
	
	private AbstractSubscription subscriptionObject;
	/**
	 * Gets the service base address.
	 * 
	 * @return the serviceBaseAddress
	 */
	public String getServiceBaseAddress() {
		return serviceBaseAddress;
	}

	/**
	 * Sets the service base address.
	 * 
	 * @param serviceBaseAddress
	 *            the serviceBaseAddress to set
	 */
	public void setServiceBaseAddress(String serviceBaseAddress) {
		this.serviceBaseAddress = serviceBaseAddress;
	}

	/**
	 * Sets the service name.
	 * 
	 * @param serviceName
	 *            the new service name
	 */
	public void setServiceName (String serviceName){
		this.serviceName = serviceName;
	}
	
	/**
	 * Gets the service name.
	 * 
	 * @return the service name
	 */
	public String getServiceName (){
		return this.serviceName;
	}

	/**
	 * Gets the blackboard registration.
	 * 
	 * @return the blackboard registration
	 */
	public boolean getBlackboardRegistration() {
		return this.doBlackboardRegistration;
	}

	/**
	 * Sets the blackboard registration.
	 * 
	 * @param blackboardRegistration
	 *            the new blackboard registration
	 */
	public void setBlackboardRegistration(boolean blackboardRegistration) {
		this.doBlackboardRegistration = blackboardRegistration;
	}
	
	/**
	 * @deprecated replaced by {@link #isSubscriptionEnabled()}
	 * Gets the index subscription flag.
	 * 
	 * @return the blackboard registration
	 */
	@Deprecated
	public boolean getIndexSubscription() {
		return this.doSubscribe;
	}

	
	/**
	 * gets the subscription flag
	 * @return subscription flag
	 */
	public boolean isSubscriptionEnabled(){
		return this.doSubscribe;		
	}
	
	/**
	 * @deprecated replaced by {@link #setSubscriptionEnabled(boolean)}}
	 * Sets the index subscription flag.
	 * 
	 * @param indexSubscription
	 *            the index subscription flag
	 */
	@Deprecated
	public void setIndexSubscription(boolean indexSubscription) {
		this.doSubscribe = indexSubscription;
	}
	
	/**
	 * sets the subscription flag
	 * @param doSubscribe
	 * 			the subscription flag
	 */
	public void setSubscriptionEnabled(boolean doSubscribe){
		this.doSubscribe = doSubscribe;		
	}

	/**
	 * Sets the service profile id
	 * @param serviceProfileId
	 */
	public void setServiceProfileId(String serviceProfileId) {
		this.serviceProfileId = serviceProfileId;
	}

	/**
	 * Gets the service profile id
	 * @return the service profile id
	 */
	public String getServiceProfileId() {
		return serviceProfileId;
	}

	public void setSubscriptionObject(AbstractSubscription subscriptionObject) {
		this.subscriptionObject = subscriptionObject;
	}

	public AbstractSubscription getSubscriptionObject() {
		return subscriptionObject;
	}
}
