Interface ContributionLocatorByLocalIdAndType
-
- All Known Implementing Classes:
CalendarContributionLocator
public interface ContributionLocatorByLocalIdAndType
This interface defines the locator of
Contribution
instances which must be implemented by services providing contributions.From a local identifier and a type, the system asks to the several
ContributionLocatorByLocalIdAndType
implements the related fullContributionIdentifier
.
ThsContributionIdentifier
permits to useApplicationService
service to retrieve some contributions.- Author:
- silveryocha
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<ContributionIdentifier>
getContributionIdentifierFromLocalIdAndType(String localId, String type)
Gets the fullContributionIdentifier
of aContribution
from a local identifier and a type.boolean
isContributionLocatorOfType(String type)
Indicates if the implementation is able to locate a contribution of the given type.
-
-
-
Method Detail
-
isContributionLocatorOfType
boolean isContributionLocatorOfType(String type)
Indicates if the implementation is able to locate a contribution of the given type.
The main interest of this method is to increase the performance into mechanism of locating.
- Parameters:
type
- a contribution type.- Returns:
- true if implementation is able to locate a contribution of the given type, false otherwise.
-
getContributionIdentifierFromLocalIdAndType
Optional<ContributionIdentifier> getContributionIdentifierFromLocalIdAndType(String localId, String type)
Gets the full
ContributionIdentifier
of aContribution
from a local identifier and a type.A local identifier is an identifier which is unique into the context of a component.
In a higher scope level, application level so, there is no guarantee that the local identifier could be unique.
That is why the type is a mandatory data for the contribution location search. Indeed, a local id could not be unique at application level, but a couple localId / type has to (publication services for example).- Parameters:
localId
- a local identifier.type
- a type of contribution.- Returns:
- the optional full
ContributionIdentifier
.
-
-