Documentation
RETURN
usage
<SEARCH>
<object>
...
</object>
<RETURN [depth="number"]>
[<NOTHING/>]
[<INFO
[creator-info="true/small"]
[modifier-info="true/small"]
[owner-info="true/small"]
[weekdays="true"]
[timestamp="true"]
[year-month-day="true"]
[security="true"]
>
[<FIELDNAME1/>]
[<FIELDNAME2/>]
[...]
</INFO>]
[<DESCRIPTIONS
[languageID="language code/all"]
[stats="true"]
[discard-element-if="absent"]
[weekdays="true"]
/>]
[<CATEGORIES/>]
[<COMMENTS/>]
[<DEPENDENCIES>
[<DEPENDENCY type="string">
[<INFO/>]
[<DESCRIPTIONS/>]
[<CATEGORIES/>]
[<COMMENTS/>]
[<DEPENDENCIES>...</DEPENDENCIES>]
</DEPENDENCY>]
</DEPENDENCIES>]
</RETURN>
</SEARCH>
paramètres
@depth: allows to indicate how many levels of Nectil objects you want to be returned
INFO: specifies you want to get the infos of the elements in the response, and which fields you want to retrieve.
@creator-info: returns info about the creator of the object.
@modifier-info: returns info about the last modifier of the object.
@owner-info: returns info about the last owner of the object.
@weekdays: returns a number representing the day of the week for all the dates in the INFO or DESCRIPTION fields. The value is contained in a `weekday` attribute.
@timestamp: returns a Unix timestamp for all the dates in INFO. The values is contained in a `timestamp` attribute.
@year-month-day: returns the year, month and day as attributes on every node representing a date in INFO.
@security: returns what security is allowed on the field. R for read-only fields and W for read-write fields. This information is available as an attribute on the field node. e.g : <FIRSTNAME security="R">John</FIRSTNAME>
DESCRIPTIONS: returns the description of an element.
@languageID: specifies in which language the descriptions will be returned.
@stats: alows you to know in which other languages the descriptions are available for this media.
@discard-element-if: removes an element if it has no DESCRIPTION in the language of the visitor. It allows you to discard parts of a website that are not (yet) translated.
CATEGORIES: returns the categories of the elements.
DEPENDENCIES: returns the dependencies of the elements. Equivalent to depth="2". You can specify which dependency type you want to be returned by adding DEPENDENCY nodes inside this node.
COMMENTS: returns the comments of the elements.
Indicates which information you want to get back in the XML returned by the Nectil Framework.
Be careful to place the RETURN node INSIDE the SEARCH node.
If you write
<RETURN>
<INFO/>
</RETURN>
the whole <INFO> will be returned, with all its nodes.
If you write
<RETURN>
<INFO>
<ID/>
</INFO>
</RETURN>
the <INFO/> node will be returned but with only the <ID/> node inside it.
If you do not put the <INFO/>, it will not be returned.
This behaviour will also be applied on the objects below the objects at the first level (the children, grand-children, grand-grand-children,etc).
To point how many levels of objects you want to get back, use the depth attribute.
If you want other informations for the objects below the first level objects, you can indicate them in the DEPENDENCIES node.
<RETURN>
<INFO/>
<DEPENDENCIES>
<INFO/>
<DESCRIPTIONS/>
</DEPENDENCIES>
</RETURN>
If you want to restrict on certain dependency types, you can use DEPENDENCY to indicate which dependency types you want returned.
<RETURN>
<INFO/>
<DEPENDENCIES>
<DEPENDENCY type="mediaClient">
<INFO/>
</DEPENDENCY>
</DEPENDENCIES>
</RETURN>
exemples
<SEARCH>
<MEDIA>
<INFO>
<MEDIATYPE operator="=">News</MEDIATYPE>
</INFO>
</MEDIA>
<RETURN>
<INFO />
<DESCRIPTIONS>
<DESCRIPTION>
<TITLE />
</DESCRIPTION>
</DESCRIPTIONS>
<CATEGORIES />
</RETURN>
<SORT order="ascending" select="INFO/CREATIONDATE" data-type="text" />
<PAGINATE display="5" page="1"/>
</SEARCH>
<SEARCH>
<MEDIA/>
<RETURN>
<INFO/>
<DEPENDENCIES>
<INFO/>
<DESCRIPTIONS/>
</DEPENDENCIES>
</RETURN>
</SEARCH>
<SEARCH>
<MEDIA/>
<RETURN>
<INFO/>
<DEPENDENCIES>
<DEPENDENCY type="mediaClient">
<INFO/>
</DEPENDENCY>
</DEPENDENCIES>
</RETURN>
</SEARCH>
<SEARCH>
<CONTACT ID="1857"/>
<RETURN >
<INFO creator-info="small"/>
</RETURN>
</SEARCH>
<GET>
<MEDIA ID="2"/>
<RETURN depth="3">
<INFO/>
<DESCRIPTIONS>
<DESCRIPTION discard-element-if="absent"/>
</DESCRIPTIONS>
</RETURN>
</GET>
<SEARCH>
<MEDIA>
<INFO>
<MEDIATYPE>News</MEDIATYPE>
</INFO>
</MEDIA>
<RETURN>
<DESCRIPTIONS>
<DESCRIPTION languageID="fre"/>
</DESCRIPTIONS>
</RETURN>
</SEARCH>
<SEARCH>
<MEDIA>
<INFO>
<MEDIATYPE>Article</MEDIATYPE>
</INFO>
</MEDIA>
<RETURN>
<DESCRIPTIONS>
<DESCRIPTION languageID="all"/>
</DESCRIPTIONS>
</RETURN>
</SEARCH>
<SEARCH>
<MEDIA mediatype="News"/>
<RETURN>
...
<DESCRIPTIONS>
<DESCRIPTION stats="true"/>
</DESCRIPTIONS>
</RETURN>
</SEARCH>