org.apache.naming.resources
Class ResourceAttributes

java.lang.Object
  |
  +--javax.naming.directory.BasicAttributes
        |
        +--org.apache.naming.resources.ResourceAttributes
All Implemented Interfaces:
javax.naming.directory.Attributes, java.lang.Cloneable, java.io.Serializable

public class ResourceAttributes
extends javax.naming.directory.BasicAttributes

Attributes implementation.

Version:
$Revision: 1.3 $
Author:
Remy Maucherat
See Also:
Serialized Form

Field Summary
static java.lang.String ALTERNATE_CONTENT_LENGTH
          Content length.
static java.lang.String ALTERNATE_CREATION_DATE
          Creation date.
static java.lang.String ALTERNATE_LAST_MODIFIED
          Last modification date.
static java.lang.String ALTERNATE_TYPE
          Type.
static java.lang.String COLLECTION_TYPE
          Collection type.
static java.lang.String CONTENT_LANGUAGE
          Content language.
static java.lang.String CONTENT_LENGTH
          Content length.
static java.lang.String CONTENT_TYPE
          MIME type of the content.
static java.lang.String CREATION_DATE
          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.
static java.lang.String LAST_MODIFIED
          Last modification date.
static java.lang.String NAME
          Name.
protected  java.util.Hashtable protectedAttributes
          Protected attributes.
static java.lang.String SOURCE
          Source.
static java.lang.String TYPE
          Type.
 
Constructor Summary
ResourceAttributes()
          Default constructor.
ResourceAttributes(javax.naming.directory.Attributes attributes)
          Merges with another attribute set.
 
Method Summary
 javax.naming.directory.Attribute get(java.lang.String attrID)
          Get attribute.
 javax.naming.NamingEnumeration getAll()
          Get all attributes.
 long getContentLength()
          Content length accessor.
 java.util.Date getCreationDate()
          Creation date accessor.
 javax.naming.NamingEnumeration getIDs()
          Get all attribute IDs.
 java.util.Date getLastModified()
          Last modified date accessor.
 java.lang.String getName()
          Name accessor.
protected  javax.naming.directory.Attribute getProtectedAttribute(java.lang.String name)
          Protected attribute accessor.
 java.lang.String getResourceType()
          Resource type accessor.
protected  void intializeAttributes()
          Initialize the set of protected attributes.
 boolean isCollection()
          Is collection.
 void setContentLength(long contentLength)
          Content length mutator.
 void setCreationDate(java.util.Date creationDate)
          Creation date mutator.
 void setLastModified(java.util.Date lastModified)
          Last modified mutator.
 void setName(java.lang.String name)
          Name mutator.
protected  void setProtectedAttribute(java.lang.String name, java.lang.Object value)
          Protected attribute mutator.
 void setResourceType(java.lang.String resourceType)
          Type mutator.
 int size()
          Retrieves the number of attributes in the attribute set.
 java.lang.String toString()
          Generates the string representation of this attribute set.
 
Methods inherited from class javax.naming.directory.BasicAttributes
clone, equals, hashCode, isCaseIgnored, put, put, remove
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CREATION_DATE

public static final java.lang.String CREATION_DATE
Creation date.

ALTERNATE_CREATION_DATE

public static final java.lang.String ALTERNATE_CREATION_DATE
Creation date.

LAST_MODIFIED

public static final java.lang.String LAST_MODIFIED
Last modification date.

ALTERNATE_LAST_MODIFIED

public static final java.lang.String ALTERNATE_LAST_MODIFIED
Last modification date.

NAME

public static final java.lang.String NAME
Name.

TYPE

public static final java.lang.String TYPE
Type.

ALTERNATE_TYPE

public static final java.lang.String ALTERNATE_TYPE
Type.

SOURCE

public static final java.lang.String SOURCE
Source.

CONTENT_TYPE

public static final java.lang.String CONTENT_TYPE
MIME type of the content.

CONTENT_LANGUAGE

public static final java.lang.String CONTENT_LANGUAGE
Content language.

CONTENT_LENGTH

public static final java.lang.String CONTENT_LENGTH
Content length.

ALTERNATE_CONTENT_LENGTH

public static final java.lang.String ALTERNATE_CONTENT_LENGTH
Content length.

ETAG

public static final java.lang.String ETAG
ETag.

COLLECTION_TYPE

public static final java.lang.String COLLECTION_TYPE
Collection type.

format

protected static final java.text.SimpleDateFormat format
HTTP date format.

formats

protected static final java.text.SimpleDateFormat[] formats
Date formats using for Date parsing.

protectedAttributes

protected java.util.Hashtable protectedAttributes
Protected attributes.
Constructor Detail

ResourceAttributes

public ResourceAttributes()
Default constructor.

ResourceAttributes

public ResourceAttributes(javax.naming.directory.Attributes attributes)
Merges with another attribute set.
Method Detail

getCreationDate

public java.util.Date getCreationDate()
Creation date accessor.
Returns:
Creation date

getLastModified

public java.util.Date getLastModified()
Last modified date accessor.
Returns:
Last modification date

getContentLength

public long getContentLength()
Content length accessor.
Returns:
String

isCollection

public boolean isCollection()
Is collection.

getName

public java.lang.String getName()
Name accessor.
Returns:
String name

getResourceType

public java.lang.String getResourceType()
Resource type accessor.
Returns:
String resource type

get

public javax.naming.directory.Attribute get(java.lang.String attrID)
Get attribute.
Overrides:
get in class javax.naming.directory.BasicAttributes

getAll

public javax.naming.NamingEnumeration getAll()
Get all attributes.
Overrides:
getAll in class javax.naming.directory.BasicAttributes

getIDs

public javax.naming.NamingEnumeration getIDs()
Get all attribute IDs.
Overrides:
getIDs in class javax.naming.directory.BasicAttributes

size

public int size()
Retrieves the number of attributes in the attribute set.
Overrides:
size in class javax.naming.directory.BasicAttributes

toString

public java.lang.String toString()
Generates the string representation of this attribute set. The string consists of each attribute identifier and the contents of each attribute. The contents of this string is useful for debugging and is not meant to be interpreted programmatically.
Overrides:
toString in class javax.naming.directory.BasicAttributes
Returns:
A non-null string listing the contents of this attribute set.

setCreationDate

public void setCreationDate(java.util.Date creationDate)
Creation date mutator.
Parameters:
creationDate - New creation date

setLastModified

public void setLastModified(java.util.Date lastModified)
Last modified mutator.
Parameters:
lastModified - New last modified date

setContentLength

public void setContentLength(long contentLength)
Content length mutator.
Parameters:
contentLength - New content length

setName

public void setName(java.lang.String name)
Name mutator.
Parameters:
name - New name

setResourceType

public void setResourceType(java.lang.String resourceType)
Type mutator.
Parameters:
resourceType - New resource type

setProtectedAttribute

protected void setProtectedAttribute(java.lang.String name,
                                     java.lang.Object value)
Protected attribute mutator.
Parameters:
name - Attribute name
value - Attribute value

getProtectedAttribute

protected javax.naming.directory.Attribute getProtectedAttribute(java.lang.String name)
Protected attribute accessor.
Parameters:
name - Attribute name

intializeAttributes

protected void intializeAttributes()
Initialize the set of protected attributes.


Copyright © 2000-2001 Apache Software Foundation. All Rights Reserved.