// Path: src/java/is/idega/idegaweb/egov/citizen/IWBundleStarter.java
// public class IWBundleStarter implements IWBundleStartable {
// 
// 	public final static String IW_BUNDLE_IDENTIFIER = "is.idega.idegaweb.egov.citizen";
// 	
// 	@Override
// 	public void start(IWBundle starterBundle) {
// 		addDefaultRemoteServices(starterBundle);
// 		try{
// 			addDefaultContactPurposes();
// 		}catch(Exception e){
// 			Logger.getLogger(IWBundleStarter.class.getName()).log(Level.WARNING, "failed adding default contact purposes for ehub", e);
// 		}
// 	}
// 
// 	@Override
// 	public void stop(IWBundle starterBundle) {
// 	}
// 	
// 	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);
// 		} catch (IDOLookupException e) {
// 			Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "failed adding default remote services", e);
// 			return;
// 		}
// 		Collection<CitizenRemoteServices> services = citizenRemoteServicesHome.getRemoteServices(1);
// 		if(!ListUtil.isEmpty(services)){
// 			return;
// 		}
// 		
// 		Collection<AdvancedProperty> defaultServices = getDefaultRemoteServices();
// 		for(AdvancedProperty service : defaultServices){
// 			CitizenRemoteServices citizenRemoteServices =  null;
// 			try {
// 				citizenRemoteServices = (CitizenRemoteServices) citizenRemoteServicesHome.createIDO();
// 				citizenRemoteServices.setAddress(service.getId());
// 				citizenRemoteServices.setServerName(service.getValue());
// 				citizenRemoteServices.store();
// 			} catch (Exception e) {
// 				Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "failed adding default remote service" + service, e);
// 			}
// 		}
// 	}
// }


import is.idega.idegaweb.egov.citizen.IWBundleStarter;
import java.util.Collection;
import com.idega.presentation.Block;
import com.idega.presentation.IWContext;
import com.idega.presentation.Layer;
import com.idega.presentation.text.Heading1;
import com.idega.presentation.text.ListItem;
import com.idega.presentation.text.Lists;
import com.idega.presentation.text.Text;
import com.idega.util.ListUtil;
import com.idega.util.PresentationUtil;
/*
 * $Id$
 * Created on Jan 15, 2006
 *
 * Copyright (C) 2006 Idega Software hf. All Rights Reserved.
 *
 * This software is the proprietary information of Idega hf.
 * Use is subject to license terms.
 */
package is.idega.idegaweb.egov.citizen.presentation;




public abstract class CitizenBlock extends Block {

	@Override
	public String getBundleIdentifier() {
// Path: src/java/is/idega/idegaweb/egov/citizen/IWBundleStarter.java
// public class IWBundleStarter implements IWBundleStartable {
// 
// 	public final static String IW_BUNDLE_IDENTIFIER = "is.idega.idegaweb.egov.citizen";
// 	
// 	@Override
// 	public void start(IWBundle starterBundle) {
// 		addDefaultRemoteServices(starterBundle);
// 		try{
// 			addDefaultContactPurposes();
// 		}catch(Exception e){
// 			Logger.getLogger(IWBundleStarter.class.getName()).log(Level.WARNING, "failed adding default contact purposes for ehub", e);
// 		}
// 	}
// 
// 	@Override
// 	public void stop(IWBundle starterBundle) {
// 	}
// 	
// 	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);
// 		} catch (IDOLookupException e) {
// 			Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "failed adding default remote services", e);
// 			return;
// 		}
// 		Collection<CitizenRemoteServices> services = citizenRemoteServicesHome.getRemoteServices(1);
// 		if(!ListUtil.isEmpty(services)){
// 			return;
// 		}
// 		
// 		Collection<AdvancedProperty> defaultServices = getDefaultRemoteServices();
// 		for(AdvancedProperty service : defaultServices){
// 			CitizenRemoteServices citizenRemoteServices =  null;
// 			try {
// 				citizenRemoteServices = (CitizenRemoteServices) citizenRemoteServicesHome.createIDO();
// 				citizenRemoteServices.setAddress(service.getId());
// 				citizenRemoteServices.setServerName(service.getValue());
// 				citizenRemoteServices.store();
// 			} catch (Exception e) {
// 				Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "failed adding default remote service" + service, e);
// 			}
// 		}
// 	}
// }


// Path: src/java/is/idega/idegaweb/egov/citizen/presentation/CitizenBlock.java
import is.idega.idegaweb.egov.citizen.IWBundleStarter;
import java.util.Collection;
import com.idega.presentation.Block;
import com.idega.presentation.IWContext;
import com.idega.presentation.Layer;
import com.idega.presentation.text.Heading1;
import com.idega.presentation.text.ListItem;
import com.idega.presentation.text.Lists;
import com.idega.presentation.text.Text;
import com.idega.util.ListUtil;
import com.idega.util.PresentationUtil;

/*
 * $Id$
 * Created on Jan 15, 2006
 *
 * Copyright (C) 2006 Idega Software hf. All Rights Reserved.
 *
 * This software is the proprietary information of Idega hf.
 * Use is subject to license terms.
 */
package is.idega.idegaweb.egov.citizen.presentation;




public abstract class CitizenBlock extends Block {

	@Override
	public String getBundleIdentifier() {
		return IWBundleStarter.IW_BUNDLE_IDENTIFIER;