Loughborough Online Reading List System
Editing/EditStructuralUnit
NAME
EditStructuralUnit - create and/or alter parent, ranking or state
information for a Structural Unit.
DESCRIPTION
The EditStructuralUnit LUMP API script allows Structural Units to be
created, have parents added/removed, be reranked alongside other
siblings and have the editing state changed.
PARAMETERS
Standard
*username* - Name of user running this CGI script. Required unless web
server authentication is in use (when it is, the web server
authenticated user is used instead).
*password* - Password for the user. This is only required if the web
server is not handling the user authentication and if no security hash
parameter is being given.
*security_hash* - An opaque value used to authenticate the user without
requiring the password to be sent. This value is generated by a previous
execution of a LUMP API script and may well be time limited. It is only
required if no password or webserver authentication is done.
*act_as* - Users in the SysAdmins group can elect to act on the behalf
of other users once they are themselves authenticated. If this parameter
is present it should contain the username of the user that should be
switched to if this option is available and the real user has been
authenticated successfully. Optional.
*session_id* - An opaque string as far as the server is concerned that
is intended solely to allow async clients to differentiate different
results more easily. Optional.
Specific for this script
*operation* - What operation is requested. Valid operations are
"create", "addparent", "removeparent", "rerank", "delete", "undelete"
and "changestate". Defaults to "create" if not specified.
*suid* - ID for the Structural Unit.
*sutid* - ID for the Structural Unit Type.
*parent_su_id* - ID for the Structural Unit that is the parent for the
Structural Unit being created/edited.
*rank* - ranking position for this Structural Unit.
*state* - Editing state for this Structural Unit. Valid states are
"draft", "published" and "suppressed" (the latter being effectively
"deleted" but it doesn't actually remove the Structural Unit from the
database immediately).
RESULTS
When a Structural Unit is created, a Structural Unit Link table is also
created to attach it to the specified parent Structural Unit. At the
same time, the parent's ACLs are copied to the new Structural Unit so
that initially the same people can access it. A successful creation will
return the ID of the new Structural Unit in a <structural_unit_id>
element inside the <returns> section of the LUMP XML response, along
with an <error_code> indicating "SUCCESS". Other operations don't return
anything in the <returns> section of the XML response, relying soley on
the <error_code> to convey success or failure.
SEE ALSO
GetStructuralUnit
FindSuid
EditDataElement
LUMP-XML-Response
COPYRIGHT
Copyright 2009 Loughborough University Library <library@lboro.ac.uk>.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts.