1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.expando.model;
16  
17  import com.liferay.portal.kernel.exception.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 long getCompanyId();
57  
58      public boolean hasAttribute(String name);
59  
60      public boolean isIndexEnabled();
61  
62      public void setAttribute(String name, Serializable value);
63  
64      public void setAttributeDefault(String name, Serializable defaultValue);
65  
66      public void setAttributeProperties(
67          String name, UnicodeProperties properties);
68  
69      public void setAttributes(Map<String, Serializable> attributes);
70  
71      public void setAttributes(ServiceContext serviceContext);
72  
73      public void setClassName(String className);
74  
75      public void setClassPK(long classPK);
76  
77      public void setCompanyId(long companyId);
78  
79      public void setIndexEnabled(boolean indexEnabled);
80  
81  }