Package com.github.dynamicextensionsalfresco.controlpanel.template

Examples of com.github.dynamicextensionsalfresco.controlpanel.template.TemplateServiceReference


  }

  @Uri(method = HttpMethod.GET, value = "/services/bundle/{bundleid}/{serviceIndex}")
  public Map<String, Object> service(@UriVariable final long bundleid, @UriVariable int serviceIndex) {
        final List<TemplateBundle> servicesByBundle = getTemplateServicesByBundle();
        TemplateServiceReference serviceReferences = null;
        for (TemplateBundle templateBundle : servicesByBundle) {
            if (templateBundle.getBundleId() == bundleid) {
                serviceReferences = templateBundle.getServices().get(serviceIndex);
                break;
            }
        }
        final Object context;
        if (serviceReferences != null) {
            @SuppressWarnings("unchecked")
            final ServiceReference<Object> serviceReference = serviceReferences.getServiceReference();
            context = bundleHelper.getBundle(bundleid).getBundleContext().getService(serviceReference);
            if (context instanceof ApplicationContext) {
                ApplicationContext applicationContext = (ApplicationContext)context;
                final String[] definitionNames = applicationContext.getBeanDefinitionNames();
                final Map<String,String> beans = new HashMap<String, String>(definitionNames.length);
View Full Code Here

TOP

Related Classes of com.github.dynamicextensionsalfresco.controlpanel.template.TemplateServiceReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.