- 1 NAME
- 2 DESCRIPTION
- 3 INSTANCE VARIABLES
- 4 METHODS
- 4.1 Constructor Methods
- 4.2 Class Methods
- 4.3 Object Methods
- 4.4 Object Methods
- 5 SEE ALSO
- 6 COPYRIGHT
EPrints::DataObj::SavedSearch - Single saved search.
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.
The user who owns this saved search.
$saved_search = EPrints::DataObj::SavedSearch->create( $session, $userid )
Creates a new saved search, belonging to user with ID $userid.
$field_config = EPrints::DataObj::SavedSearch->get_system_field_info
Returns an array describing the system metadata of the saved search dataset.
$dataset = EPrints::DataObj::SavedSearch->get_dataset_id
Returns the ID of the EPrints::DataSet object to which this record belongs.
$dataset = $saved_search->get_dataset
Get the dataset that this saved search covers.
$success = $saved_search->commit( [ $force ] )
Writes this object to the database.
If $force is not true then it only actually modifies the database if one or more fields have been changed.
Returns true if commit was successfully. Otherwise, returns false.
$user = $saved_search->get_user
Returns the EPrints::DataObj::User which owns this saved search.
$searchexp = $saved_search->make_searchexp
Returns an EPrints::Search describing how to find the data objects which are in the scope of this saved search.
Sends out an email for this subscription. If there are no matching new data objects then an email is only sent if the saved search has mailempty set to true.
$boolean = $saved_search->has_owner( $possible_owner )
Returns true if $possible_owner is the same as the owner of this saved search. Otherwise, returns false.
$parent = $saved_search->parent
Returns the parent data object for this saved search. I.e. the user who owns this saved search. This is similar to get_user but is not as fault tolerant and does set instance variable:
$url = $saved_search->get_url( [ $staff ] )
Gets the URL for this saved search. Currently $staff will not effect the URL but in future this may return a specialised URL for staff only.
EPrints::DataObj::SavedSearch::process_set( $session, $frequency );
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.
$timestamp = EPrints::DataObj::SavedSearch::get_last_timestamp( $session, $frequency );
Return sthe timestamp of the last time this $frequency of alert was sent.
© 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/.