org.apache.naming.resources
public class ResourceAttributes extends Object implements Attributes
Version: $Revision: 708151 $
| Field Summary | |
|---|---|
| static String | ALTERNATE_CONTENT_LENGTH
Content length. |
| static String | ALTERNATE_CREATION_DATE
Creation date. |
| static String | ALTERNATE_ETAG
ETag. |
| static String | ALTERNATE_LAST_MODIFIED
Last modification date. |
| static String | ALTERNATE_TYPE
Type. |
| protected Attributes | attributes
External attributes. |
| protected boolean | collection
Collection flag. |
| protected long | contentLength
Content length. |
| protected long | creation
Creation time. |
| protected Date | creationDate
Creation date. |
| static String | COLLECTION_TYPE
Collection type. |
| static String | CONTENT_LANGUAGE
Content language. |
| static String | CONTENT_LENGTH
Content length. |
| static String | CONTENT_TYPE
MIME type of the content. |
| static String | CREATION_DATE
Creation date. |
| static String | ETAG
ETag. |
| protected static SimpleDateFormat | format
HTTP date format. |
| protected static SimpleDateFormat[] | formats
Date formats using for Date parsing. |
| protected static TimeZone | gmtZone |
| protected long | lastModified
Last modified time. |
| protected Date | lastModifiedDate
Last modified date. |
| protected String | lastModifiedHttp
Last modified date in HTTP format. |
| static String | LAST_MODIFIED
Last modification date. |
| protected String | mimeType
MIME type. |
| protected String | name
Name. |
| static String | NAME
Name. |
| protected String | strongETag
Strong ETag. |
| static String | SOURCE
Source. |
| static String | TYPE
Type. |
| protected String | weakETag
Weak ETag. |
| Constructor Summary | |
|---|---|
| ResourceAttributes()
Default constructor. | |
| ResourceAttributes(Attributes attributes)
Merges with another attribute set. | |
| Method Summary | |
|---|---|
| Object | clone()
Clone the attributes object (WARNING: fake cloning). |
| Attribute | get(String attrID)
Get attribute. |
| NamingEnumeration | getAll()
Get all attributes. |
| String | getCanonicalPath()
Return the canonical path of the resource, to possibly be used for
direct file serving. |
| long | getContentLength()
Get content length.
|
| long | getCreation()
Get creation time.
|
| Date | getCreationDate()
Get creation date.
|
| String | getETag()
Get ETag.
|
| String | getETag(boolean strong)
Get ETag.
|
| NamingEnumeration | getIDs()
Get all attribute IDs. |
| long | getLastModified()
Get last modified time.
|
| Date | getLastModifiedDate()
Get lastModified date.
|
| String | getLastModifiedHttp() |
| String | getMimeType() |
| String | getName()
Get name.
|
| String | getResourceType()
Get resource type.
|
| boolean | isCaseIgnored()
Case sensitivity. |
| boolean | isCollection()
Is collection. |
| Attribute | put(Attribute attribute)
Put attribute. |
| Attribute | put(String attrID, Object val)
Put attribute. |
| Attribute | remove(String attrID)
Remove attribute. |
| void | setCollection(boolean collection)
Set collection flag.
|
| void | setContentLength(long contentLength)
Set content length.
|
| void | setCreation(long creation)
Set creation.
|
| void | setCreationDate(Date creationDate)
Creation date mutator.
|
| void | setETag(String eTag)
Set strong ETag. |
| void | setLastModified(long lastModified)
Set last modified.
|
| void | setLastModified(Date lastModified)
Set last modified date.
|
| void | setLastModifiedDate(Date lastModifiedDate)
Last modified date mutator.
|
| void | setLastModifiedHttp(String lastModifiedHttp) |
| void | setMimeType(String mimeType) |
| void | setName(String name)
Set name.
|
| void | setResourceType(String resourceType)
Type mutator.
|
| int | size()
Retrieves the number of attributes in the attribute set. |
Returns: The canonical path of the resource
Returns: content length value
Returns: creation time value
Returns: Creation date value
Returns: strong ETag if available, else weak ETag.
Deprecated:
Get ETag.Parameters: strong Ignored
Returns: strong ETag if available, else weak ETag.
Returns: lastModified time value
Returns: LastModified date value
Returns: Returns the lastModifiedHttp.
Returns: Returns the mimeType.
Returns: Name value
Returns: String resource type
Parameters: collection New flag value
Parameters: contentLength New content length value
Parameters: creation New creation value
Parameters: creationDate New creation date
Parameters: lastModified New last modified value
Deprecated:
Set last modified date.Parameters: lastModified New last modified date value
Parameters: lastModifiedDate New last modified date
Parameters: lastModifiedHttp The lastModifiedHttp to set.
Parameters: mimeType The mimeType to set.
Parameters: name New name value
Parameters: resourceType New resource type