Ifd:addPreference

From dev.ifd-library.org

Jump to: navigation, search

API version 2

public IfdOrganization [] addPreference (
                               String concept_guid,
                               String representation_guid,
                               String session_id ) throws IfdServerException

EXPRESS heading

QUERY_FUNCTION addPreference(
                 concept_guid : STRING;
                 representation_guid : STRING ) : LIST OF IfdOrganization;


Function to add an organization to a list of organizations that preferr the given name, description or illustration for a concept. The organization is the organization to which the current user belongs.

Input:

  • concept_guid string - the guid for the concept that the name, description or illustration will be the preferred representation from the list of awailable names, descriptions or illustrations.
  • representation_guid string - the guid for the name, description or illustration that will be the preferred representation for the given concept.
  • session_id string - The session id for the active user

Returns:

  • IfdOrganization [] - An array of organisations having a preferense for the given name, desctiption or illustration for the given concept

API version 3

public IfdOrganization [] addPreference (
                               String session_id,
                               String concept_guid,
                               String representation_guid) throws IfdServerException

EXPRESS heading

QUERY_FUNCTION addPreference(
                      concept_guid : STRING;
                      representation_guid : STRING ) : LIST OF IfdOrganization;

The function adds preference of the user’s home organization to the specified representation of the target concept.

Input:

  • session_id string - The session id for the active user
  • concept_guid string -global unique id of the target concept, it shall be instantiated in the IFD population;
  • representation_guid string -global unique id of the language representation item (like name, definition, comment, etc.) of the concept to be preferred for the user’s home organization (organization where the logged user is member)

Returns:

  • IfdOrganization [] - List with fully specified organizations preferring the same input representation for the same concept.

Difference against v.2.00

  • (54) Depending of target population structure and volume it responds 2-5 times quicker then in v.2.00;
  • (55) It was a bug in v.2.00 implementation: the function could not add more then one preference to the couple organization/concept (in spite of representation type or language);
  • (56) In v.2.00 the function did not check if the specified concept guid belongs to context, so any IFD user (not only owner) could change preferences for contexts;
  • (57) In v.2.00 the function did not check if the specified representation used by the specified concept, so it was possible to assign as preferred name or description that was never in use for the target concept


Back to the API