public class ResourceAttributes
extends java.lang.Object
implements javax.naming.directory.Attributes
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALTERNATE_CONTENT_LENGTH
Content length.
|
static java.lang.String |
ALTERNATE_CREATION_DATE
Creation date.
|
static java.lang.String |
ALTERNATE_ETAG
ETag.
|
static java.lang.String |
ALTERNATE_LAST_MODIFIED
Last modification date.
|
static java.lang.String |
ALTERNATE_TYPE
Type.
|
protected javax.naming.directory.Attributes |
attributes
External attributes.
|
protected boolean |
collection
Collection flag.
|
static java.lang.String |
COLLECTION_TYPE
Collection type.
|
static java.lang.String |
CONTENT_LENGTH
Content length.
|
static java.lang.String |
CONTENT_TYPE
MIME type of the content.
|
protected long |
contentLength
Content length.
|
protected long |
creation
Creation time.
|
static java.lang.String |
CREATION_DATE
Creation date.
|
protected java.util.Date |
creationDate
Creation date.
|
static java.lang.String |
ETAG
ETag.
|
protected static java.text.SimpleDateFormat |
format
HTTP date format.
|
protected static java.text.SimpleDateFormat[] |
formats
Date formats using for Date parsing.
|
protected static java.util.TimeZone |
gmtZone |
static java.lang.String |
LAST_MODIFIED
Last modification date.
|
protected long |
lastModified
Last modified time.
|
protected java.util.Date |
lastModifiedDate
Last modified date.
|
protected java.lang.String |
lastModifiedHttp
Last modified date in HTTP format.
|
protected java.lang.String |
mimeType
MIME type.
|
protected java.lang.String |
name
Name.
|
static java.lang.String |
NAME
Name.
|
protected java.lang.String |
strongETag
Strong ETag.
|
static java.lang.String |
TYPE
Type.
|
protected java.lang.String |
weakETag
Weak ETag.
|
Constructor and Description |
---|
ResourceAttributes()
Default constructor.
|
ResourceAttributes(javax.naming.directory.Attributes attributes)
Merges with another attribute set.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clone the attributes object (WARNING: fake cloning).
|
javax.naming.directory.Attribute |
get(java.lang.String attrID)
Get attribute.
|
javax.naming.NamingEnumeration<? extends javax.naming.directory.Attribute> |
getAll()
Get all attributes.
|
java.lang.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.
|
java.util.Date |
getCreationDate()
Get creation date.
|
java.lang.String |
getETag()
Get ETag.
|
javax.naming.NamingEnumeration<java.lang.String> |
getIDs()
Get all attribute IDs.
|
long |
getLastModified()
Get last modified time.
|
java.util.Date |
getLastModifiedDate()
Get lastModified date.
|
java.lang.String |
getLastModifiedHttp() |
java.lang.String |
getMimeType() |
java.lang.String |
getName()
Get name.
|
java.lang.String |
getResourceType()
Get resource type.
|
boolean |
isCaseIgnored()
Case sensitivity.
|
boolean |
isCollection()
Is collection.
|
javax.naming.directory.Attribute |
put(javax.naming.directory.Attribute attribute)
Put attribute.
|
javax.naming.directory.Attribute |
put(java.lang.String attrID,
java.lang.Object val)
Put attribute.
|
javax.naming.directory.Attribute |
remove(java.lang.String attrID)
Remove attribute.
|
void |
setCollection(boolean collection)
Set collection flag.
|
void |
setContentLength(long contentLength)
Set content length.
|
void |
setCreation(long creation)
Deprecated.
- unused
|
void |
setCreationDate(java.util.Date creationDate)
Creation date mutator.
|
void |
setETag(java.lang.String eTag)
Set strong ETag.
|
void |
setLastModified(long lastModified)
Set last modified.
|
void |
setLastModifiedDate(java.util.Date lastModifiedDate)
Deprecated.
- unused
|
void |
setLastModifiedHttp(java.lang.String lastModifiedHttp)
Deprecated.
- unused
|
void |
setMimeType(java.lang.String mimeType) |
void |
setName(java.lang.String name)
Set name.
|
void |
setResourceType(java.lang.String resourceType)
Type mutator.
|
int |
size()
Retrieves the number of attributes in the attribute set.
|
public static final java.lang.String CREATION_DATE
public static final java.lang.String ALTERNATE_CREATION_DATE
public static final java.lang.String LAST_MODIFIED
public static final java.lang.String ALTERNATE_LAST_MODIFIED
public static final java.lang.String NAME
public static final java.lang.String TYPE
public static final java.lang.String ALTERNATE_TYPE
public static final java.lang.String CONTENT_TYPE
public static final java.lang.String CONTENT_LENGTH
public static final java.lang.String ALTERNATE_CONTENT_LENGTH
public static final java.lang.String ETAG
public static final java.lang.String ALTERNATE_ETAG
public static final java.lang.String COLLECTION_TYPE
protected static final java.text.SimpleDateFormat format
protected static final java.text.SimpleDateFormat[] formats
protected static final java.util.TimeZone gmtZone
protected boolean collection
protected long contentLength
protected long creation
protected java.util.Date creationDate
protected long lastModified
protected java.util.Date lastModifiedDate
protected java.lang.String lastModifiedHttp
protected java.lang.String mimeType
protected java.lang.String name
protected java.lang.String weakETag
protected java.lang.String strongETag
protected javax.naming.directory.Attributes attributes
public ResourceAttributes()
public ResourceAttributes(javax.naming.directory.Attributes attributes)
public boolean isCollection()
public void setCollection(boolean collection)
collection
- New flag valuepublic long getContentLength()
public void setContentLength(long contentLength)
contentLength
- New content length valuepublic long getCreation()
@Deprecated public void setCreation(long creation)
creation
- New creation valuepublic java.util.Date getCreationDate()
public void setCreationDate(java.util.Date creationDate)
creationDate
- New creation datepublic long getLastModified()
public void setLastModified(long lastModified)
lastModified
- New last modified valuepublic java.util.Date getLastModifiedDate()
@Deprecated public void setLastModifiedDate(java.util.Date lastModifiedDate)
lastModifiedDate
- New last modified datepublic java.lang.String getLastModifiedHttp()
@Deprecated public void setLastModifiedHttp(java.lang.String lastModifiedHttp)
lastModifiedHttp
- The lastModifiedHttp to set.public java.lang.String getMimeType()
public void setMimeType(java.lang.String mimeType)
mimeType
- The mimeType to set.public java.lang.String getName()
public void setName(java.lang.String name)
name
- New name valuepublic java.lang.String getResourceType()
public void setResourceType(java.lang.String resourceType)
resourceType
- New resource typepublic java.lang.String getETag()
public void setETag(java.lang.String eTag)
public java.lang.String getCanonicalPath()
public javax.naming.directory.Attribute get(java.lang.String attrID)
get
in interface javax.naming.directory.Attributes
public javax.naming.directory.Attribute put(javax.naming.directory.Attribute attribute)
put
in interface javax.naming.directory.Attributes
public javax.naming.directory.Attribute put(java.lang.String attrID, java.lang.Object val)
put
in interface javax.naming.directory.Attributes
public javax.naming.directory.Attribute remove(java.lang.String attrID)
remove
in interface javax.naming.directory.Attributes
public javax.naming.NamingEnumeration<? extends javax.naming.directory.Attribute> getAll()
getAll
in interface javax.naming.directory.Attributes
public javax.naming.NamingEnumeration<java.lang.String> getIDs()
getIDs
in interface javax.naming.directory.Attributes
public int size()
size
in interface javax.naming.directory.Attributes
public java.lang.Object clone()
clone
in interface javax.naming.directory.Attributes
clone
in class java.lang.Object
public boolean isCaseIgnored()
isCaseIgnored
in interface javax.naming.directory.Attributes
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.