01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/web/tags/sakai_2-4-1/news-api/api/src/java/org/sakaiproject/news/api/NewsItemEnclosure.java $
03: * $Id: NewsItemEnclosure.java 18368 2006-11-22 04:36:12Z joshua.ryan@asu.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.news.api;
21:
22: /**
23: * <p>
24: * NewsItemEnclosure is the Interface for a Sakai News message enclsoure.
25: * </p>
26: * <p>
27: * The news message enclsure has header fields (type, size) and a url of the actual enclosed file. All fields are read only.
28: * </p>
29: *
30: * @author Joshua Ryan joshua.ryan@asu.edu alt^i
31: */
32: public interface NewsItemEnclosure {
33: /**
34: * Access the Url of the enclosed item.
35: *
36: * @return The url of the enclosure.
37: */
38: public String getUrl();
39:
40: /**
41: * Access the type of the enclosure.
42: *
43: * @return The type of the enclosed item.
44: */
45: public String getType();
46:
47: /**
48: * Access the length in Bytes of the enclosed item.
49: *
50: * @return The length in Bytes of the enclosed item.
51: */
52: public long getLength();
53:
54: /**
55: * Set the url of the enclosure.
56: *
57: * @param url
58: * The url of the enclosure.
59: */
60: public void setUrl(String url);
61:
62: /**
63: * Set the type of the enclosure.
64: *
65: * @param type
66: * The type of the enclosure.
67: */
68: public void setType(String type);
69:
70: /**
71: * Set the length in Bytes of the enclosed item.
72: *
73: * @param length
74: * The length in Bytes of the enclosed item.
75: */
76: public void setLength(long length);
77:
78: }
|