Interface NewContributionIndicator
-
public interface NewContributionIndicator
This interface allows indicating if a contribution is considered as a new one.Using directly the supplied methods:
- Author:
- silveryocha
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isNew(Instant lastUpdateInstant)
Is this contribution a new one?static boolean
isNewContribution(Contribution contribution)
Is the given contribution a new one?static boolean
isNewContribution(ContributionIdentifier cId, Instant lastUpdateInstant)
Is the given contribution reference a new one?Pair<String,String>
relatedToComponentAndResourceType()
Indicates the name of component and the type of resource the indicator is related to.
-
-
-
Method Detail
-
isNewContribution
static boolean isNewContribution(Contribution contribution)
Is the given contribution a new one?
-
isNewContribution
static boolean isNewContribution(ContributionIdentifier cId, Instant lastUpdateInstant)
Is the given contribution reference a new one?- Parameters:
cId
- aContributionIdentifier
instance aiming the contribution.lastUpdateInstant
- the last update instant of the contribution.- Returns:
- the value returned by
isNew(Instant)
implementation if any, false if no implementation has been found. - See Also:
isNew(Instant)
-
relatedToComponentAndResourceType
Pair<String,String> relatedToComponentAndResourceType()
Indicates the name of component and the type of resource the indicator is related to.- Returns:
- name of component.
-
isNew
boolean isNew(Instant lastUpdateInstant)
Is this contribution a new one? A contribution is considered as a new one when it was created or updated before a given amount of day.- Parameters:
lastUpdateInstant
- the last update instant of the contribution.- Returns:
- true of this contribution was created or updated recently. False otherwise
-
-