|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.registry.jdbc.handlers.filters.Filter
org.wso2.registry.jdbc.handlers.filters.MediaTypeMatcher
public class MediaTypeMatcher
This is a built-in Filter implementation that evaluates against the media type of the resources. This has to be initialized with a media type. For all filtering methods, this will evaluates to true if the media type of the currently processing resource (or the parent of the current resource in some cases) and the media type of this implementation are equal. Handler authors can use this as the filter, if the filtering requirement is only to match the media type of the resource.
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)
Matches if the media type of the current resource is equal to the handler's media type. |
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)
Matches if the media type of the parent collection of the current resource is equal to the handler's media type. |
boolean |
handleImportResource(RequestContext requestContext)
Matches if the media type of the current resource is equal to the handler's media type. |
boolean |
handlePut(RequestContext requestContext)
Matches if the media type of the current resource is equal to the handler's media type. |
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 |
---|
public MediaTypeMatcher()
public MediaTypeMatcher(java.lang.String mediaType)
Method Detail |
---|
public boolean handleGet(RequestContext requestContext) throws RegistryException
handleGet
in class Filter
requestContext
- RequestContext for the current request
RegistryException
public boolean handlePut(RequestContext requestContext) throws RegistryException
handlePut
in class Filter
requestContext
- RequestContext for the current request
RegistryException
public boolean handleImportResource(RequestContext requestContext) throws RegistryException
handleImportResource
in class Filter
requestContext
- RequestContext for the current request
RegistryException
public boolean handleDelete(RequestContext requestContext) throws RegistryException
handleDelete
in class Filter
requestContext
- RequestContext for the current request
RegistryException
public boolean handlePutChild(RequestContext requestContext) throws RegistryException
handlePutChild
in class Filter
requestContext
- RequestContext for the current request
RegistryException
public boolean handleImportChild(RequestContext requestContext) throws RegistryException
handleImportChild
in class Filter
requestContext
- RequestContext for the current request
RegistryException
public java.lang.String getMediaType()
public void setMediaType(java.lang.String mediaType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |