Refine search
protected void activate(ComponentContext cCtx) { maxLabelingIterations = (Integer) cCtx.getProperties(). get(MAX_LABELING_ITERATIONS); logger.info("StableSerializerProvider activated"); }
@Activate public void activate(ComponentContext context) { this.path = (String) context.getProperties().get(ReasoningService.SERVICE_PATH); } }
protected void activate(ComponentContext context) throws Exception { final String[] patternStrings = (String[]) context.getProperties(). get("agent-pattern"); patterns = new Pattern[patternStrings.length]; for (int i = 0; i < patternStrings.length; i++) { patterns[i] = Pattern.compile(patternStrings[i]); } }
@Activate public void activate(ComponentContext context) { this.path = (String) context.getProperties().get(ReasoningService.SERVICE_PATH); } }
/** Return the path at which to mount this servlet, or null * if it must not be mounted. */ private String getServletPath(ComponentContext ctx) { final Dictionary<?, ?> config = ctx.getProperties(); String result = (String)config.get(SERVLET_PATH_NAME); if(result != null && result.trim().length() == 0) { result = null; } return result; }
protected static String lookup(ComponentContext context, String property) { //Prefer property from BundleContext first if (context.getBundleContext().getProperty(property) != null) { return context.getBundleContext().getProperty(property); } if (context.getProperties().get(property) != null) { return context.getProperties().get(property).toString(); } return null; }
protected static String lookup(ComponentContext context, String property) { //Prefer property from BundleContext first if (context.getBundleContext().getProperty(property) != null) { return context.getBundleContext().getProperty(property); } if (context.getProperties().get(property) != null) { return context.getProperties().get(property).toString(); } return null; } }
private static String lookup(ComponentContext context, String property) { // Prefer property from BundleContext first if (context.getBundleContext().getProperty(property) != null) { return context.getBundleContext().getProperty(property); } if (context.getProperties().get(property) != null) { return context.getProperties().get(property).toString(); } return null; }
protected static String lookup(ComponentContext context, String property) { //Prefer property from BundleContext first if (context.getBundleContext().getProperty(property) != null) { return context.getBundleContext().getProperty(property); } if (context.getProperties().get(property) != null) { return context.getProperties().get(property).toString(); } return null; } }
private static String lookup(ComponentContext context, String property) { // Prefer property from BundleContext first if (context.getBundleContext().getProperty(property) != null) { return context.getBundleContext().getProperty(property); } if (context.getProperties().get(property) != null) { return context.getProperties().get(property).toString(); } return null; }
private static String readDirectory(ComponentContext context) { if (context.getProperties().get(HOME_DIR) != null) { return context.getProperties().get(HOME_DIR).toString(); } if (context.getBundleContext().getProperty(HOME_DIR) != null) { return context.getBundleContext().getProperty(HOME_DIR).toString(); } return null; }
@Activate public void activate(ComponentContext context) { Dictionary<String, Object> properties = context.getProperties(); Enumeration<String> keys = properties.keys(); while (keys.hasMoreElements()) { String key = keys.nextElement(); System.out.println(key + " = " + properties.get(key)); } }
@Activate protected void activate(ComponentContext componentContext) throws Exception { solrHome = String.valueOf(componentContext.getProperties().get(SOLR_HOME_PATH)); File file = new File(solrHome); if (!file.exists()) { assert file.createNewFile(); } solrCoreName = String.valueOf(componentContext.getProperties().get(SOLR_CORE_NAME)); solrServerConfiguration = new EmbeddedSolrServerConfiguration(solrHome, solrCoreName); }
@Activate protected void activate(ComponentContext ctx) { expression = PropertiesUtil.toString(ctx.getProperties().get(PROP_EXPRESSION), ""); languageExtension = PropertiesUtil.toString(ctx.getProperties().get(PROP_LANGUAGE_EXTENSION), DEFAULT_LANGUAGE_EXTENSION); log.debug("Activated scriptable health check name={}, languageExtension={}, expression={}", new Object[] {ctx.getProperties().get(HealthCheck.NAME), languageExtension, expression}); }
@Activate protected final void activate(final ComponentContext context) { final Dictionary<?, ?> properties = context.getProperties(); this.styleString = PropertiesUtil.toString(properties.get(PROPERTY_CSS_STYLE), CSS_STYLE_DEFAULT); }
/** * Looks a property up by name in a component context. Returns {@code null} * if the property is not found or if the property is found but it is an * empty string. * * @param context Component context. * @param name Name of the property. * @return The property value serialized as a string, or {@code null}. */ public static String lookup(ComponentContext context, String name) { return asString(checkNotNull(context).getProperties().get(checkNotNull(name))); }
protected void activate(ComponentContext ctx) { invalidNodeType = checkNotNull(PropertiesUtil.toString(ctx.getProperties().get(INVALID_NODE_TYPE), null), INVALID_NODE_TYPE); errorLabel = checkNotNull(PropertiesUtil.toString(ctx.getProperties().get(ERROR_LABEL), null), ERROR_LABEL); excludedNodeTypes = ImmutableSet.copyOf(PropertiesUtil.toStringArray(ctx.getProperties().get(EXCLUDED_NODE_TYPES), new String[0])); }
@Activate protected void activate(ComponentContext ctx) { configuredIndexEngines = ((String) ctx.getProperties().get("indexEngines")).split(","); sortIndexEngines(); }
/** * Looks a property up by name in a component context. Returns {@code null} * if the property is not found or if the property is found but it is an * empty string. * * @param context Component context. * @param name Name of the property. * @return The property value serialized as a string, or {@code null}. */ public static String lookup(ComponentContext context, String name) { return asString(checkNotNull(context).getProperties().get(checkNotNull(name))); }
protected void activate(final ComponentContext componentContext) { weight = (Integer) componentContext.getProperties().get("weight"); dataFile = componentContext.getBundleContext(). getDataFile("data"); }