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, setInvertpublic MediaTypeMatcher()
public MediaTypeMatcher(String mediaType)
mediaType - the media type.public int hashCode()
Filterpublic 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 FilterrequestContext - RequestContext for the current requestRegistryExceptionpublic boolean handlePut(RequestContext requestContext) throws RegistryException
handlePut in class FilterrequestContext - RequestContext for the current requestRegistryExceptionpublic boolean handleImportResource(RequestContext requestContext) throws RegistryException
handleImportResource in class FilterrequestContext - RequestContext for the current requestRegistryExceptionpublic boolean handleDelete(RequestContext requestContext) throws RegistryException
handleDelete in class FilterrequestContext - RequestContext for the current requestRegistryExceptionpublic boolean handleRemoveLink(RequestContext requestContext) throws RegistryException
handleRemoveLink in class FilterrequestContext - RequestContext for the current requestRegistryExceptionpublic boolean handleCreateLink(RequestContext requestContext) throws RegistryException
handleCreateLink in class FilterrequestContext - RequestContext for the current requestRegistryExceptionpublic boolean handleCopy(RequestContext requestContext) throws RegistryException
handleCopy in class FilterrequestContext - RequestContext for the current requestRegistryExceptionpublic boolean handleMove(RequestContext requestContext) throws RegistryException
handleMove in class FilterrequestContext - RequestContext for the current requestRegistryExceptionpublic boolean handleRename(RequestContext requestContext) throws RegistryException
handleRename in class FilterrequestContext - RequestContext for the current requestRegistryExceptionpublic boolean handleInvokeAspect(RequestContext requestContext) throws RegistryException
handleInvokeAspect in class FilterrequestContext - RequestContext for the current requestRegistryExceptionpublic boolean handlePutChild(RequestContext requestContext) throws RegistryException
handlePutChild in class FilterrequestContext - RequestContext for the current requestRegistryExceptionpublic boolean handleImportChild(RequestContext requestContext) throws RegistryException
handleImportChild in class FilterrequestContext - RequestContext for the current requestRegistryExceptionpublic String getMediaType()
public void setMediaType(String mediaType)
mediaType - the media type.Copyright © 2015 WSO2 Inc. All Rights Reserved.