Package org.silverpeas.core.calendar
Class CalendarContributionLocator
- java.lang.Object
-
- org.silverpeas.core.calendar.CalendarContributionLocator
-
- All Implemented Interfaces:
ContributionLocatorByLocalIdAndType
@Named public class CalendarContributionLocator extends Object implements ContributionLocatorByLocalIdAndType
This is an implementation ofContributionLocatorByLocalIdAndType
which is able to locateContribution
of following types:- Author:
- silveryocha
-
-
Constructor Summary
Constructors Constructor Description CalendarContributionLocator()
-
Method Summary
All Methods Instance Methods Concrete 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
public boolean isContributionLocatorOfType(String type)
Description copied from interface:ContributionLocatorByLocalIdAndType
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.
- Specified by:
isContributionLocatorOfType
in interfaceContributionLocatorByLocalIdAndType
- Parameters:
type
- a contribution type.- Returns:
- true if implementation is able to locate a contribution of the given type, false otherwise.
-
getContributionIdentifierFromLocalIdAndType
public Optional<ContributionIdentifier> getContributionIdentifierFromLocalIdAndType(String localId, String type)
Description copied from interface:ContributionLocatorByLocalIdAndType
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).- Specified by:
getContributionIdentifierFromLocalIdAndType
in interfaceContributionLocatorByLocalIdAndType
- Parameters:
localId
- a local identifier.type
- a type of contribution.- Returns:
- the optional full
ContributionIdentifier
.
-
-