Class PublicationsPickerField

    • Constructor Detail

      • PublicationsPickerField

        public PublicationsPickerField()
    • Method Detail

      • getTypeName

        public String getTypeName()
        Returns the type name.
        Returns:
        the name of this field type.
      • getRawResouceReferences

        public String getRawResouceReferences()
        Returns the publications referenced by this field (as defined by ContributionIdentifier.ABSOLUTE_ID_FORMAT)
      • setRawResouceReferences

        public void setRawResouceReferences​(String rawResouceReferences)
        Set the node id referenced by this field.
      • isReadOnly

        public boolean isReadOnly()
        Returns true if the value is read only.
      • getValue

        public String getValue()
        Returns the string value of this field : aka the node path.
        Returns:
        the value of this field.
      • getValue

        public String getValue​(String language)
        Returns the local value of this field. There is no local format for a user field, so the language parameter is unused.
        Parameters:
        language - the ISO-631 code of a supported language.
        Returns:
        the value in the specified language.
      • getValueAsText

        public String getValueAsText​(String language)
      • setValue

        public void setValue​(String value)
                      throws FormException
        Description copied from interface: Field
        Sets the specified normalized value.
        Parameters:
        value - the normalized value to set.
        Throws:
        FormException - when the field is readOnly or when the value format is wrong.
      • setValue

        public void setValue​(String value,
                             String language)
                      throws FormException
        Description copied from interface: Field
        Sets the specified textual value in the given language.
        Parameters:
        value - a textual value.
        language - the ISO-631 code of a supported language.
        Throws:
        FormException - when the field is readOnly or if the value isn't a text.
      • acceptValue

        public boolean acceptValue​(String value)
        Always returns false since a user reference can't be computed from a user name.
        Returns:
        true if the value format is correct and this field isn't read only. False otherwise.
      • acceptValue

        public boolean acceptValue​(String value,
                                   String language)
        Always returns false since a user reference can't be computed from a user name.
        Parameters:
        value - a textual value.
        language - the ISO-631 code of a supported language.
        Returns:
        true if the local value isn't ill formed and this field isn't read only.
      • getObjectValue

        public Object getObjectValue()
        Returns the User referenced by this field.
        Returns:
        an object representing the value of this field.
      • setObjectValue

        public void setObjectValue​(Object value)
                            throws FormException
        Set node referenced by this field.
        Parameters:
        value - an Object representing the value to set.
        Throws:
        FormException - when the field is readOnly or when the value has a wrong type.
      • acceptObjectValue

        public boolean acceptObjectValue​(Object value)
        Returns true if the value is a String and this field isn't read only.
        Parameters:
        value - a value
        Returns:
        true if the value hasn't a wrong type and this field isn't read only.
      • getStringValue

        public String getStringValue()
        Returns this field value as a normalized String
        Returns:
        the String representation of the value of this field.
      • setStringValue

        public void setStringValue​(String value)
        Set this field value from a normalized String
        Parameters:
        value - the String value to set
      • acceptStringValue

        public boolean acceptStringValue​(String value)
        Returns true if this field isn't read only.
        Parameters:
        value - a String value.
        Returns:
        true if the value isn't normalized and this field isn't read only.
      • isNull

        public boolean isNull()
        Returns true if this field is not set.
        Returns:
        true if this field is not set. False otherwise.
      • setNull

        public void setNull()
                     throws FormException
        Set to null this field.
        Throws:
        FormException - when the field is mandatory or when the field is read only.
      • getNbPublications

        public int getNbPublications()
      • equals

        public boolean equals​(Object o)
        Tests equality between this field and the specified field.
        Overrides:
        equals in class Object
      • compareTo

        public int compareTo​(Field o)
        Compares this field with the specified field.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object