Ignore:
Timestamp:
2009-12-09T13:21:38+13:00 (14 years ago)
Author:
kjdon
Message:

removeold renamed to remove_all, added remove_one for deleting a single doc

Location:
main/trunk/greenstone2/perllib/plugins
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/ArchivesInfPlugin.pm

    r21285 r21308  
    147147}
    148148
    149 sub removeold {
     149sub remove_all {
    150150    my $self = shift (@_);
    151151    my ($pluginfo, $base_dir, $processor, $maxdocs) = @_;
    152152
    153153}
     154
     155sub remove_one {
     156    my $self = shift (@_);
     157    my ($file, $oids) = @_;
     158   
     159}
     160
     161
    154162# called at the end of each plugin pass
    155163sub end {
  • main/trunk/greenstone2/perllib/plugins/BasePlugin.pm

    r21286 r21308  
    314314}
    315315
    316 # In case a plugin (eg PharosImageIndexer) needs to do something extra
    317 sub removeold {
     316# This is called once if removeold is set with import.pl. Most plugins will do
     317# nothing but if a plugin does any stuff outside of creating doc obj, then
     318# it may need to clear something.
     319sub remove_all {
    318320    my $self = shift (@_);
    319321    my ($pluginfo, $base_dir, $processor, $maxdocs) = @_;
     322}
     323
     324# This is called per document for docs that have been deleted from the
     325# collection. Most plugins will do nothing
     326# but if a plugin does any stuff outside of creating doc obj, then it may need
     327# to clear something.
     328sub remove_one {
     329    my $self = shift (@_);
     330   
     331    my ($file, $oids) = @_;
    320332}
    321333
  • main/trunk/greenstone2/perllib/plugins/DirectoryPlugin.pm

    r21285 r21308  
    141141}
    142142
    143 sub removeold {
     143sub remove_all {
    144144    my $self = shift (@_);
    145145    my ($pluginfo, $base_dir, $processor, $maxdocs) = @_;
    146146
    147147}
     148
     149sub remove_one {
     150    my $self = shift (@_);
     151    my ($file, $oids) = @_;
     152   
     153}
     154
     155
    148156# called at the end of each plugin pass
    149157sub end {
     
    567575       
    568576        my $tmpfile = Encode::encode_utf8($subfile);
    569     #print STDERR "subfile = $subfile, tmpfile = $tmpfile\n";
    570577    # Next add metadata read in XML files (if it is supplied)
    571578    if ($additionalmetadata == 1) {
Note: See TracChangeset for help on using the changeset viewer.