public ExoCacheFactoryConfigPlugin(InitParams params) { configs = new HashMap<String, String>(); for (Iterator<ValueParam> iterator = params.getValueParamIterator(); iterator.hasNext();) { ValueParam vParam = iterator.next(); configs.put(vParam.getName(), vParam.getValue()); } }
public RequestHandlerImpl(RequestDispatcher dispatcher, DependencySupplier dependencySupplier, InitParams params) { this.dispatcher = dispatcher; this.dependencySupplier = dependencySupplier; if (params != null) { for (Iterator<ValueParam> i = params.getValueParamIterator(); i.hasNext();) { ValueParam vp = i.next(); properties.put(vp.getName(), vp.getValue()); } } }
public UserDashboardConfigurationService(DataStorage dataStorageService, UserPortalConfigService userPortalConfigService, GadgetRegistryService gadgetRegistryService, InitParams initParams) { defaultTabName = initParams.getValueParam("dashboardTabName").getValue(); defaultTabLabel = initParams.getValueParam("dashboardTabLabel").getValue(); dashboardPageTemplate = initParams.getValueParam("dashboardPageTemplate").getValue(); involvedUsers = initParams.getValueParam("involvedUsers").getValue(); if (involvedUsers.equals(SEPARATE_INVOLVED_USERS)) { separateUsersconfig = initParams.getObjectParamValues(UserDashboardConfiguration.class); // separateUsersconfig should not be null if (separateUsersconfig == null) { throw new IllegalStateException(involvedUsers + " is used for " + initParams.getValueParam("involvedUsers").getName() + " init param..\nObject param values can not be null..\nPlease check your configuration"); } } else if (involvedUsers.equals(ALL_INVOLVED_USERS)) { allUsersConfig = initParams.getObjectParamValues(Gadget.class); // allUsersConfig should not be null if (allUsersConfig == null) { throw new IllegalStateException(involvedUsers + " is used for " + initParams.getValueParam("involvedUsers").getName() + " init param..\nObject param values can not be null..\nPlease check your configuration"); } } else { // error in configuration throw new IllegalStateException(initParams.getValueParam("involvedUsers").getName() + " init param is missing.. Please check your configuration"); } this.dataStorageService = dataStorageService; this.userPortalConfigService = userPortalConfigService; this.gadgetRegistryService = gadgetRegistryService; }
LOG.error("Parameter '" + maxNodesParam.getName() + "' is not a valid number.", e);
public PopulateGadgetRegisryService(GadgetRegistryService gadgetRegistryService, ApplicationRegistryService applicationRegistryService, InitParams initParams) { categoryName = initParams.getValueParam("gadgetsCategoryName").getValue(); if (categoryName == null) { categoryName = DEFAULT_GADGETS_CATEGORY_NAME; LOG.warn("Failed to retrieve " + initParams.getValueParam("gadgetsCategoryName").getName() + " init param. Default category name will be used: " + DEFAULT_GADGETS_CATEGORY_NAME); } gadgetsCategoryAccessPermission = initParams.getValueParam("gadgetsCategoryAccessPermission").getValue(); if (gadgetsCategoryAccessPermission == null) { gadgetsCategoryAccessPermission = UserACL.EVERYONE; LOG.warn("Failed to retrieve " + initParams.getValueParam("gadgetsCategoryAccessPermission").getName() + " init param. Default access permission will be used: " + UserACL.EVERYONE); } gadgets = initParams.getObjectParamValues(Gadget.class); this.gadgetRegistryService = gadgetRegistryService; this.applicationRegistryService = applicationRegistryService; }