Class Portfolio.FieldType

  • All Implemented Interfaces:
    Cloneable
    Enclosing class:
    Portfolio

    public static class Portfolio.FieldType
    extends Object
    The FieldType class determines which properties of an EmbeddedFile are presented in the user-interface. For example, when presenting a collection of emails, it would be more useful to present columns as "To", "From", "Subject", "Date" and so on rather than the columns normally associated with file size.
    See Also:
    Portfolio.getSchema(), EmbeddedFile.getProperties()
    • Method Detail

      • setName

        public void setName​(String name)
        Set the name of the field as it appears in the user-interface
        Parameters:
        name - the name, which must not be null or empty.
      • getColumnSort

        public int getColumnSort()
        Return a value which can be used to determine which order the fields will be presented in the user-interface. A value of 0 means unset
      • setColumnSort

        public void setColumnSort​(int sort)
        Set a value which can be used to determine which order the fields will be presented in the user-interface. A value of 0 means unset
        Parameters:
        sort - the sort order, or 0 for unset
      • setHidden

        public void setHidden​(boolean hidden)
        Set whether this column is to be hidden in the user-interface by default
        Parameters:
        hidden - if the column is hidden
      • isHidden

        public boolean isHidden()
        Return the hidden flag as set by setHidden(boolean)
      • setEditable

        public void setEditable​(boolean editable)
        Set whether this property should be editable in the user-interface
        Parameters:
        editable - the editabilty
      • isEditable

        public boolean isEditable()
        Return the editability flag as set by setEditable(boolean)
      • toString

        public String toString()
      • getValue

        public Object getValue​(EmbeddedFile ef,
                               String key)
        Return the value matching this type from the specified EmbeddedFile.
        Parameters:
        ef - the EmbeddedFile to query
        key - the key against which this FieldType is stored in the schema map
      • putLiteral

        public void putLiteral​(String key,
                               String tokens)
        Put a literal token sequnce. For debugging
        Parameters:
        key - the key
        tokens - the token sequence, eg "true" or "/foo" or "[/Foo/Bar]". No refs, just direct objects.