001    /*
002     * Copyright 2004 Chris Nelson
003     *
004     * Licensed under the Apache License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
007     * Unless required by applicable law or agreed to in writing,
008     * software distributed under the License is distributed on an "AS IS" BASIS,
009     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
010     * See the License for the specific language governing permissions and limitations under the License.
011     */
012    package org.trails.page;
013    
014    import org.apache.tapestry.IRequestCycle;
015    import org.apache.tapestry.contrib.table.model.ITableColumn;
016    import org.trails.component.TrailsTableColumn;
017    
018    import java.util.List;
019    
020    /**
021     * List all the instances of a type
022     *
023     * @author Chris Nelson
024     */
025    public abstract class ListPage extends TrailsPage
026    {
027    
028            public abstract Object getObject();
029    
030            public abstract void setObject(Object object);
031    
032            public abstract List getInstances();
033    
034            public abstract void setInstances(List Instances);
035    
036            public abstract ITableColumn getColumn();
037    
038            public abstract void setColumn(ITableColumn column);
039    
040            public void activateTrailsPage(Object[] objects, IRequestCycle iRequestCycle)
041            {
042                    if (getCallbackStack() != null)
043                    {
044                            getCallbackStack().clear();
045                    }
046            }
047    }