public final class BiasedLockingRevocationRule extends java.lang.Object implements IRule
Modifier and Type | Field and Description |
---|---|
private static java.util.List<TypedPreference<?>> |
CONFIG_ATTRIBUTES |
private static TypedPreference<java.lang.String> |
FILTERED_CLASSES |
static TypedPreference<IQuantity> |
MAX_NUMBER_OF_CLASSES_TO_REPORT |
static TypedPreference<IQuantity> |
WARNING_LIMIT |
Constructor and Description |
---|
BiasedLockingRevocationRule() |
Modifier and Type | Method and Description |
---|---|
private int |
calculateRevocationCountScore(java.util.List<ClassEntry> offendingClasses) |
java.util.concurrent.RunnableFuture<Result> |
evaluate(IItemCollection items,
IPreferenceValueProvider valueProvider)
Gets a future representing the result of the evaluation of this rule.
|
private java.util.Map<IMCType,ClassEntry> |
extractRevocations(IItemCollection revokationEvents,
IItemFilter filter,
IAttribute<IMCType> classAttribute) |
private java.util.Set<IMCType> |
filter(java.util.Set<java.lang.String> filteredTypes,
java.util.Set<IMCType> types) |
private java.util.List<ClassEntry> |
filteredMerge(java.util.Set<java.lang.String> filteredTypes,
java.util.Set<IMCType> revokedTypes,
java.util.Map<IMCType,ClassEntry> offendingClassRevocations,
java.util.Map<IMCType,ClassEntry> offendingRevocations) |
java.util.Collection<TypedPreference<?>> |
getConfigurationAttributes()
Gets information about which attributes may be configured during rule evaluation.
|
private static java.util.Set<java.lang.String> |
getFilteredTypes(java.lang.String preferenceValue) |
java.lang.String |
getId() |
java.lang.String |
getName() |
private Result |
getResult(IItemCollection items,
IPreferenceValueProvider valueProvider) |
java.lang.String |
getTopic() |
private static void |
putIfNotInFiltered(java.util.Set<java.lang.String> filteredTypes,
java.util.Set<IMCType> revokedTypes,
java.util.Map<IMCType,ClassEntry> merged,
java.util.Map.Entry<IMCType,ClassEntry> entry) |
public static final TypedPreference<IQuantity> WARNING_LIMIT
public static final TypedPreference<IQuantity> MAX_NUMBER_OF_CLASSES_TO_REPORT
private static final TypedPreference<java.lang.String> FILTERED_CLASSES
private static final java.util.List<TypedPreference<?>> CONFIG_ATTRIBUTES
private Result getResult(IItemCollection items, IPreferenceValueProvider valueProvider)
private int calculateRevocationCountScore(java.util.List<ClassEntry> offendingClasses)
private java.util.List<ClassEntry> filteredMerge(java.util.Set<java.lang.String> filteredTypes, java.util.Set<IMCType> revokedTypes, java.util.Map<IMCType,ClassEntry> offendingClassRevocations, java.util.Map<IMCType,ClassEntry> offendingRevocations)
filteredTypes
- user filtered typesrevokedTypes
- the types that were revoked during this recording.offendingClassRevocations
- offendingRevocations
- private static void putIfNotInFiltered(java.util.Set<java.lang.String> filteredTypes, java.util.Set<IMCType> revokedTypes, java.util.Map<IMCType,ClassEntry> merged, java.util.Map.Entry<IMCType,ClassEntry> entry)
private java.util.Map<IMCType,ClassEntry> extractRevocations(IItemCollection revokationEvents, IItemFilter filter, IAttribute<IMCType> classAttribute)
private java.util.Set<IMCType> filter(java.util.Set<java.lang.String> filteredTypes, java.util.Set<IMCType> types)
private static java.util.Set<java.lang.String> getFilteredTypes(java.lang.String preferenceValue)
public java.util.concurrent.RunnableFuture<Result> evaluate(IItemCollection items, IPreferenceValueProvider valueProvider)
IRule
evaluate
in interface IRule
items
- items to evaluatevalueProvider
- Provider of configuration values used for evaluation. The attributes that will be
asked for from the provider should be provided by
IRule.getConfigurationAttributes()
.public java.util.Collection<TypedPreference<?>> getConfigurationAttributes()
IRule
getConfigurationAttributes
in interface IRule
public java.lang.String getId()
public java.lang.String getName()