Difference between revisions of "API:EPrints/DataObj/SneepComment"

From EPrints Documentation
Jump to: navigation, search
(New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...)
 
m (adding Category:Rubbish, page was emptied 9 years ago and has been untouched since)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<!-- Pod2Wiki=_preamble_
+
[[Category: Rubbish]]
This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost.
+
-->{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/SneepComment.pm|package_name=EPrints::DataObj::SneepComment}}[[Category:API|SneepComment]]<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=head_name -->=NAME=
+
'''EPrints::DataObj::SneepComment''' - A single comment.
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=head_description -->=DESCRIPTION=
+
SneepComment represents a single comment from a user - this may be associated with  one of a number of different objetcs.
+
 
+
This class is a subclass of DataObj, with the following metadata fields:
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_commentid -->==commentid==
+
 
+
  commentid (int)
+
 
+
The unique ID of the comment.
+
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_ownerid -->==ownerid==
+
 
+
  ownerid (itemref)
+
 
+
The id number of the user to which this comment belongs.
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_objectid -->==objectid==
+
 
+
  objectid (itemref)
+
 
+
The id number of the object with which this comment is associated.
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_object_type -->==object_type==
+
 
+
  object_type (text or maybe int or even a namedset?)
+
 
+
The type of the object with which this comment is associated. (EPrint, Documment, User, etc)
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_created -->==created==
+
 
+
  created (datetime)
+
 
+
The date and time at which the comment was created
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_lastmod -->==lastmod==
+
 
+
  lastmod (datetime)
+
 
+
The date and time at which the comment was last modified
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_text -->==text==
+
 
+
  text (text)
+
 
+
The text of the comment. Allows a subset of html which can be defined in the sneep.xml config file.
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_security -->==security==
+
 
+
  security (namedset)
+
 
+
The security type of this comment - who can view it. One of the types of the dataset "security".
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_get_system_field_info -->==get_system_field_info==
+
 
+
  $metadata = EPrints::DataObj::SneepComment-&gt;get_system_field_info
+
 
+
Return an array describing the system metadata of the SneepComment dataset.
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_new -->==new==
+
 
+
  $thing = EPrints::DataObj::SneepComment-&gt;new( $session, $commentid )
+
 
+
Return the SneepComment with the given $commentid, or undef if it does not exist.
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_new_from_data -->==new_from_data==
+
 
+
  $comment = EPrints::DataObj::SneepComment-&gt;new_from_data( $session, $data )
+
 
+
Construct a new EPrints::DataObj::SneepComment based on the ref to a hash of metadata.
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_is_public -->==is_public==
+
 
+
  $boolean = $doc-&gt;is_public()
+
 
+
True if this document has no security set and is in the live archive.
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_get_url -->==get_url==
+
 
+
  $url = $doc-&gt;get_url( [$file] )
+
 
+
Return the full URL of the document. Overrides the stub in DataObj.
+
 
+
If file is not specified then the "main" file is used.
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_commit -->==commit==
+
 
+
  $success = $doc-&gt;commit
+
 
+
Commit any changes that have been made to this object to the database.
+
 
+
(might) Call "set_sneep_comment_automatic_fields" in the ArchiveConfig first to set any automatic fields that may be needed.
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_remove -->==remove==
+
 
+
  $success = $comment-&gt;remove
+
 
+
Remove this comment from the database.
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_get_defaults -->==get_defaults==
+
 
+
  $defaults = EPrints::DataObj::EPrint-&gt;get_defaults( $session, $data )
+
 
+
Return default values for this object based on the starting data.
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_validate -->==validate==
+
 
+
  $problems = $doc-&gt;validate( [$for_archive] )
+
 
+
Return an array of XHTML DOM objects describing validation problems with the entire document, including the metadata and repository config specific requirements.
+
 
+
A reference to an empty array indicates no problems.
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=head_undocumented_methods -->=UNDOCUMENTED METHODS=
+
{{API:Undocumented Methods}}<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_create -->==create==
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_create_from_data -->==create_from_data==
+
 
+
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
+

Latest revision as of 00:27, 3 October 2018