KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > service > cmr > model > FileInfo


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.service.cmr.model;
18
19 import java.io.Serializable JavaDoc;
20 import java.util.Date JavaDoc;
21 import java.util.Map JavaDoc;
22
23 import org.alfresco.service.cmr.repository.ContentData;
24 import org.alfresco.service.cmr.repository.NodeRef;
25 import org.alfresco.service.namespace.QName;
26
27 /**
28  * Common file information. The implementations may store the properties for the lifetime
29  * of this instance; i.e. the values are transient and can be used as read-only values for
30  * a short time only.
31  *
32  * @author Derek Hulley
33  */

34 public interface FileInfo
35 {
36     /**
37      * @return Returns a reference to the low-level node representing this file
38      */

39     public NodeRef getNodeRef();
40     
41     /**
42      * @return Return true if this instance represents a folder, false if this represents a file
43      */

44     public boolean isFolder();
45     
46     /**
47      * @return Returns the name of the file or folder within the parent folder
48      */

49     public String JavaDoc getName();
50     
51     /**
52      * @return Returns the date the node was created
53      */

54     public Date JavaDoc getCreatedDate();
55     
56     /**
57      * @return Returns the modified date
58      */

59     public Date JavaDoc getModifiedDate();
60     
61     /**
62      * Get the content data. This is only valid for {@link #isFolder() files}.
63      *
64      * @return Returns the content data
65      */

66     public ContentData getContentData();
67     
68     /**
69      * @return Returns all the node properties
70      */

71     public Map JavaDoc<QName, Serializable JavaDoc> getProperties();
72 }
73
Popular Tags