Coverage Report - org.apache.tapestry.engine.state.StateObjectManager
 
Classes in this File Line Coverage Branch Coverage Complexity
StateObjectManager
N/A
N/A
1
 
 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  
  * Interface for an object that manages a single application state object.
 19  
  * Represents the named intersection of a
 20  
  * {@link org.apache.tapestry.engine.state.StateObjectPersistenceManager}for
 21  
  * storing the state object between request cycles, and a
 22  
  * {@link org.apache.tapestry.engine.state.StateObjectFactory}to create the
 23  
  * object in the first place.
 24  
  * 
 25  
  * @author Howard M. Lewis Ship
 26  
  * @since 4.0
 27  
  */
 28  
 public interface StateObjectManager
 29  
 {
 30  
 
 31  
     /**
 32  
      * Returns true if the application state object exists (i.e., a value has
 33  
      * been stored).
 34  
      */
 35  
     boolean exists();
 36  
 
 37  
     /**
 38  
      * Gets or creates the application state object.
 39  
      */
 40  
 
 41  
     Object get();
 42  
 
 43  
     /**
 44  
      * Stores (if necessary) the object back into persistent storage. This is
 45  
      * not application to all storage scopes.
 46  
      * 
 47  
      * @param stateObject
 48  
      *            the application state object previously obtained from
 49  
      *            {@link #get()}.
 50  
      */
 51  
 
 52  
     void store(Object stateObject);
 53  
 }