View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    * 
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   * 
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.jetspeed.aggregator;
18  
19  import org.apache.jetspeed.om.page.ContentPage;
20  import org.apache.jetspeed.request.RequestContext;
21  
22  /***
23   * <p>
24   * The Content Server Adapter encapsulates all aggregated related
25   * activities related to aggregation, lessening the coupling of the
26   * aggregator to the content server, which can be disabled.
27   * </p>
28   *
29   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
30   * @version $Id: $
31   */
32  public interface ContentServerAdapter 
33  {
34      /***
35       * Pre page aggregation event, prepares the content paths for the 
36       * given decorators of the current page being aggregated. Preparing 
37       * content paths is the process of putting in the correct decorator
38       * paths so that the content server can correctly find the decorator
39       * resources.  
40       * 
41       * @param context Jetspeed portal per request context.
42       * @param page The current page being aggregated.
43       */
44      void prepareContentPaths(RequestContext context, ContentPage page);
45      
46      /***
47       * Adds stylesheets into the response header for a decoration 
48       * using the Header Resource component.
49       * Styles can be gathered from both page and portlet decorators.
50       * 
51       * @param context Jetspeed portal per request context.
52       * @param decoratorName Name of the decorator holding the style.  
53       * @param decoratorType Type of decorator, either portlet or page.
54       */
55      void addStyle(RequestContext context, String decoratorName, String decoratorType);
56      
57  }