View Javadoc

1   /*
2    * Copyright 2003,2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  /* 
17  
18   */
19  
20  package org.apache.pluto.portalImpl.om.page;
21  
22  import java.util.Collection;
23  
24  /***
25   * <P>
26   * The <CODE>Fragment</CODE> interface represents a single fragment on a site,
27   * such as a page, a row, or even a portlet fragment.
28   * </P>
29   * <P>
30   * The interfaces defined in this package represent an abstract object
31   * model (OM) that is applicable for different implementations.
32   * The abstract OM defines only how the data is stored and accessed
33   * in the memory. Each implementation can store the data in different ways.
34   * </P>
35   * <P>
36   * This abstraction layer helps to generalize the portlet container from
37   * special implementations like data storage and moreover it is not bound
38   * to a special Application Server.
39   * </P>
40   * 
41  
42   */
43  public interface Fragment
44  {
45  
46  
47      /***
48       * Returns the administrative name of this fragment.
49       * 
50       * @return the administrative name
51       */
52      String getName();
53  
54      /***
55       * binds an administrative name to this fragment.
56       * 
57       * @param name the administrative name
58       */
59      void setName(String name);
60  
61      /***
62       * Returns the type of the class bound to this fragment.
63       * 
64       * @return the type
65       */
66      String getType();
67  
68      /***
69       * binds a type to this fragment.
70       * 
71       * @param type the type
72       */
73      void setType(String type);
74  
75      /***
76       * Returns the classname of the class bound to this fragment.
77       * 
78       * @return the classname
79       */
80      String getClassname();
81  
82      /***
83       * binds a classname to this fragment.
84       * 
85       * @param classname the classname
86       */
87      void setClassname(String classname);
88  
89      /***
90       * Returns the navigational information linked with this fragment.
91       * The return value may be NULL, if no navigational information is defined.
92       * 
93       * @return the navigational information
94       */
95      Navigation getNavigation();
96  
97      /***
98       * binds navigational information to this fragment.
99       * 
100      * @param navigation the navigational information
101      */
102     void setNavigation(Navigation navigation);
103 
104     /***
105      * Returns all fragments used in this node. This may be
106      * a page fragment or even directly a portlet fragment.
107      * 
108      * @return a collection containing Fragment objects
109      */
110     Collection getFragments();
111 
112     /***
113      * Returns all properties describing this fragment. Only the
114      * implementation of the "classname" knows how to handle the
115      * properties
116      * 
117      * @return a collection containing Property objects
118      */
119     Collection getProperties();
120 
121 }