001: /**
002: *
003: */package org.enhydra.dm.api;
004:
005: import org.enhydra.dm.api.exceptions.BaseException;
006: import org.enhydra.dm.data.DocumentDO;
007:
008: /**
009: * Document interface that represents association with DocumentDO object with additional
010: * business functionality extensions.
011: *
012: * @author Slobodan Vujasinovic
013: */
014: public interface Document {
015:
016: /**
017: * Returns the entity tag for the specified resource. The returned string uniquely
018: * identifies the current incarnation of the given resource.
019: *
020: * @param file The resource whose entity tag is to be retrieved.
021: * @return A <code>String</code> containing the entity tag for the resource.
022: */
023: public String getETag();
024:
025: /**
026: * Formats a timestamp (representing milliseconds since the epoch) as used in the
027: * WebDAV <code>getlastmodified</code> property.
028: *
029: * @return A <code>String</code> containing the formatted result.
030: */
031: public String getLastModifiedFormated();
032:
033: public DocumentDO createDO() throws BaseException;
034:
035: public DocumentVersion createVersion();
036:
037: public boolean isArchived();
038:
039: public void setArchived(boolean archived);
040:
041: public boolean isAutoversionable();
042:
043: public void setAutoversionable(boolean autoversionable);
044:
045: public String getCheckedOutBy();
046:
047: public void setCheckedOutBy(String checkedOutBy);
048:
049: public String getCreatedBy();
050:
051: public void setCreatedBy(String createdBy);
052:
053: public long getCreatedDate();
054:
055: public void setCreatedDate(long createdDate);
056:
057: public String getCurrentVersionNumber();
058:
059: public void setCurrentVersionNumber(String currentVersionNumber);
060:
061: public String getFilepath();
062:
063: public void setFilepath(String filepath);
064:
065: public FoDocument getFoDocumentRef();
066:
067: public void setFoDocumentRef(FoDocument foDocumentRef);
068:
069: public String getLastModifiedBy();
070:
071: public void setLastModifiedBy(String lastModifiedBy);
072:
073: public long getLastModifiedDate();
074:
075: public void setLastModifiedDate(long lastModifiedDate);
076:
077: public String getLockedBy();
078:
079: public void setLockedBy(String lockedBy);
080:
081: public String getMimeType();
082:
083: public void setMimeType(String mimeType);
084:
085: public String getName();
086:
087: public void setName(String name);
088:
089: public String getNumber();
090:
091: public String getId();
092:
093: public void setNumber(String number);
094:
095: public void setId(String id);
096:
097: public long getSize();
098:
099: public void setSize(long size);
100:
101: public boolean isTemplate();
102:
103: public void setTemplate(boolean template);
104:
105: public Document getTemplateRef();
106:
107: public void setTemplateRef(Document templateRef);
108:
109: public String getDeletedBy();
110:
111: public void setDeletedBy(String deletedBy);
112:
113: public long getDeletedDate();
114:
115: public void setDeletedDate(long deletedDate);
116: }
|