1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.expando.model;
16  
17  import com.liferay.portal.PortalException;
18  import com.liferay.portal.kernel.util.UnicodeProperties;
19  import com.liferay.portal.service.ServiceContext;
20  
21  import java.io.Serializable;
22  
23  import java.util.Enumeration;
24  import java.util.Map;
25  
26  /**
27   * <a href="ExpandoBridge.java.html"><b><i>View Source</i></b></a>
28   *
29   * @author Raymond Augé
30   */
31  public interface ExpandoBridge {
32  
33      public void addAttribute(String name) throws PortalException;
34  
35      public void addAttribute(String name, int type) throws PortalException;
36  
37      public void addAttribute(String name, int type, Serializable defaultValue)
38          throws PortalException;
39  
40      public Serializable getAttribute(String name);
41  
42      public Serializable getAttributeDefault(String name);
43  
44      public Enumeration<String> getAttributeNames();
45  
46      public UnicodeProperties getAttributeProperties(String name);
47  
48      public Map<String, Serializable> getAttributes();
49  
50      public int getAttributeType(String name);
51  
52      public String getClassName();
53  
54      public long getClassPK();
55  
56      public boolean hasAttribute(String name);
57  
58      public boolean isIndexEnabled();
59  
60      public void setAttribute(String name, Serializable value);
61  
62      public void setAttributeDefault(String name, Serializable defaultValue);
63  
64      public void setAttributeProperties(
65          String name, UnicodeProperties properties);
66  
67      public void setAttributes(Map<String, Serializable> attributes);
68  
69      public void setAttributes(ServiceContext serviceContext);
70  
71      public void setIndexEnabled(boolean indexEnabled);
72  
73  }