org.osgi.service.component.annotations.ReferencePolicyOption Java Examples
The following examples show how to use
org.osgi.service.component.annotations.ReferencePolicyOption.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PoCodeElementService.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) public void setCodeElementServiceContribution(ICodeElementServiceContribution contribution){ ICodeElementServiceContribution previous = contributions.put(contribution.getSystem(), contribution); if (previous != null) { LoggerFactory.getLogger(getClass()) .warn("Possible ICodeElementServiceContribution collision previous [" + previous + "] new [" + contribution + "]"); } }
Example #2
Source File: ValueSetService.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.STATIC, policyOption = ReferencePolicyOption.GREEDY) public synchronized void bindContribution(IValueSetContribution contribution){ if (contribution.getValueSetIds() != null && !contribution.getValueSetIds().isEmpty()) { addContribution(contribution); } else { getLogger().warn( "Contribution " + contribution + " returns no value set ids. It will be ignored."); } }
Example #3
Source File: CodingService.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.STATIC, policyOption = ReferencePolicyOption.GREEDY) public synchronized void bindFhirTransformer(ICodingContribution contribution){ if (contributions == null) { contributions = new ArrayList<ICodingContribution>(); } if(contribution.getCodeSystem() != null && !contribution.getCodeSystem().isEmpty()) { contributions.add(contribution); if (contribution instanceof ILocalCodingContribution) { localCoding = (ILocalCodingContribution) contribution; } } else { getLogger().warn( "Contribution " + contribution + " returns no code system. It will be ignored."); } }
Example #4
Source File: CodeElementService.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) public void setCodeElementServiceContribution(ICodeElementServiceContribution contribution){ ICodeElementServiceContribution previous = contributions.put(contribution.getSystem(), contribution); if (previous != null) { LoggerFactory.getLogger(getClass()) .warn("Possible ICodeElementServiceContribution collision previous [" + previous + "] new [" + contribution + "]"); } }
Example #5
Source File: ReferenceDataImporterService.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) public void setReferenceDataImporter(IReferenceDataImporter referenceDataImporter, Map<String, Object> properties){ IReferenceDataImporter previous = importersMap.put((String) properties.get(IReferenceDataImporter.REFERENCEDATAID), referenceDataImporter); if (previous != null) { LoggerFactory.getLogger(getClass()) .warn("Possible IReferenceDataImporter collision previous [" + previous + "] new [" + referenceDataImporter + "]"); } }
Example #6
Source File: SerialPortRegistry.java From openhab-core with Eclipse Public License 2.0 | 5 votes |
/** * Registers a {@link SerialPortProvider}. * * @param creator */ @Reference(cardinality = ReferenceCardinality.AT_LEAST_ONE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) protected void registerSerialPortCreator(SerialPortProvider creator) { synchronized (portCreators) { portCreators.add(creator); } }
Example #7
Source File: SerialPortRegistry.java From smarthome with Eclipse Public License 2.0 | 5 votes |
/** * Registers a {@link SerialPortProvider}. * * @param creator */ @Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) protected void registerSerialPortCreator(SerialPortProvider creator) { synchronized (this.portCreators) { this.portCreators.add(creator); } }
Example #8
Source File: WrapperMetricsServlet.java From sling-whiteboard with Apache License 2.0 | 5 votes |
@Reference(service = MetricRegistry.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) void bindMetricRegistry(MetricRegistry metricRegistry, Map<String, Object> properties) { log.info("Binding Metrics Registry..."); String name = registryName(metricRegistry, properties); CopyMetricRegistryListener listener = new CopyMetricRegistryListener(this.metrics, metricRegistry, name); listener.start(); childRegistries.put(metricRegistry, listener); log.info("Bound Metrics Registry {} ", name); }
Example #9
Source File: ContextServiceHolder.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policyOption = ReferencePolicyOption.GREEDY) public void setContextService(IContextService contextService){ ContextServiceHolder.contextService = contextService; }
Example #10
Source File: ContextServiceHolder.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policyOption = ReferencePolicyOption.GREEDY) public void setContextService(IContextService contextService){ ContextServiceHolder.contextService = contextService; }
Example #11
Source File: MigratorService.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) public void setMigratorContribution(IMigratorContribution contribution){ if(!contributions.contains(contribution)) { contributions.add(contribution); } }
Example #12
Source File: StoreToStringService.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) public synchronized void setCodeElementServiceContribution( IStoreToStringContribution contribution){ contributions.add(contribution); }
Example #13
Source File: StockCommissioningSystemDriverFactories.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) public void bind(ICommissioningSystemDriverFactory driverFactory){ log.debug("Binding " + driverFactory.getClass().getName()); driverFactories.put(driverFactory.getIdentification(), driverFactory); }
Example #14
Source File: MessageService.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) public void setMessageTransporter(IMessageTransporter messageTransporter){ if (!messageTransporters.containsKey(messageTransporter.getUriScheme())) { messageTransporters.put(messageTransporter.getUriScheme(), messageTransporter); } }
Example #15
Source File: BillingService.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) public void setBillableAdjuster(IBillableAdjuster adjuster){ if (!billableAdjusters.contains(adjuster)) { billableAdjusters.add(adjuster); } }
Example #16
Source File: BillingService.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) public void setBilledAdjuster(IBilledAdjuster adjuster){ if (!billedAdjusters.contains(adjuster)) { billedAdjusters.add(adjuster); } }
Example #17
Source File: FhirTransformersHolder.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.AT_LEAST_ONE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) public synchronized void bindFhirTransformer(IFhirTransformer<?, ?> transformer){ transformers.add(transformer); }
Example #18
Source File: ExplorableDatasetRest.java From mobi with GNU Affero General Public License v3.0 | 4 votes |
@Reference(policyOption = ReferencePolicyOption.GREEDY) public void setOntologyManager(OntologyManager ontologyManager) { this.ontologyManager = ontologyManager; }
Example #19
Source File: OntologyImportServiceImpl.java From mobi with GNU Affero General Public License v3.0 | 4 votes |
@Reference(policyOption = ReferencePolicyOption.GREEDY) void setOntologyManager(OntologyManager ontologyManager) { this.ontologyManager = ontologyManager; }
Example #20
Source File: SimpleOntologyRecordService.java From mobi with GNU Affero General Public License v3.0 | 4 votes |
@Reference(policyOption = ReferencePolicyOption.GREEDY) void setOntologyManager(OntologyManager ontologyManager) { this.ontologyManager = ontologyManager; }
Example #21
Source File: OntologyRecordVersioningService.java From mobi with GNU Affero General Public License v3.0 | 4 votes |
@Reference(policyOption = ReferencePolicyOption.GREEDY) protected void setOntologyManager(OntologyManager ontologyManager) { this.ontologyManager = ontologyManager; }
Example #22
Source File: DelimitedConverterImpl.java From mobi with GNU Affero General Public License v3.0 | 4 votes |
@Reference(policyOption = ReferencePolicyOption.GREEDY) public void setOntologyManager(OntologyManager ontologyManager) { this.ontologyManager = ontologyManager; }
Example #23
Source File: OntologyRest.java From mobi with GNU Affero General Public License v3.0 | 4 votes |
@Reference(policyOption = ReferencePolicyOption.GREEDY) void setOntologyManager(OntologyManager ontologyManager) { this.ontologyManager = ontologyManager; }
Example #24
Source File: OntologyRepositoryCacheFactory.java From mobi with GNU Affero General Public License v3.0 | 4 votes |
@Reference(policyOption = ReferencePolicyOption.GREEDY) void setOntologyManager(OntologyManager ontologyManager) { this.ontologyManager = ontologyManager; }
Example #25
Source File: TransformationManagerImpl.java From sling-whiteboard with Apache License 2.0 | 4 votes |
@Reference(service = TransformationStep.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) void bindTransformationStep(Map<String, Object> properties, TransformationStep step) { mapping.put(properties, step); }