Interface NFEAttributeConstraint

  • All Known Implementing Classes:
    NFEBasicAttributeConstraint

    public interface NFEAttributeConstraint
    Represents a constraint for an attribute definition. It can specify the attribute default value and whether the attribute is writable or not.
    • Method Detail

      • getId

        long getId()
        Gets the constraint ID
        Returns:
        the constraint ID
      • setId

        void setId​(long id)
        Sets the constraint ID
        Parameters:
        id - the constraint ID
      • setAttributeDescriptor

        void setAttributeDescriptor​(NFEAttributeDescriptor attrDescriptor)
        Sets the attribute descriptor where the constraint is enforced
        Parameters:
        attrDescriptor - an attribute descriptor instance
      • getAttributeDescriptor

        NFEAttributeDescriptor getAttributeDescriptor()
        Gets the attribute descriptor where the constraint is enforced
        Returns:
        an attribute descriptor instance
      • setDefaultValue

        void setDefaultValue​(java.lang.Object defaultValue)
        Sets the value the attribute must contain when it is created
        Parameters:
        defaultValue - an attribute default value. The type should match the type specified by the constraint's attribute descriptor
      • getDefaultValue

        java.lang.Object getDefaultValue()
        Gets the value the attribute must contain when it is created
        Returns:
        the attribute default value
      • setReadOnly

        void setReadOnly​(boolean readOnly)
        Sets whether the attribute is writable or read-only
        Parameters:
        readOnly - true if the attribute is read-only
      • isReadOnly

        boolean isReadOnly()
        Gets whether the attribute is writable or read-only
        Returns:
        true if the attribute is read-only
      • setVisible

        void setVisible​(boolean visible)
        Sets whether the attribute is visible or not. It is used with graphical editors.
        Parameters:
        visible - true for visible
      • isVisible

        boolean isVisible()
        Tells whether the attribute is visible or not. It is used with graphical editors.
        Returns:
        true for visible