/** * Computes the default service properties to publish : * factory.name, service.pid, component.providedServiceSpecification, component.properties, component.description, factory.State. * * @return : the dictionary of properties to publish. */ public Dictionary<String, Object> getPropertiesToPublish() { Hashtable<String, Object> props = new Hashtable<String, Object>(); props.put("factory.name", m_factory.getName()); props.put(Constants.SERVICE_PID, m_factory.getName()); // Service PID is required for the integration in the configuration admin. // Add the version if set String v = getVersion(); if (v != null) { props.put(Factory.FACTORY_VERSION_PROPERTY, v); } props.put("component.providedServiceSpecifications", m_providedServiceSpecification); props.put("component.properties", m_properties); props.put("component.description", this); // add every immutable property for (PropertyDescription m_property : m_properties) { if (m_property.isImmutable() && m_property.getValue() != null) { props.put(m_property.getName(), m_property.getObjectValue(m_factory.getBundleContext())); } } // Add factory state props.put("factory.state", m_factory.getState()); return props; }
/** * Computes the default service properties to publish : * factory.name, service.pid, component.providedServiceSpecification, component.properties, component.description, factory.State. * * @return : the dictionary of properties to publish. */ public Dictionary<String, Object> getPropertiesToPublish() { Hashtable<String, Object> props = new Hashtable<String, Object>(); props.put("factory.name", m_factory.getName()); props.put(Constants.SERVICE_PID, m_factory.getName()); // Service PID is required for the integration in the configuration admin. // Add the version if set String v = getVersion(); if (v != null) { props.put(Factory.FACTORY_VERSION_PROPERTY, v); } props.put("component.providedServiceSpecifications", m_providedServiceSpecification); props.put("component.properties", m_properties); props.put("component.description", this); // add every immutable property for (PropertyDescription m_property : m_properties) { if (m_property.isImmutable() && m_property.getValue() != null) { props.put(m_property.getName(), m_property.getObjectValue(m_factory.getBundleContext())); } } // Add factory state props.put("factory.state", m_factory.getState()); return props; }