public class MediaTypeMatcher extends Filter
ADD_ASSOCIATION, ADD_COMMENT, APPLY_TAG, COPY, CREATE_LINK, CREATE_VERSION, DELETE, DUMP, EDIT_COMMENT, EXECUTE_QUERY, GET, GET_ALL_ASSOCIATIONS, GET_ASSOCIATIONS, GET_AVERAGE_RATING, GET_COMMENTS, GET_RATING, GET_REGISTRY_CONTEXT, GET_RESOURCE_PATHS_WITH_TAG, GET_TAGS, GET_VERSIONS, IMPORT, IMPORT_CHILD, invert, INVOKE_ASPECT, MOVE, PUT, PUT_CHILD, RATE_RESOURCE, REMOVE_ASSOCIATION, REMOVE_COMMENT, REMOVE_LINK, REMOVE_TAG, RENAME, RESOURCE_EXISTS, RESTORE, RESTORE_VERSION, SEARCH_CONTENT
Constructor and Description |
---|
MediaTypeMatcher()
Default constructor.
|
MediaTypeMatcher(String mediaType)
Constructor that accepts a media type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Compares this MediaTypeMatcher to the specified object.
|
String |
getMediaType()
Method to obtain media type.
|
boolean |
handleCopy(RequestContext requestContext)
Matches if the media type of the current resource is equal to the handler's media type.
|
boolean |
handleCreateLink(RequestContext requestContext)
Matches if the media type of the current resource is equal to the handler's media type.
|
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 |
handleInvokeAspect(RequestContext requestContext)
Matches if the media type of the current resource is equal to the handler's media type.
|
boolean |
handleMove(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.
|
boolean |
handleRemoveLink(RequestContext requestContext)
Matches if the media type of the current resource is equal to the handler's media type.
|
boolean |
handleRename(RequestContext requestContext)
Matches if the media type of the current resource is equal to the handler's media type.
|
int |
hashCode()
This overrides the default hash code implementation for filter objects, to make sure that
each filter of the same type will have identical hash codes unless otherwise it has its own
extension.
|
void |
setMediaType(String mediaType)
Method to set media type.
|
getInvert, handleAddAssociation, handleAddComment, handleApplyTag, handleCreateVersion, handleDump, handleEditComment, handleExecuteQuery, handleGetAllAssociations, handleGetAssociations, handleGetAverageRating, handleGetComments, handleGetRating, handleGetRegistryContext, handleGetResourcePathsWithTag, handleGetTags, handleGetVersions, handleRateResource, handleRemoveAssociation, handleRemoveComment, handleRemoveTag, handleResourceExists, handleRestore, handleRestoreVersion, handleSearchContent, setInvert
public MediaTypeMatcher()
public MediaTypeMatcher(String mediaType)
mediaType
- the media type.public int hashCode()
Filter
public boolean equals(Object other)
true
if and
only if the argument is not null
and is a MediaTypeMatcher
object that
contains the same values for the fields as this object.public boolean handleGet(RequestContext requestContext) throws RegistryException
handleGet
in class Filter
requestContext
- RequestContext for the current requestRegistryException
public boolean handlePut(RequestContext requestContext) throws RegistryException
handlePut
in class Filter
requestContext
- RequestContext for the current requestRegistryException
public boolean handleImportResource(RequestContext requestContext) throws RegistryException
handleImportResource
in class Filter
requestContext
- RequestContext for the current requestRegistryException
public boolean handleDelete(RequestContext requestContext) throws RegistryException
handleDelete
in class Filter
requestContext
- RequestContext for the current requestRegistryException
public boolean handleRemoveLink(RequestContext requestContext) throws RegistryException
handleRemoveLink
in class Filter
requestContext
- RequestContext for the current requestRegistryException
public boolean handleCreateLink(RequestContext requestContext) throws RegistryException
handleCreateLink
in class Filter
requestContext
- RequestContext for the current requestRegistryException
public boolean handleCopy(RequestContext requestContext) throws RegistryException
handleCopy
in class Filter
requestContext
- RequestContext for the current requestRegistryException
public boolean handleMove(RequestContext requestContext) throws RegistryException
handleMove
in class Filter
requestContext
- RequestContext for the current requestRegistryException
public boolean handleRename(RequestContext requestContext) throws RegistryException
handleRename
in class Filter
requestContext
- RequestContext for the current requestRegistryException
public boolean handleInvokeAspect(RequestContext requestContext) throws RegistryException
handleInvokeAspect
in class Filter
requestContext
- RequestContext for the current requestRegistryException
public boolean handlePutChild(RequestContext requestContext) throws RegistryException
handlePutChild
in class Filter
requestContext
- RequestContext for the current requestRegistryException
public boolean handleImportChild(RequestContext requestContext) throws RegistryException
handleImportChild
in class Filter
requestContext
- RequestContext for the current requestRegistryException
public String getMediaType()
public void setMediaType(String mediaType)
mediaType
- the media type.Copyright © 2016 WSO2 Inc. All Rights Reserved.