Class VMOperationRule

  • All Implemented Interfaces:
    IRule

    public class VMOperationRule
    extends java.lang.Object
    implements IRule
    • Constructor Detail

      • VMOperationRule

        public VMOperationRule()
    • Method Detail

      • evaluate

        public java.util.concurrent.RunnableFuture<Result> evaluate​(IItemCollection items,
                                                                    IPreferenceValueProvider vp)
        Description copied from interface: IRule
        Gets a future representing the result of the evaluation of this rule. Running the RunnableFuture is the responsibility of the caller of this method, not the implementation.
        Specified by:
        evaluate in interface IRule
        Parameters:
        items - items to evaluate
        vp - Provider of configuration values used for evaluation. The attributes that will be asked for from the provider should be provided by IRule.getConfigurationAttributes().
        Returns:
        a RunnableFuture that when run will return the evaluation result
      • findLongestEventInfo

        private void findLongestEventInfo​(IItemCollection items)
      • sortEventsByStartTime

        private java.util.List<IItem> sortEventsByStartTime​(IItemCollection items)
      • getOperation

        private java.lang.String getOperation​(IItem event)
      • getConfigurationAttributes

        public java.util.Collection<TypedPreference<?>> getConfigurationAttributes()
        Description copied from interface: IRule
        Gets information about which attributes may be configured during rule evaluation.
        Specified by:
        getConfigurationAttributes in interface IRule
        Returns:
        a list of configuration attributes
      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface IRule
        Returns:
        a unique id for this rule implementation
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface IRule
        Returns:
        a human readable name for this rule
      • getTopic

        public java.lang.String getTopic()
        Specified by:
        getTopic in interface IRule
        Returns:
        the topic for this rule, may be null