org.wso2.registry.jdbc.handlers.filters
Class MediaTypeMatcher

java.lang.Object
  extended by org.wso2.registry.jdbc.handlers.filters.Filter
      extended by org.wso2.registry.jdbc.handlers.filters.MediaTypeMatcher

public class MediaTypeMatcher
extends Filter


Field Summary
 
Fields inherited from class org.wso2.registry.jdbc.handlers.filters.Filter
DELETE, GET, IMPORT, IMPORT_CHILD, PUT, PUT_CHILD
 
Constructor Summary
MediaTypeMatcher()
           
MediaTypeMatcher(java.lang.String mediaType)
           
 
Method Summary
 java.lang.String getMediaType()
           
 boolean handleDelete(RequestContext requestContext)
          Determines whether the associating handler should handle the delete action.
 boolean handleGet(RequestContext requestContext)
          Matches if the media type of the current resource is equal to the handler's media type.
 boolean handleImportChild(RequestContext requestContext)
          Determines whether the associating handler should handle the importChild action.
 boolean handleImportResource(RequestContext requestContext)
          Determines whether the associating handler should handle the import resource action.
 boolean handlePut(RequestContext requestContext)
          Determines whether the associating handler should handle the put action.
 boolean handlePutChild(RequestContext requestContext)
          Matches if the media type of the parent collection of the current resource is equal to the handler's media type.
 void setMediaType(java.lang.String mediaType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediaTypeMatcher

public MediaTypeMatcher()

MediaTypeMatcher

public MediaTypeMatcher(java.lang.String mediaType)
Method Detail

handleGet

public boolean handleGet(RequestContext requestContext)
                  throws RegistryException
Matches if the media type of the current resource is equal to the handler's media type.

Specified by:
handleGet in class Filter
Parameters:
requestContext - RequestContext for the current request
Returns:
true if the media type of the current resource is equal to the handler's media type.
Throws:
RegistryException

handlePut

public boolean handlePut(RequestContext requestContext)
                  throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the put action.

Specified by:
handlePut in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter impls should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleImportResource

public boolean handleImportResource(RequestContext requestContext)
                             throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the import resource action.

Specified by:
handleImportResource in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter impls should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleDelete

public boolean handleDelete(RequestContext requestContext)
                     throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the delete action.

Specified by:
handleDelete in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter impls should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handlePutChild

public boolean handlePutChild(RequestContext requestContext)
                       throws RegistryException
Matches if the media type of the parent collection of the current resource is equal to the handler's media type.

Specified by:
handlePutChild in class Filter
Parameters:
requestContext - RequestContext for the current request
Returns:
true if the media type of the parent collection of the current resource is equal to the handler's media type.
Throws:
RegistryException

handleImportChild

public boolean handleImportChild(RequestContext requestContext)
                          throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the importChild action.

Specified by:
handleImportChild in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter impls should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

getMediaType

public java.lang.String getMediaType()

setMediaType

public void setMediaType(java.lang.String mediaType)


Copyright © 2007 Apache Web Services Project. All Rights Reserved.