KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > engine > state > ApplicationStateManager


1 // Copyright 2005 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.engine.state;
16
17 /**
18  * @author Howard M. Lewis Ship
19  * @since 4.0
20  */

21 public interface ApplicationStateManager
22 {
23     /**
24      * Checks to see if the named object exists.
25      *
26      * @param objectName
27      * the name of the application state object
28      * @throws org.apache.hivemind.ApplicationRuntimeException
29      * if no such object is declared
30      */

31     public boolean exists(String JavaDoc objectName);
32
33     /**
34      * Gets the named application state object, creating it if necessary.
35      *
36      * @param objectName
37      * the name of the application state object
38      * @return the object
39      * @throws org.apache.hivemind.ApplicationRuntimeException
40      * if no such object is declared
41      */

42     public Object JavaDoc get(String JavaDoc objectName);
43     
44     /**
45      * Stores a new state object, replacing the old one. The
46      * new object may be null.
47      *
48      * @param objectName the name of the object to store
49      * @param stateObject the new object, possibly null
50      * @throws org.apache.hivemind.ApplicationRuntimeException
51      * if no such object is declared
52      */

53     
54     public void store(String JavaDoc objectName, Object JavaDoc stateObject);
55
56     /**
57      * Asks each {@link StateObjectManager}to store each object obtained.
58      */

59
60     public void flush();
61 }
Popular Tags