ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/Application.pm
(Generate patch)

Comparing COMP/SCRAM/src/ActiveDoc/Application.pm (file contents):
Revision 1.1 by williamc, Thu Jan 20 18:18:45 2000 UTC vs.
Revision 1.2 by williamc, Thu Jan 27 17:50:38 2000 UTC

# Line 10 | Line 10
10   #
11   # Interface
12   # ---------
13 < # new(store)                    : A new Application object
13 > # new(store,query)                      : A new Application object
14   # activatedoc(url[,options])    : return the oref of a doc corresponding
15   #                                 to the url
16   # userinterface([IntObj])       : set/get user interface object - defaults
17   #                                 to SimpleUserInterface if not overridden
18   # store()                       : return the store
19 + # newdoc(type)                  : Instantiate a new ActiveDoc
20 + #                                 object of the specified type
21 + # find(@keys)                   : find an object in the activedoc objectdb
22  
23   package ActiveDoc::Application;
24   require 5.004;
# Line 26 | Line 29 | sub new {
29          $self={};
30          bless $self, $class;
31          $self->{store}=shift;
32 +        $self->{options}=shift;
33  
34          # make sure data is empty
35          undef $self->{StarterDoc};
36          undef $self->{UI};
37  
38 +        $self->_initdoc();
39          return $self;
40   }
41  
# Line 38 | Line 43 | sub store {
43          my $self=shift;
44          return $self->{store};
45   }
46 +
47 + sub find {
48 +        my $self=shift;
49 +        return ($self->{store}->find(@_));
50 + }
51 +
52   sub userinterface {
53          my $self=shift;
54  
# Line 54 | Line 65 | sub activatedoc {
65          my $self=shift;
66          my $url=shift;
67  
57        $self->_initdoc();
68          # Create a new document
69          return $self->{StarterDoc}->activatedoc($url);
70   }
# Line 70 | Line 80 | sub options {
80          }
81   }
82  
83 + sub newdoc {
84 +        my $self=shift;
85 +        my $type=shift;
86 +
87 +        return $type->new($self->{store},$self->{StarterDoc});
88 + }
89  
90   # ---------------- private methods
91   sub _initdoc {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines