/** * Returns the Roo working directory for the given OSGi component context * * @param componentContext the component context (required) * @return the path of the Roo working directory * @since 1.2.0 */ public static String getRooWorkingDirectory(final ComponentContext componentContext) { return componentContext.getBundleContext().getProperty(ROO_WORKING_DIRECTORY_PROPERTY); }
protected void activate(final ComponentContext context) { iconSetUrl = context.getBundleContext().getProperty("creator.i18n.iconset.url"); if (StringUtils.isBlank(iconSetUrl)) { iconSetUrl = ICON_SET_URL; } }
protected void activate(final ComponentContext context) { this.context = context.getBundleContext(); final Thread thread = new Thread(this, "Spring Roo JLine Shell"); thread.start(); }
/** * Returns the value of -DdevelopmentMode property for the given OSGi component context * * @param componentContext the component context (required) * @return true if developmentMode has been specified as true * @since 2.0 */ public static boolean isDevelopmentMode(final ComponentContext componentContext) { String developmentMode = componentContext.getBundleContext().getProperty(ROO_DEVELOPMENT_MODE_PROPERTY); return "true".equals(developmentMode); }
protected void activate(final ComponentContext context) { final Hashtable<String, String> dict = new Hashtable<String, String>(); dict.put(URLConstants.URL_HANDLER_PROTOCOL, "httppgp"); context.getBundleContext().registerService(URLStreamHandlerService.class.getName(), this, dict); }
protected void activate(final ComponentContext context) { this.context = context.getBundleContext(); final String keyserver = context.getBundleContext().getProperty("pgp.keyserver.url"); if (StringUtils.isNotBlank(keyserver)) { defaultKeyServerUrl = keyserver; } trustDefaultKeysIfRequired(); // Seed the discovered keys database getTrustedKeys(); }
protected void activate(final ComponentContext context) { try { start(context.getBundleContext()); } catch (Exception e) { e.printStackTrace(); } }
protected void activate(final ComponentContext context) { this.context = context.getBundleContext(); this.entitiesDetails = new HashMap<JavaType, MemberDetails>(); serviceInstaceManager.activate(this.context); }
protected void activate(final ComponentContext context) { try { start(context.getBundleContext()); } catch (Exception e) { e.printStackTrace(); } }
@Activate protected void activate(final ComponentContext componentContext) { super.activate(componentContext.getBundleContext()); }
protected void activate(final ComponentContext context) { this.context = context.getBundleContext(); processManagerStatusProvider.addProcessManagerStatusListener(this); isDebug = System.getProperty("roo-args") != null && isDevelopmentMode(); }
protected void activate(final ComponentContext cContext) throws Exception { context = cContext.getBundleContext(); repositories = new ArrayList<Repository>(); installedSubsystems = new ArrayList<Subsystem>(); config = getConfigurationAdmin().getConfiguration("installedRepositories"); installedRepos = config.getProperties(); if (installedRepos == null) { installedRepos = new Hashtable(); } populateRepositories(); }
@Override protected void activate(final ComponentContext cContext) { super.activate(cContext); context = cContext.getBundleContext(); serviceInstaceManager.activate(context); }
protected void activate(final ComponentContext context) { this.context = context.getBundleContext(); if (undoManager == null) { undoManager = getUndoManager(); } undoManager.addUndoListener(this); }
/** * This service is being activated so setup it: * <ul> * <li>Create and open the {@link MetadataDependencyRegistryTracker}.</li> * </ul> */ protected void activate(final ComponentContext context) { this.registryTracker = new MetadataDependencyRegistryTracker(context.getBundleContext(), this); this.registryTracker.open(); }
/** * This service is being activated so setup it: * <ul> * <li>Create and open the {@link MetadataDependencyRegistryTracker}.</li> * </ul> */ protected void activate(final ComponentContext context) { this.registryTracker = new MetadataDependencyRegistryTracker(context.getBundleContext(), this); this.registryTracker.open(); }
protected void activate(final ComponentContext cContext) { context = cContext.getBundleContext(); serviceManager = new ServiceInstaceManager(); this.serviceManager.activate(this.context); }
protected void activate(final ComponentContext cContext) { context = cContext.getBundleContext(); final File projectDirectory = new File(StringUtils.defaultIfEmpty(OSGiUtils.getRooWorkingDirectory(cContext), FileUtils.CURRENT_DIRECTORY)); projectRootDirectory = FileUtils.getCanonicalPath(projectDirectory); }
@Activate @SuppressWarnings("unchecked") protected void activate(ComponentContext componentContext) { initDimensionMap(); modified((Map<String, Object>) componentContext.getProperties()); this.resourceBundleTracker = new ResourceBundleTracker(componentContext.getBundleContext(), this); this.resourceBundleTracker.open(); }
@Override protected void activate(final ComponentContext cContext) { super.activate(cContext); this.context = cContext.getBundleContext(); populatePaths(getRoot()); }