package com.github.aureliano.achmed.os.service;

import com.github.aureliano.achmed.command.CommandResponse;
import com.github.aureliano.achmed.exception.ServiceResourceException;
import com.github.aureliano.achmed.helper.StringHelper;
import com.github.aureliano.achmed.resources.properties.ServiceProperties;

public abstract class BaseService implements IService {

	private ServiceProperties properties;
	
	public BaseService() {
		super();
	}

	public CommandResponse start() {
		throw new UnsupportedOperationException("Not implemented yet.");
	}

	public CommandResponse stop() {
		throw new UnsupportedOperationException("Not implemented yet.");
	}

	public CommandResponse restart() {
		throw new UnsupportedOperationException("Not implemented yet.");
	}

	public boolean isRunning() {
		throw new UnsupportedOperationException("Not implemented yet.");
	}

	public void setServiceProperties(ServiceProperties properties) {
		this.properties = properties;
	}

	public ServiceProperties getServiceProperties() {
		return this.properties;
	}
	
	protected Integer getPid() {
		if (StringHelper.isEmpty(this.properties.getPattern())) {
			throw new ServiceResourceException("Cannot get process id. No pattern provided.");
		}
		
		throw new UnsupportedOperationException("Not implemented yet.");
	}
}
@@ -106,135 +106,8 @@
 se;%0A
-import com.github.aureliano.achmed.exception.ServiceResourceException;%0Aimport com.github.aureliano.achmed.helper.StringHelper;%0A
 impo
@@ -918,260 +918,5 @@
 %0A%09%7D%0A
-%09%0A%09protected Integer getPid() %7B%0A%09%09if (StringHelper.isEmpty(this.properties.getPattern())) %7B%0A%09%09%09throw new ServiceResourceException(%22Cannot get process id. No pattern provided.%22);%0A%09%09%7D%0A%09%09%0A%09%09throw new UnsupportedOperationException(%22Not implemented yet.%22);%0A%09%7D%0A
 %7D

Remove getPid method.