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.om.common.portlet;
18  
19  import java.io.Serializable;
20  import java.util.Collection;
21  
22  import javax.portlet.PortletMode;
23  
24  import org.apache.pluto.om.portlet.ContentType;
25  /***
26   * 
27   * ContentTypeComposite
28   * 
29   * Combines the <code>org.apache.pluto.common.ContentType</code>
30   * and <code>org.apache.pluto.common.ContentTypeCtrl</code> interfaces
31   * into single interface for use in Jetspeed.
32   * 
33   * 
34   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
35   * @version $Id: ContentTypeComposite.java 516448 2007-03-09 16:25:47Z ate $
36   *
37   */
38  public interface ContentTypeComposite extends ContentType, Serializable
39  {
40      void setPortletModes(Collection modes);
41  
42      /***
43       * Adds a mode to be supported by this <code>ContentType</code>.  If the mode
44       * already exists, the same mode is NOT added again.
45       * @param mode portlet mode to add.
46       */
47      void addPortletMode(PortletMode mode);
48  
49      /***
50       * Checks whether or not the <code>mode</code>
51       * is supported by this <code>ContentType</code>
52       * @param mode portlet mode to check
53       * @return <code>true</code> if the <code>mode</code> is
54       * supported, otherwise <code>false</code>.
55       */
56      boolean supportsPortletMode(PortletMode mode);
57  
58      /***
59       * 
60       * @param contentType
61       */
62      void setContentType(String contentType);
63  }