API:EPrints/DataObj/SavedSearch

From EPrints Documentation
Revision as of 18:29, 11 August 2009 by Tdb01r (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Latest Source Code (3.3, 3.2) | Revision Log | Before editing this page please read Pod2Wiki

NAME

EPrints::DataObj::SavedSearch - Single saved search.

DESCRIPTION

A saved search is a sub class of EPrints::DataObj.

Each one belongs to one and only one user, although one user may own multiple saved searches.

get_system_field_info

 $field_config = EPrints::DataObj::SavedSearch->get_system_field_info

Return an array describing the system metadata of the saved search. dataset.

new

 $saved_search = EPrints::DataObj::SavedSearch->new( $session, $id )

Return new Saved Search object, created by loading the Saved Search with id $id from the database.

new_from_data

 $saved_search = EPrints::DataObj::SavedSearch->new_from_data( $session, $data )

Construct a new EPrints::DataObj::SavedSearch object based on the $data hash reference of metadata.

get_defaults

 $defaults = EPrints::DataObj::SavedSearch->get_defaults( $session, $data )

Return default values for this object based on the starting data.

remove

 $success = $saved_search->remove

Remove the saved search.

commit

 $success = $saved_search->commit( [$force] )

Write this object to the database.

If $force isn't true then it only actually modifies the database if one or more fields have been changed.

get_user

 $user = $saved_search->get_user

Return the EPrints::User which owns this saved search.

make_searchexp

 $searchexp = $saved_search->make_searchexp

Return a EPrints::Search describing how to find the eprints which are in the scope of this saved search.

send_out_alert

 $saved_search->send_out_alert

Send out an email for this subcription. If there are no matching new items then an email is only sent if the saved search has mailempty set to true.

process_set

 EPrints::DataObj::SavedSearch::process_set( $session, $frequency );

Static method. Calls send_out_alert on every saved search with a frequency matching $frequency.

Also saves a file logging that the alerts for this frequency was sent out at the current time.

get_last_timestamp

 $timestamp = EPrints::DataObj::SavedSearch::get_last_timestamp( $session, $frequency );

Static method. Return the timestamp of the last time this frequency of alert was sent.

has_owner

 $boolean = $user->has_owner( $possible_owner )

True if the users are the same record.

UNDOCUMENTED METHODS

Warning These methods were found in the source code but didn't have any POD associated with them. This may be because we haven't got around to documenting them yet or it could be because they are internal to the API and not intended for use by other parts of EPrints.

create

get_url