Class EFileNotification.Builder

    • Method Detail

      • validate

        protected Validator validate​(Validator problems)
        Description copied from class: EMessage.Builder
        Checks if message subject and message type are configured. If not, then text explaining this error is appended to problems.

        This method should be overridden by subclass message builders and called before doing its own validation. The first line in the subclass validate implementation should be super.validate(problems);.

        When overriding this method, be sure to add all discovered validation problems to the list. The validation method should consist of a series of individual if statements and not an if/else if chain. That way all problems are found and not just the first one.

        Please see Validator for a validation Builder settings example.

        Overrides:
        validate in class EMessage.Builder<EFileNotification,​EFileNotification.Builder>
        Parameters:
        problems - used to check field validity and collect discovered invalid fields.
        Returns:
        problems to allow for method chaining.
        See Also:
        Validator
      • file

        public EFileNotification.Builder file​(java.io.File file)
        Sets the file associated with the notification.
        Parameters:
        file - notification applies to this file.
        Returns:
        this Builder
        Throws:
        java.lang.NullPointerException - if file is null.
      • lastModified

        public EFileNotification.Builder lastModified​(long timestamp)
        Sets the event timestamp.
        Parameters:
        timestamp - event timestamp.
        Returns:
        this Builder.
      • length

        public EFileNotification.Builder length​(long length)
        Sets the file length.
        Parameters:
        length - file length.
        Returns:
        this Builder.