Skip to content

Commit

Permalink
Item14563: Document the use of AUTOINC in the API
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Feb 19, 2018
1 parent e108f56 commit 0fcb4b9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/lib/Foswiki/Func.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2107,6 +2107,11 @@ try {
};
</verbatim>
The topic name can include an =AUTOINCnnn= mask. For details on
=AUTOINC= masks, see [[TemplateTopics#Automatically_generated_topic_names]].
If the actual name of the topic is required, the =Foswiki::Meta= API
should be used to save the topic.
In the event of an error an exception will be thrown. Callers can elect
to trap the exceptions thrown, or allow them to propagate to the calling
environment. May throw Foswiki::OopsException or Error::Simple.
Expand Down
11 changes: 11 additions & 0 deletions core/lib/Foswiki/Meta.pm
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,11 @@ sub web {
* *Since* 28 Nov 2008
Get/set the topic name associated with the object.
The topic name be set to include an =AUTOINCnnn= mask. For details on
=AUTOINC= masks, see [[TemplateTopics#Automatically_generated_topic_names]].
The mask will be converted to the next available topicname during save, and the
saved name can be retrieved with this method.
=cut

sub topic {
Expand Down Expand Up @@ -1942,6 +1947,9 @@ sub haveAccess {
Save the current object, invoking appropriate plugin handlers
* =%options= - Hash of options, see saveAs for list of keys
The topic name can include an =AUTOINCnnn= mask. For details on
=AUTOINC= masks, see [[TemplateTopics#Automatically_generated_topic_names]]
Returns the new revision number.
=cut
Expand Down Expand Up @@ -2068,6 +2076,9 @@ so an extension author can in fact use all these options. However those
marked "core only" are for core use only and should *not* be used in
extensions.
The topic name can include an =AUTOINCnnn= mask. For details on
=AUTOINC= masks, see [[TemplateTopics#Automatically_generated_topic_names]]
Returns the saved revision number.
=cut
Expand Down

0 comments on commit 0fcb4b9

Please sign in to comment.