Interface DocumentNoteType


  • public interface DocumentNoteType
    This represents a "Note Type" in the program. Users can add custom note types and modify existing ones. Essentially consists of a name, description etc and a list of DocumentNoteFields which specify the type of information that this note type represents.

    ATTENTION: Plugin writers should not implement this interface.
    Use DocumentNoteUtilities to access the DocumentNoteTypes.

    For an example of notes in use see documentation for DocumentNoteUtilities

    • Method Detail

      • getCode

        java.lang.String getCode()
        Returns:
        the unique code
      • getName

        java.lang.String getName()
        Returns:
        the user visible name
      • getDescription

        java.lang.String getDescription()
        Returns:
        a description of this note type
      • isVisible

        boolean isVisible()
        Returns:
        true if this note type is visible in the user interface, false otherwise
        See Also:
        setVisible(boolean)
      • setVisible

        void setVisible​(boolean isVisible)
        Setting this to false will mean the user can not edit the note type at all and can not add new instances of the note type through the standard "Notes" user interface. This is equivalent to deleting the note type through the user interface.
        Parameters:
        isVisible - false to have this note type not visible in the user interface. true otherwise
      • isDefaultVisibleInTable

        boolean isDefaultVisibleInTable()
        Are the fields of this note type visible in the document table by default.
        Returns:
        true if the fields of this note type are visible in the document table by default, false otherwise
      • setDefaultVisibleInTable

        void setDefaultVisibleInTable​(boolean visible)
        Set whether the fields of this note type are visible in the document table by default
        Parameters:
        visible - true if the fields of this note type should be visible in the document table by default, false otherwise
      • getFields

        java.util.List<DocumentNoteField> getFields()
        Returns:
        list of all the fields
      • setName

        void setName​(java.lang.String name)
        Parameters:
        name - to set
        See Also:
        getName()
      • setDescription

        void setDescription​(java.lang.String description)
        Parameters:
        description - to set
        See Also:
        getDescription()
      • removeField

        void removeField​(java.lang.String fieldCode)
        Remove a field.

        This method should not be performed by a user interface if DocumentNoteField.isUserModificationAllowed() is false for the field with code fieldCode
        Parameters:
        fieldCode - of field to remove
      • getModifiedDate

        long getModifiedDate()
        Get the date that this note type was last modified (eg. fields added/removed/modified on the note type - this does not include when an instance of the note is changed on a document). Used to resolve conflicts when a note type has been edited in two places (the most recently modified one is kept).
        Returns:
        the date (as defined by System.currentTimeMillis()) that this note type was last modified. Will be 0 for note types that were last modified in Geneious 4.7 or earlier.
      • isStoredInConnectedNonLocalDatbase

        boolean isStoredInConnectedNonLocalDatbase()
        If a note type is stored in a non-local database then the user should be notified when editing it because they may effect other users.
        Returns:
        true if this note type is stored in a currently connected, non-local database (eg. a Shared Database), false if the note type is stored locally only.