Skip to content

Commit

Permalink
LPS-62369 This needs to be greedy to avoid issues with the startup or…
Browse files Browse the repository at this point in the history
…der of the modules
  • Loading branch information
Sergio Gonzalez authored and brianchandotcom committed Jan 26, 2016
1 parent 3670bfb commit 604ce75
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -35,6 +35,8 @@
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;

/**
* @author Roberto Díaz
Expand Down Expand Up @@ -97,11 +99,19 @@ public String getItemSelectorURL(
return itemSelectorURL.toString();
}

@Reference(cardinality = ReferenceCardinality.OPTIONAL, unbind = "-")
@Reference(
cardinality = ReferenceCardinality.OPTIONAL,
policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY
)
public void setItemSelector(ItemSelector itemSelector) {
_itemSelector = itemSelector;
}

public void unsetItemSelector(ItemSelector itemSelector) {
_itemSelector = null;
}

private ItemSelector _itemSelector;

}

0 comments on commit 604ce75

Please sign in to comment.