// Path: src/java/com/idega/openid/server/dao/OpenIDServerDAO.java
// public interface OpenIDServerDAO extends GenericDao {
// 
// 	public void createAuthorizedAttribute(String userUUID, String realm, ExchangeAttribute attribute);
// 	
// 	public List<AuthorizedAttribute> getAuthorizedAttributes(String userUUID, String realm);
// 
// 	public AuthorizedAttribute getAuthorizedAttributes(String userUUID, String realm, ExchangeAttribute attr);
// 
// 	public void createLogEntry(String userUUID, String realm, String exchangedAttributes);
// 	
// 	public List<ExchangeAttribute> getAllExchangeAttributes();
// 
// 	public void createExchangeAttribute(String name, String type);
// 	
// 	public ExchangeAttribute getExchangeAttribute(String name);
// 	
// 	public ExchangeAttribute getExchangeAttribute(String name, String type);
// 	
// 	public void saveAuthorizedAttribute(AuthorizedAttribute attr);
// 	
// }
// 
// Path: src/java/com/idega/openid/server/filter/OpenIDPagesRedirectHandler.java
// public class OpenIDPagesRedirectHandler implements PagesRedirectHandler {
// 
// 	@Override
// 	public boolean isForwardOnRootURIRequest(HttpServletRequest request, HttpServletResponse response) {
// 		String serverName = request.getServerName();
// 		String subDomain = new OpenIDUtil().getSubDomain(serverName);
// 		
// 		if (subDomain == null) {
// 			return true;
// 		}
// 		return false;
// 	}
// }


import org.springframework.beans.factory.annotation.Autowired;
import com.idega.idegaweb.IWBundle;
import com.idega.idegaweb.IWBundleStartable;
import com.idega.openid.server.dao.OpenIDServerDAO;
import com.idega.openid.server.filter.OpenIDPagesRedirectHandler;
import com.idega.servlet.filter.IWBundleResourceFilter;
import com.idega.servlet.filter.util.PagesRedirectHandler;
import com.idega.util.expression.ELUtil;
package com.idega.openid;



public class IWBundleStarter implements IWBundleStartable {
	
	@Autowired
	private OpenIDServerDAO dao;
	
	public void start(IWBundle starterBundle) {
		String handlerClass = starterBundle.getApplication().getSettings().getProperty(PagesRedirectHandler.ATTRIBUTE_PAGES_REDIRECT_HANDLER_CLASS);
		if (handlerClass == null) {
// Path: src/java/com/idega/openid/server/dao/OpenIDServerDAO.java
// public interface OpenIDServerDAO extends GenericDao {
// 
// 	public void createAuthorizedAttribute(String userUUID, String realm, ExchangeAttribute attribute);
// 	
// 	public List<AuthorizedAttribute> getAuthorizedAttributes(String userUUID, String realm);
// 
// 	public AuthorizedAttribute getAuthorizedAttributes(String userUUID, String realm, ExchangeAttribute attr);
// 
// 	public void createLogEntry(String userUUID, String realm, String exchangedAttributes);
// 	
// 	public List<ExchangeAttribute> getAllExchangeAttributes();
// 
// 	public void createExchangeAttribute(String name, String type);
// 	
// 	public ExchangeAttribute getExchangeAttribute(String name);
// 	
// 	public ExchangeAttribute getExchangeAttribute(String name, String type);
// 	
// 	public void saveAuthorizedAttribute(AuthorizedAttribute attr);
// 	
// }
// 
// Path: src/java/com/idega/openid/server/filter/OpenIDPagesRedirectHandler.java
// public class OpenIDPagesRedirectHandler implements PagesRedirectHandler {
// 
// 	@Override
// 	public boolean isForwardOnRootURIRequest(HttpServletRequest request, HttpServletResponse response) {
// 		String serverName = request.getServerName();
// 		String subDomain = new OpenIDUtil().getSubDomain(serverName);
// 		
// 		if (subDomain == null) {
// 			return true;
// 		}
// 		return false;
// 	}
// }


// Path: src/java/com/idega/openid/IWBundleStarter.java
import org.springframework.beans.factory.annotation.Autowired;
import com.idega.idegaweb.IWBundle;
import com.idega.idegaweb.IWBundleStartable;
import com.idega.openid.server.dao.OpenIDServerDAO;
import com.idega.openid.server.filter.OpenIDPagesRedirectHandler;
import com.idega.servlet.filter.IWBundleResourceFilter;
import com.idega.servlet.filter.util.PagesRedirectHandler;
import com.idega.util.expression.ELUtil;

package com.idega.openid;



public class IWBundleStarter implements IWBundleStartable {
	
	@Autowired
	private OpenIDServerDAO dao;
	
	public void start(IWBundle starterBundle) {
		String handlerClass = starterBundle.getApplication().getSettings().getProperty(PagesRedirectHandler.ATTRIBUTE_PAGES_REDIRECT_HANDLER_CLASS);
		if (handlerClass == null) {
			starterBundle.getApplication().getSettings().setProperty(PagesRedirectHandler.ATTRIBUTE_PAGES_REDIRECT_HANDLER_CLASS, OpenIDPagesRedirectHandler.class.getName());