View Javadoc

1   /*
2    * $Id: AbstractResolvedContent.java,v 1.4 2008/12/09 16:37:13 oeuillot Exp $
3    */
4   package org.rcfaces.core.internal.contentStorage;
5   
6   import org.rcfaces.core.internal.lang.StringAppender;
7   
8   /**
9    * 
10   * @author Olivier Oeuillot (latest modification by $Author: oeuillot $)
11   * @version $Revision: 1.4 $ $Date: 2008/12/09 16:37:13 $
12   */
13  public abstract class AbstractResolvedContent implements IResolvedContent {
14  
15      private static final String REVISION = "$Revision: 1.4 $";
16  
17      private static final long serialVersionUID = 8947615551118704798L;
18  
19      private boolean versioned;
20  
21      public String getETag() {
22          return null;
23      }
24  
25      public String getHash() {
26          return null;
27      }
28  
29      public int getLength() {
30          return -1;
31      }
32  
33      public long getModificationDate() {
34          return -1;
35      }
36  
37      public String getURLSuffix() {
38          return null;
39      }
40  
41      public boolean isErrored() {
42          return false;
43      }
44  
45      public boolean isProcessAtRequest() {
46          return false;
47      }
48  
49      public String getResourceKey() {
50          return null;
51      }
52  
53      public boolean isVersioned() {
54          return versioned;
55      }
56  
57      public void setVersioned(boolean versioned) {
58          this.versioned = versioned;
59      }
60  
61      public void appendHashInformations(StringAppender sa) {
62          long date = getModificationDate();
63          if (date > 0) {
64              sa.append(date);
65          }
66  
67          int length = getLength();
68          if (length > 0) {
69              sa.append(length);
70          }
71      }
72  
73  }