01: /******************************************************************************
02: * JBoss, a division of Red Hat *
03: * Copyright 2006, Red Hat Middleware, LLC, and individual *
04: * contributors as indicated by the @authors tag. See the *
05: * copyright.txt in the distribution for a full listing of *
06: * individual contributors. *
07: * *
08: * This is free software; you can redistribute it and/or modify it *
09: * under the terms of the GNU Lesser General Public License as *
10: * published by the Free Software Foundation; either version 2.1 of *
11: * the License, or (at your option) any later version. *
12: * *
13: * This software is distributed in the hope that it will be useful, *
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16: * Lesser General Public License for more details. *
17: * *
18: * You should have received a copy of the GNU Lesser General Public *
19: * License along with this software; if not, write to the Free *
20: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
21: * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
22: ******************************************************************************/package org.jboss.portal.cms.model;
23:
24: import java.io.InputStream;
25: import java.util.Locale;
26:
27: /**
28: * CMS content interface.
29: *
30: * @author <a href="mailto:roy@jboss.org">Roy Russo</a>
31: * @version $Id: Content.java 5929 2006-12-22 20:15:42Z sohil.shah@jboss.com $
32: */
33: public interface Content extends CMSObject, Cloneable {
34: String getMimeType();
35:
36: void setMimeType(String type);
37:
38: /** @return the */
39: int getSize();
40:
41: void setSize(int size);
42:
43: /** @return Returns the content. */
44: InputStream getStream();
45:
46: /** @param stream The content to set. */
47: void setStream(InputStream stream);
48:
49: /** @return Returns the content. */
50: byte[] getBytes();
51:
52: /** @param bytes The content to set. */
53: void setBytes(byte[] bytes);
54:
55: String getVersionNumber();
56:
57: void setVersionNumber(String versionNumber);
58:
59: Locale getLocale();
60:
61: void setLocale(Locale locale);
62:
63: String getContentAsString();
64:
65: /** @return Returns the encoding. */
66: String getEncoding();
67:
68: /** @param encoding The encoding to set. */
69: void setEncoding(String encoding);
70:
71: boolean isLive();
72:
73: void setLive(boolean live);
74:
75: /**
76: * this is used to signify that a content is waiting to be approved before being published to go live
77: *
78: * @return
79: */
80: public boolean isWaitingForPublishApproval();
81:
82: /**
83: *
84: *
85: */
86: public void setWaitingForPublishApproval(
87: boolean isWaitingForPublishApproval);
88:
89: /** @return */
90: public String getApprovalProcessId();
91:
92: /**
93: *
94: *
95: */
96: public void setApprovalProcessId(String processId);
97: }
|