- 1 NAME
- 2 DESCRIPTION
- 3 INSTANCE VARIABLES
- 4 CORE METADATA FIELDS
- 5 REFERENCES AND RELATED OBJECTS
- 6 METHODS
- 6.1 Constructor Methods
- 6.2 Class Methods
- 6.3 Object Methods
- 6.4 Utility Methods
- 7 SEE ALSO
- 8 COPYRIGHT
EPrints::DataObj::History - An element in the history of the arcvhive.
This class describes a single item in the history dataset. A history object describes a single action taken on a single item in another dataset.
Changes to document are considered part of changes to the eprint it belongs to.
CORE METADATA FIELDS
The unique numerical ID of this history event.
A text representation of the actor reponsible for the action for this history event. This may be the name of a script or application or a user's name.
The name of the dataset to which the modified item belongs. eprint is used for eprints, rather than the inbox, buffer etc.
The numerical ID of the object in the dataset.
The revision of the object. This is the revision number after the action occured. Not all actions increase the revision number.
The moment at which this thing happened.
The type of event. Provisionally, this is a subset of the new list of privileges.
If this is a rejection then the details contain the message sent to the user.
REFERENCES AND RELATED OBJECTS
The ID of the user who caused this event. A value of zero or undefined indicates that there was no user responsible (ie. a script did it).
EPrints::DataObj::History::create( $session, $data );
Create a new history data object from this $data. Unlike other create methods this one does not return the new object as it is never needed, and would increase the load when modifying other data objects.
Also, this does not queue the fields for indexing.
$field_info = EPrints::DataObj::History->get_system_field_info
Returns an array describing the system metadata of the history dataset.
$dataset = EPrints::DataObj::History->get_dataset_id
Returns the ID of the EPrints::DataSet object to which this record belongs.
History cannot be altered. So if somehow this is called it just logs a warning message.
History cannot be removed. So if somehow this is called it just logs a warning message.
$defaults = EPrints::DataObj::History->get_defaults( $session, $data, [ $dataset ] )
Returns default values for this history data object based on the starting $data and for ths $dataset if specified.
$xhtml = $history->render
Return a rendering of this history event as XHTML DOM.
$object = $history->get_dataobj
Returns the data object to which this history event relates.
$user = $history->get_user
Returns the user data object of the user who caused this history event.
$history = $history->get_previous
Returns the previous history event for this history event's data object.
Returns undef if no such history event exists.
$xhtml = $history->render_removal_request
Returns a XHTML DOM rendering of a removal request history event.
$xhtml = $history->render_with_details
Returns a XHTML DOM rendering of a mail_owner (i.e. email was sent to the owner of the data object) history event.
$xhtml = $history->render_create( $action )
Returns a XHTML DOM rendering of a create history event.
$xhtml = $history->render_modify( $action )
Returns a XHTML DOM rendering of a modify history event.
$history->set_dataobj_xml( $dataobj )
Stores the XML serialisation for $dataobj to a file.
$boolean = EPrints::DataObj::History::empty_tree( $domtree )
Returns true if there is no text in the XHTML $domtree other than whitespace. Otherwise, returns false.
( $f1, $f2 ) = EPrints::DataObj::History::render_xml_diffs( $tree1, $tree2, $indent, $width )
Returns two XHTML DOM trees. The first for the older version, highlighting lines that are changed or removed and the second for the newer version, highlighting libes that are changed or added.
($xhtml, [$xhtml_padding]) = EPrints::DataObj::History::render_domtree( $session, $tree, $indent, $make_padded, $width )
Returns a rendering of the given tree as XHTML (showing the actual XML structure).
If $make_padded is true then also generate another element, which is empty but the same height to be used in the other column to keep things level.
$boolean = EPrints::DataObj::History::diff( $tree1, $tree2 )
Returns true if the XML trees $tree1 and $tree2 are not the same, otherwise returns false.
@lines = EPrints::DataObj::History::mktext( $session, $text, $offset, $endw, $width )
Returns the $text string broken into an array of lines which are $width long or less.
Inserts a 90 degree arrow at the end of each broken line to indicate that it has been broken.
$xhtml = EPrints::DataObj::History::mkpad( $session, $text, $offset, $endw, $width )
Return XHTML DOM of vertical padding equivalent to the lines that would be needed to render $text.
© Copyright 2022 University of Southampton.
EPrints 3.4 is supplied by EPrints Services.
This file is part of EPrints 3.4 http://www.eprints.org/.
EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.
EPrints 3.4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.