// Path: src/java/is/idega/idegaweb/egov/company/EgovCompanyConstants.java
// public class EgovCompanyConstants {
// 
// 	private EgovCompanyConstants() {}
// 
// 	public static final String IW_BUNDLE_IDENTIFIER = "is.idega.idegaweb.egov.company";
// 
// 	public static final String COMPANY_SUPER_ADMIN_ROLE = "company_super_admin";
// 	public static final String COMPANY_ADMIN_ROLE = "company_admin";
// 	public static final String COMPANY_EMPLOYEE_ROLE = "company_staff";
// 
// 	public static final List<String> ALL_COMPANY_ROLES = Collections.unmodifiableList(Arrays.asList(
// 			StandardRoles.ROLE_KEY_COMPANY,
// 			COMPANY_SUPER_ADMIN_ROLE,
// 			COMPANY_ADMIN_ROLE,
// 			COMPANY_EMPLOYEE_ROLE
// 	));
// 
// 	public static final String GROUP_TYPE_COMPANY_ADMINS = "iw_company_admins_group";
// 	public static final String GROUP_TYPE_COMPANY_STAFF = "iw_company_staff_group";
// 	public static final List<String> ALL_COMPANY_TYPES = Collections.unmodifiableList(Arrays.asList(
// 			CompanyConstants.GROUP_TYPE_COMPANY,
// 			GROUP_TYPE_COMPANY_ADMINS,
// 			GROUP_TYPE_COMPANY_STAFF
// 	));
// 
// 	public static final String CASE_CODE_KEY = "COMPORT";
// 
// 	public static final String CONTENT_CODE_REQUEST_INFORMATION = "prm_company_code_request_information";
// 
// 	public static final Integer APPLICATION_TYPE_APPROVED = 0;
// 	public static final Integer APPLICATION_TYPE_REJECTED = 1;
// 	public static final Integer APPLICATION_TYPE_UNHANDLED = 2;
// 
// 	public static final String USER_LOGIN_METADATA = "userLoginEnabledMetaDataForCompanyPortal";
// 
// 	public static final String COMPANY_PORTAL_ROOT_GROUP = "Company Portal";
// 	public static final String COMPANY_ADMINS_GROUP_IN_COMPANY_PORTAL = "Company Admins";
// 	public static final String COMPANY_SUPER_ADMINS_GROUP_IN_COMPANY_PORTAL = "Company Super Admins";
// 
// 	public static final String COMPANY_PORTAL_HOME_PAGE_APPLICATION_PROPERTY = "companyPortalHomePage";
// 	public static final String COMPANY_STAFF_HOME_PAGE_APPLICATION_PROPERTY = "companyStaffHomePage";
// 
// 	public static final String COMPANY_PORTAL_CURRENT_COMPANY_ATTRIBUTE = "companyPortalCurrentCompanyId";
// 
// 	public static final String COMPANY_PERSONAL_ID_METADATA = "COMPANY_PERSONAL_ID";
// }


import is.idega.idegaweb.egov.company.EgovCompanyConstants;
import java.util.List;
import com.idega.core.builder.presentation.ICPropertyHandler;
import com.idega.idegaweb.IWResourceBundle;
import com.idega.presentation.IWContext;
import com.idega.presentation.PresentationObject;
import com.idega.presentation.ui.DropdownMenu;
import com.idega.presentation.ui.SelectOption;
import com.idega.util.StringUtil;
package is.idega.idegaweb.egov.company.presentation.handler;




public class CompanyApplicationTypeSelector implements ICPropertyHandler {

	public List<?> getDefaultHandlerTypes() {
		return null;
	}

	public PresentationObject getHandlerObject(String name, String stringValue, IWContext iwc, boolean oldGenerationHandler, String instanceId, String method) {
		IWResourceBundle iwrb = iwc.getIWMainApplication().getBundle(EgovCompanyConstants.IW_BUNDLE_IDENTIFIER).getResourceBundle(iwc);
		
		DropdownMenu types = new DropdownMenu(name);
		types.addOption(new SelectOption(iwrb.getLocalizedString("unhandled_applications", "Unhandled applications"),
				EgovCompanyConstants.APPLICATION_TYPE_UNHANDLED));
		types.addOption(new SelectOption(iwrb.getLocalizedString("approved_applications", "Approved applications"),
				EgovCompanyConstants.APPLICATION_TYPE_APPROVED));
		types.addOption(new SelectOption(iwrb.getLocalizedString("rejected_applications", "Rejected applications"),
// Path: src/java/is/idega/idegaweb/egov/company/EgovCompanyConstants.java
// public class EgovCompanyConstants {
// 
// 	private EgovCompanyConstants() {}
// 
// 	public static final String IW_BUNDLE_IDENTIFIER = "is.idega.idegaweb.egov.company";
// 
// 	public static final String COMPANY_SUPER_ADMIN_ROLE = "company_super_admin";
// 	public static final String COMPANY_ADMIN_ROLE = "company_admin";
// 	public static final String COMPANY_EMPLOYEE_ROLE = "company_staff";
// 
// 	public static final List<String> ALL_COMPANY_ROLES = Collections.unmodifiableList(Arrays.asList(
// 			StandardRoles.ROLE_KEY_COMPANY,
// 			COMPANY_SUPER_ADMIN_ROLE,
// 			COMPANY_ADMIN_ROLE,
// 			COMPANY_EMPLOYEE_ROLE
// 	));
// 
// 	public static final String GROUP_TYPE_COMPANY_ADMINS = "iw_company_admins_group";
// 	public static final String GROUP_TYPE_COMPANY_STAFF = "iw_company_staff_group";
// 	public static final List<String> ALL_COMPANY_TYPES = Collections.unmodifiableList(Arrays.asList(
// 			CompanyConstants.GROUP_TYPE_COMPANY,
// 			GROUP_TYPE_COMPANY_ADMINS,
// 			GROUP_TYPE_COMPANY_STAFF
// 	));
// 
// 	public static final String CASE_CODE_KEY = "COMPORT";
// 
// 	public static final String CONTENT_CODE_REQUEST_INFORMATION = "prm_company_code_request_information";
// 
// 	public static final Integer APPLICATION_TYPE_APPROVED = 0;
// 	public static final Integer APPLICATION_TYPE_REJECTED = 1;
// 	public static final Integer APPLICATION_TYPE_UNHANDLED = 2;
// 
// 	public static final String USER_LOGIN_METADATA = "userLoginEnabledMetaDataForCompanyPortal";
// 
// 	public static final String COMPANY_PORTAL_ROOT_GROUP = "Company Portal";
// 	public static final String COMPANY_ADMINS_GROUP_IN_COMPANY_PORTAL = "Company Admins";
// 	public static final String COMPANY_SUPER_ADMINS_GROUP_IN_COMPANY_PORTAL = "Company Super Admins";
// 
// 	public static final String COMPANY_PORTAL_HOME_PAGE_APPLICATION_PROPERTY = "companyPortalHomePage";
// 	public static final String COMPANY_STAFF_HOME_PAGE_APPLICATION_PROPERTY = "companyStaffHomePage";
// 
// 	public static final String COMPANY_PORTAL_CURRENT_COMPANY_ATTRIBUTE = "companyPortalCurrentCompanyId";
// 
// 	public static final String COMPANY_PERSONAL_ID_METADATA = "COMPANY_PERSONAL_ID";
// }


// Path: src/java/is/idega/idegaweb/egov/company/presentation/handler/CompanyApplicationTypeSelector.java
import is.idega.idegaweb.egov.company.EgovCompanyConstants;
import java.util.List;
import com.idega.core.builder.presentation.ICPropertyHandler;
import com.idega.idegaweb.IWResourceBundle;
import com.idega.presentation.IWContext;
import com.idega.presentation.PresentationObject;
import com.idega.presentation.ui.DropdownMenu;
import com.idega.presentation.ui.SelectOption;
import com.idega.util.StringUtil;

package is.idega.idegaweb.egov.company.presentation.handler;




public class CompanyApplicationTypeSelector implements ICPropertyHandler {

	public List<?> getDefaultHandlerTypes() {
		return null;
	}

	public PresentationObject getHandlerObject(String name, String stringValue, IWContext iwc, boolean oldGenerationHandler, String instanceId, String method) {
		IWResourceBundle iwrb = iwc.getIWMainApplication().getBundle(EgovCompanyConstants.IW_BUNDLE_IDENTIFIER).getResourceBundle(iwc);
		
		DropdownMenu types = new DropdownMenu(name);
		types.addOption(new SelectOption(iwrb.getLocalizedString("unhandled_applications", "Unhandled applications"),
				EgovCompanyConstants.APPLICATION_TYPE_UNHANDLED));
		types.addOption(new SelectOption(iwrb.getLocalizedString("approved_applications", "Approved applications"),
				EgovCompanyConstants.APPLICATION_TYPE_APPROVED));
		types.addOption(new SelectOption(iwrb.getLocalizedString("rejected_applications", "Rejected applications"),
				EgovCompanyConstants.APPLICATION_TYPE_REJECTED));