org.apache.jetspeed.capabilities.impl
Class MediaTypeImpl

java.lang.Object
  extended by org.apache.jetspeed.capabilities.impl.MediaTypeImpl
All Implemented Interfaces:
MediaType

public class MediaTypeImpl
extends java.lang.Object
implements MediaType

Default bean like implementation of MediaTypeEntry interface suitable for serializing with Castor

Version:
$Id: MediaTypeImpl.java 516448 2007-03-09 16:25:47Z ate $
Author:
Rapha?l Luta

Field Summary
protected  java.lang.String characterSet
           
 
Constructor Summary
MediaTypeImpl()
           
MediaTypeImpl(long id, java.lang.String name, int _hidden, java.lang.String mimeType, java.lang.String title, java.lang.String description, java.lang.String image, java.lang.String role)
           
 
Method Summary
 void addCapability(Capability capability)
          Add Capability to the Capability collection
 void addMimetype(MimeType mimeType)
          Add MimeType to the MimeType map
 boolean equals(java.lang.Object object)
          Implements the equals operation so that 2 elements are equal if all their member values are equal.
 java.util.Collection getCapabilities()
          Returns all supported capablities as CapabilityMap.
 java.lang.String getCharacterSet()
           
 java.lang.String getDescription()
          Get MediaType description
 int getMediatypeId()
          Get MediaType ID -- Return ID
 java.util.Collection getMimetypes()
          Returns all supported mimetypes as MimeTypeMap.
 java.lang.String getName()
          Get name ob MediaTypeEntry
 java.lang.String getTitle()
          Get Title of MediaType
 void removeMimetype(java.lang.String name)
          Removes the MimeType to the MimeType map
 void setCapabilities(java.util.Collection capabilities)
          Set the capabilities
 void setCharacterSet(java.lang.String charSet)
          Sets the character set associated with this MediaType
 void setDescription(java.lang.String desc)
          Set description of MediaType
 void setMediatypeId(int id)
          Set MediaType ID -- Assigns ID
 void setMimetypes(java.util.Collection mimetypes)
          Set mime types
 void setName(java.lang.String name)
          Set name ob MediaTypeEntry
 void setTitle(java.lang.String title)
          Set MediaType title
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

characterSet

protected java.lang.String characterSet
Constructor Detail

MediaTypeImpl

public MediaTypeImpl()

MediaTypeImpl

public MediaTypeImpl(long id,
                     java.lang.String name,
                     int _hidden,
                     java.lang.String mimeType,
                     java.lang.String title,
                     java.lang.String description,
                     java.lang.String image,
                     java.lang.String role)
Method Detail

equals

public boolean equals(java.lang.Object object)
Implements the equals operation so that 2 elements are equal if all their member values are equal.

Overrides:
equals in class java.lang.Object

getCharacterSet

public java.lang.String getCharacterSet()
Specified by:
getCharacterSet in interface MediaType
Returns:
the character set associated with this MediaType

setCharacterSet

public void setCharacterSet(java.lang.String charSet)
Sets the character set associated with this MediaType

Specified by:
setCharacterSet in interface MediaType

getCapabilities

public java.util.Collection getCapabilities()
Description copied from interface: MediaType
Returns all supported capablities as CapabilityMap. The CapabilityMap contains all capabilities in arbitrary order.

Specified by:
getCapabilities in interface MediaType
Returns:
a collection of capabilities

setCapabilities

public void setCapabilities(java.util.Collection capabilities)
Description copied from interface: MediaType
Set the capabilities

Specified by:
setCapabilities in interface MediaType

getMimetypes

public java.util.Collection getMimetypes()
Description copied from interface: MediaType
Returns all supported mimetypes as MimeTypeMap. The MimeTypeMap contains all mimetypes in decreasing order of importance.

Specified by:
getMimetypes in interface MediaType
Returns:
the MimeTypeMap
See Also:
MimeTypeMap

setMimetypes

public void setMimetypes(java.util.Collection mimetypes)
Description copied from interface: MediaType
Set mime types

Specified by:
setMimetypes in interface MediaType

addMimetype

public void addMimetype(MimeType mimeType)
Description copied from interface: MediaType
Add MimeType to the MimeType map

Specified by:
addMimetype in interface MediaType
Parameters:
mimeType - mimetype object to add

addCapability

public void addCapability(Capability capability)
Description copied from interface: MediaType
Add Capability to the Capability collection

Specified by:
addCapability in interface MediaType
Parameters:
capability - capability object to add

removeMimetype

public void removeMimetype(java.lang.String name)
Description copied from interface: MediaType
Removes the MimeType to the MimeType map

Specified by:
removeMimetype in interface MediaType
Parameters:
name - of MimeType to remove

setMediatypeId

public void setMediatypeId(int id)
Set MediaType ID -- Assigns ID

Specified by:
setMediatypeId in interface MediaType
Parameters:
id -

getMediatypeId

public int getMediatypeId()
Get MediaType ID -- Return ID

Specified by:
getMediatypeId in interface MediaType
Returns:
MediaTypeID

setName

public void setName(java.lang.String name)
Set name ob MediaTypeEntry

Specified by:
setName in interface MediaType
Parameters:
name - Name of MediaType

getName

public java.lang.String getName()
Get name ob MediaTypeEntry

Specified by:
getName in interface MediaType
Returns:
Name of MediaType

getTitle

public java.lang.String getTitle()
Description copied from interface: MediaType
Get Title of MediaType

Specified by:
getTitle in interface MediaType
Returns:
Title of MediaType

setTitle

public void setTitle(java.lang.String title)
Description copied from interface: MediaType
Set MediaType title

Specified by:
setTitle in interface MediaType

getDescription

public java.lang.String getDescription()
Description copied from interface: MediaType
Get MediaType description

Specified by:
getDescription in interface MediaType
Returns:
Returns description of MediaType

setDescription

public void setDescription(java.lang.String desc)
Description copied from interface: MediaType
Set description of MediaType

Specified by:
setDescription in interface MediaType
Parameters:
desc - Description string


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.