Ifd:updateContext

From dev.ifd-library.org

Jump to: navigation, search

API version 2

Function public IfdContext updateContext (
                                 IfdContext  context,
                                 String session_id) session_id
         throws IfdServerException

Function to update a context. Everything except the global unique identifier may be updated.

Input:

  • IfdContext context The new changed context.
  • String session_id) session_id The session id of the active user.

Returns: The updated context.

API version 3

Function public IfdContext updateContext (
                                 String session_id,
                                 IfdContext  theContext)
                     throws IfdServerException

EXPRESS Heading

QUERY FUNCTION updateContext(
                      theContext	: IfdContext): IfdContext;

The function update basic attributes of the specified context.

Input:

  • String session_id session_id - The session id of the active user.

IfdContext - specifications of the context to be updated:

  • guid – global unique id of the target context;
  • version_id – (optional) new version number of the context. It shall be string with an integer value – new number of the version. If the value is the same as before it will be incremented by one. If the attribute is unset context version will be unset;
  • version_date – ignored in input (context after successive update will be set with current date/time stamp);
  • status – (optional) one of the following: 'DRAFT', 'CHECKED', 'APPROVED', 'INVALID', if unset – status of the concept will be left without changes;
  • full_names – ignored in the input, use addNamesToConcept, removeNameFromConcept, updateName or correctSpellingForName;
  • definitions – ignored in the input, use addDefinitionsToConcept, removeDefinitionFromConcept, updateDefinition or correctSpellingForDescription;
  • comments – ignored in the input, use addCommentsToConcept, removeCommentFromConcept, updateComment or correctSpellingForDescription;
  • is_restricted – (optional) if set any valid Boolean – just assigned to the restricted flag of the context;
  • is_read_only – ignored in the input

Returns:

IfdContext - Fully specified (in all available languages) updated concept (see description of getContexts

Difference with v.2.00

  • (144) In v.2.00 the function did not check if user is context owner;
  • (145) In v.2.00 the function did not provide any error handling;
  • (146) In v.2.00 the function just assigned context’s version_id and version_date with values specified by user without any check and constraints


Back to the API

Comments: