public DataPlugin(OrganizationService organizationService, InitParams params) throws Exception { config = (OrganizationConfig) params.getObjectParamValues(OrganizationConfig.class).get(0); this.organizationService = organizationService; }
public ExoCacheCreatorPlugin(InitParams params) { creators = new ArrayList<ExoCacheCreator>(); List<?> configs = params.getObjectParamValues(ExoCacheCreator.class); for (int i = 0; i < configs.size(); i++) { ExoCacheCreator config = (ExoCacheCreator)configs.get(i); creators.add(config); } }
public AddJobListenerComponentPlugin(InitParams params) { if (params != null) { keys = new ArrayList<JobKey>(); for (Iterator<JobKey> it = params.getObjectParamValues(JobKey.class).iterator(); it.hasNext();) { JobKey key = it.next(); keys.add(key); } } }
public AddTriggerListenerComponentPlugin(InitParams params) { if (params != null) { keys = new ArrayList<JobKey>(); for (Iterator<JobKey> it = params.getObjectParamValues(JobKey.class).iterator(); it.hasNext();) { JobKey key = it.next(); keys.add(key); } } }
public UpgradeLocalGadgetsPlugin(ConfigurationManager configurationManager, RepositoryService repositoryService, SourceStorage sourceStorage, GadgetRegistryService gadgetRegistryService, InitParams initParams, ChromatticManager chromatticManager) { super(initParams); this.gadgets = initParams.getObjectParamValues(GadgetUpgrade.class); this.repositoryService = repositoryService; this.configurationManager = configurationManager; this.sourceStorage = sourceStorage; this.gadgetRegistryService = (GadgetRegistryServiceImpl) gadgetRegistryService; ApplicationRegistryChromatticLifeCycle lifeCycle = (ApplicationRegistryChromatticLifeCycle) chromatticManager.getLifeCycle("app"); this.chromatticLifeCycle = lifeCycle; }
@SuppressWarnings("unchecked") public ModuleRegistry(InitParams initParams) { if (initParams.containsKey("portlets.managed.by.profile")) { portletsManagedByProfile = initParams.getValuesParam("portlets.managed.by.profile").getValues(); } else { portletsManagedByProfile = new ArrayList<String>(); } Iterator<Module> iterator = initParams.getObjectParamValues(Module.class).iterator(); while (iterator.hasNext()) { Module module = iterator.next(); if (LOG.isDebugEnabled()) { LOG.debug(module.toString()); } modulesByName.put(module.getName(), module); } }
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; }
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; }