public RepositoryServiceConfigurationPlugin(InitParams params) { ValueParam param = params == null ? null : params.getValueParam("conf-path"); if (param == null || param.getValue() == null || param.getValue().trim().length() == 0) { throw new IllegalArgumentException("The value-param 'conf-path' is mandatory, please check your configuration"); } else { this.confPath = param.getValue().trim(); } }
private void initFileParameter(InitParams initialParameters) { ValueParam filePathValueParam = initialParameters.getValueParam(FILE_PATH_PARAMETER); if (filePathValueParam == null) { throw new IllegalStateException("No temporary file path is specified for " + SystemParametersPersistenceConfigurator.class.getSimpleName()); } filePath = filePathValueParam.getValue() + File.separator + FILE_NAME; }
public Class run() throws ClassNotFoundException { return ClassLoading.loadClass(injectAnnotationParameter.getValue(), DependencySupplier.class); } });
public OAuthRegistrationServicesImpl(InitParams initParams, OrganizationService orgService, IdentityManager identityManager) { ValueParam onFly = initParams.getValueParam("registerOnFly"); String onFlyValue = onFly == null ? "" : onFly.getValue(); if(onFlyValue != null && !onFlyValue.isEmpty()) { registerOnFly = Arrays.asList(onFlyValue.split(",")); } else { registerOnFly = Collections.EMPTY_LIST; } this.orgService = orgService; this.identityManager = identityManager; }
public AuthenticationHandler(InitParams params) { String callbackEnabledParam = params.getValueParam("ssoCallbackEnabled").getValue(); this.callbackEnabled = Boolean.parseBoolean(callbackEnabledParam); }
public UpgradeGroupSiteLayoutPlugin (DataStorage dataStorage, InitParams initParams) { super(initParams); dataStorage_ = dataStorage; groupSiteTemplateName = initParams.getValueParam(GROUP_SITE_TEMPLATE_NAME).getValue(); groupSiteTemplateLocation = initParams.getValueParam(GROUP_SITE_TEMPLATE_LOACTION).getValue(); } @Override
/** * {@inheritDoc} */ @Override public boolean isSkipPlatformRegistration() { String skipPLFRegister = initParams.getValueParam(SOFTWARE_REGISTRATION_SKIP).getValue(); if(skipPLFRegister==null) return false; return StringUtils.equals("true", skipPLFRegister.trim()); }
public UpgradeUserSiteLayoutPlugin (DataStorage dataStorage, InitParams initParams) { super(initParams); dataStorage_ = dataStorage; userSiteTemplateName = initParams.getValueParam(USER_SITE_TEMPLATE_NAME).getValue(); userSiteTemplateLocation = initParams.getValueParam(USER_SITE_TEMPLATE_LOACTION).getValue(); } @Override
public PingBackService(InitParams initParams, ProductInformations productInformations) { if (initParams != null) { ValueParam pingBackUrlValueParam = initParams.getValueParam("pingBackUrl"); pingBackUrl = pingBackUrlValueParam != null ? pingBackUrlValueParam.getValue() : ""; } this.productInformations = productInformations; }
public MimeTypeUploadPlugin(InitParams initParams, ConfigurationManager configurationService) throws Exception { ValueParam param = initParams.getValueParam(MIMETYPE_PATH) ; URL filePath = configurationService.getURL(param.getValue()); URLConnection connection = filePath.openConnection() ; mimeTypes.load(connection.getInputStream()) ; param = initParams.getValueParam(DEFAULT_MIMETYPE) ; if(param != null) mimetypeDefault = param.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 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 DownloadService(PortalContainerInfo pinfo, InitParams params) throws Exception { int maxSize = Integer.parseInt(params.getValueParam("download.resource.cache.size").getValue()); downloadResources_ = new Cache(maxSize); defaultResources_ = new HashMap<String, DownloadResource>(); pinfo_ = pinfo; }
public AbstractTransactionService(InitParams params) { if (params != null && params.getValueParam("timeout") != null) { this.defaultTimeout = Integer.parseInt(params.getValueParam("timeout").getValue()); this.forceTimeout = true; } else { this.defaultTimeout = DEFAULT_TIME_OUT; this.forceTimeout = false; } }
public MenuConfiguratorService(InitParams initParams, ConfigurationManager configurationManager) { this.configurationManager = configurationManager; if (initParams.containsKey("setup.navigation.file")) { setupNavigationFilePath = initParams.getValueParam("setup.navigation.file").getValue(); } else { throw new IllegalStateException("Init param 'setup.navigation.file' have to be set."); } }
String getInitParameter(String paramName) { if (initParams != null) { ValueParam param = initParams.getValueParam(paramName); return param==null ? null : substitutePortalContainerName(param.getValue()); } return filterConfig.getInitParameter(paramName); }
public CustomizeSpaceDriveListener(SpaceCustomizationService spaceCustomizationService_, InitParams params) { this.spaceCustomizationService = spaceCustomizationService_; ValueParam viewParamName = params.getValueParam(SPACE_DRIVE_VIEW); if (viewParamName != null) { viewNodeName = viewParamName.getValue(); } else { LOG.warn("No such property found: " + SPACE_DRIVE_VIEW + "\nPlease make sure to have the correct ECMS view name."); } }
public UploadService(PortalContainerInfo pinfo, InitParams params) throws Exception { String tmpDir = System.getProperty("java.io.tmpdir"); if (params == null || params.getValueParam("upload.limit.size") == null) defaultUploadLimitMB_ = new UploadLimit(0, UploadUnit.MB); // 0 means unlimited else defaultUploadLimitMB_ = new UploadLimit(Integer.parseInt(params.getValueParam("upload.limit.size").getValue()), UploadUnit.MB); uploadLocation_ = tmpDir + "/" + pinfo.getContainerName() + "/eXoUpload"; File uploadDir = new File(uploadLocation_); if (!uploadDir.exists()) uploadDir.mkdirs(); }
public ChromatticLifeCycle(InitParams params) { Map<String, String> options = new HashMap<String, String>(); PropertiesParam pp = params.getPropertiesParam("options"); if (pp != null) { options.putAll(pp.getProperties()); } this.domainName = params.getValueParam("domain-name").getValue(); this.workspaceName = params.getValueParam("workspace-name").getValue(); this.entityClassNames = params.getValuesParam("entities").getValues(); this.optionMap = options; }
public IDMQueueServiceImpl(IDMQueueDAO queueDAO, SettingService settingService, InitParams params) { this.settingService = settingService; this.queueDAO = queueDAO; if (params != null && params.containsKey(IDM_QUEUE_PROCESSING_MAX_RETRIES)) { String maxRetriesString = params.getValueParam(IDM_QUEUE_PROCESSING_MAX_RETRIES).getValue(); try { maxRetries = Integer.parseInt(maxRetriesString); } catch (NumberFormatException e) { LOG.warn("Unable to parse max retries " + maxRetriesString + ". Default value " + DEFAULT_MAX_RETRIES + " will be used", e); } } }