KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > vlib > pages > Home


1 // Copyright 2004 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.tapestry.vlib.pages;
16
17 import org.apache.tapestry.IRequestCycle;
18 import org.apache.tapestry.html.BasePage;
19 import org.apache.tapestry.vlib.IErrorProperty;
20 import org.apache.tapestry.vlib.IMessageProperty;
21 import org.apache.tapestry.vlib.ejb.MasterQueryParameters;
22
23 /**
24  * The home page for the application, it's primary purpose is
25  * to provide a book search form.
26  *
27  * @author Howard Lewis Ship
28  * @version $Id: Home.java,v 1.5 2004/02/19 17:37:48 hlship Exp $
29  **/

30
31 public abstract class Home extends BasePage implements IErrorProperty, IMessageProperty
32 {
33
34     public abstract String JavaDoc getTitle();
35
36     public abstract String JavaDoc getAuthor();
37
38     public abstract Integer JavaDoc getPublisherId();
39
40     public abstract Integer JavaDoc getOwnerId();
41
42     /**
43      * Invokes {@link BookMatches#performQuery(MasterQueryParameters, IRequestCycle)}.
44      *
45      **/

46
47     public void search(IRequestCycle cycle)
48     {
49         BookMatches matches = (BookMatches) cycle.getPage("BookMatches");
50
51         MasterQueryParameters parameters =
52             new MasterQueryParameters(getTitle(), getAuthor(), getOwnerId(), getPublisherId());
53
54         matches.performQuery(parameters, cycle);
55     }
56
57 }
Popular Tags