// Path: src/java/is/idega/idegaweb/egov/citizen/data/CitizenRemoteServices.java
// public interface CitizenRemoteServices extends IDOEntity {
// 	public String getServerName();
// 	public void setServerName(String name);
// 	public String getAddress();
// 	public void setAddress(String address);
// 	public Collection<User> getUsers() throws IDORelationshipException;
// 	public void addUser(User user)  throws IDORelationshipException;
// 	public void removeUser(User user)throws IDORelationshipException;
// }
// 
// Path: src/java/is/idega/idegaweb/egov/citizen/data/CitizenRemoteServicesHome.java
// public interface CitizenRemoteServicesHome extends IDOHome {
// 	public Collection<CitizenRemoteServices> getRemoteServicesByNames(Collection <String> names);
// 	public Collection<CitizenRemoteServices> getRemoteServices(int maxAmount);
// 	public Collection<CitizenRemoteServices> getRemoteServicesByUserId(String userId) throws IDORelationshipException ;
// }


import is.idega.idegaweb.egov.citizen.data.CitizenRemoteServices;
import is.idega.idegaweb.egov.citizen.data.CitizenRemoteServicesHome;
import java.util.ArrayList;
import java.util.Collection;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.CreateException;
import com.idega.builder.bean.AdvancedProperty;
import com.idega.core.contact.data.ContactPurpose;
import com.idega.core.contact.data.ContactPurposeHome;
import com.idega.data.IDOLookup;
import com.idega.data.IDOLookupException;
import com.idega.idegaweb.IWBundle;
import com.idega.idegaweb.IWBundleStartable;
import com.idega.util.ListUtil;
	
	private void addDefaultContactPurposes() throws CreateException, IDOLookupException{
		ContactPurposeHome contactPurposeHome = (ContactPurposeHome) IDOLookup.getHome(ContactPurpose.class);
		Collection<ContactPurpose> contacts = contactPurposeHome.getContactPurposes(1);
		if(!ListUtil.isEmpty(contacts)){
			return;
		}
		ContactPurpose contactPurpose = contactPurposeHome.create();
		contactPurpose.setDisplayName("eHUB_messages");
		contactPurpose.store();
		contactPurpose = contactPurposeHome.create();
		contactPurpose.setDisplayName("eHUB_messages_SMS");
		contactPurpose.store();
	}
	
	
	private Collection<AdvancedProperty> getDefaultRemoteServices(){
		Collection <AdvancedProperty> defaultRemoteServices = new ArrayList<AdvancedProperty>();
		AdvancedProperty service = new AdvancedProperty("http://impratest.sidan.is","Innovation Center");
		defaultRemoteServices.add(service);
		service = new AdvancedProperty("http://biladev.sidan.is","Reykjavík City");
		defaultRemoteServices.add(service);
		service = new AdvancedProperty("http://felixtest.sidan.is","ÍSÍ");
		defaultRemoteServices.add(service);
		return defaultRemoteServices;
	}
	
	private void addDefaultRemoteServices(IWBundle starterBundle){
		CitizenRemoteServicesHome citizenRemoteServicesHome = null;
		try {
// Path: src/java/is/idega/idegaweb/egov/citizen/data/CitizenRemoteServices.java
// public interface CitizenRemoteServices extends IDOEntity {
// 	public String getServerName();
// 	public void setServerName(String name);
// 	public String getAddress();
// 	public void setAddress(String address);
// 	public Collection<User> getUsers() throws IDORelationshipException;
// 	public void addUser(User user)  throws IDORelationshipException;
// 	public void removeUser(User user)throws IDORelationshipException;
// }
// 
// Path: src/java/is/idega/idegaweb/egov/citizen/data/CitizenRemoteServicesHome.java
// public interface CitizenRemoteServicesHome extends IDOHome {
// 	public Collection<CitizenRemoteServices> getRemoteServicesByNames(Collection <String> names);
// 	public Collection<CitizenRemoteServices> getRemoteServices(int maxAmount);
// 	public Collection<CitizenRemoteServices> getRemoteServicesByUserId(String userId) throws IDORelationshipException ;
// }


// Path: src/java/is/idega/idegaweb/egov/citizen/IWBundleStarter.java
import is.idega.idegaweb.egov.citizen.data.CitizenRemoteServices;
import is.idega.idegaweb.egov.citizen.data.CitizenRemoteServicesHome;
import java.util.ArrayList;
import java.util.Collection;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.CreateException;
import com.idega.builder.bean.AdvancedProperty;
import com.idega.core.contact.data.ContactPurpose;
import com.idega.core.contact.data.ContactPurposeHome;
import com.idega.data.IDOLookup;
import com.idega.data.IDOLookupException;
import com.idega.idegaweb.IWBundle;
import com.idega.idegaweb.IWBundleStartable;
import com.idega.util.ListUtil;

	
	private void addDefaultContactPurposes() throws CreateException, IDOLookupException{
		ContactPurposeHome contactPurposeHome = (ContactPurposeHome) IDOLookup.getHome(ContactPurpose.class);
		Collection<ContactPurpose> contacts = contactPurposeHome.getContactPurposes(1);
		if(!ListUtil.isEmpty(contacts)){
			return;
		}
		ContactPurpose contactPurpose = contactPurposeHome.create();
		contactPurpose.setDisplayName("eHUB_messages");
		contactPurpose.store();
		contactPurpose = contactPurposeHome.create();
		contactPurpose.setDisplayName("eHUB_messages_SMS");
		contactPurpose.store();
	}
	
	
	private Collection<AdvancedProperty> getDefaultRemoteServices(){
		Collection <AdvancedProperty> defaultRemoteServices = new ArrayList<AdvancedProperty>();
		AdvancedProperty service = new AdvancedProperty("http://impratest.sidan.is","Innovation Center");
		defaultRemoteServices.add(service);
		service = new AdvancedProperty("http://biladev.sidan.is","Reykjavík City");
		defaultRemoteServices.add(service);
		service = new AdvancedProperty("http://felixtest.sidan.is","ÍSÍ");
		defaultRemoteServices.add(service);
		return defaultRemoteServices;
	}
	
	private void addDefaultRemoteServices(IWBundle starterBundle){
		CitizenRemoteServicesHome citizenRemoteServicesHome = null;
		try {
			citizenRemoteServicesHome = (CitizenRemoteServicesHome) IDOLookup.getHome(CitizenRemoteServices.class);