public class SymLinkHandler extends Handler
Constructor and Description |
---|
SymLinkHandler() |
Modifier and Type | Method and Description |
---|---|
void |
addAssociation(RequestContext requestContext)
Gets called when an Association is added.
|
String |
addComment(RequestContext requestContext)
Gets called when adding a comment.
|
void |
applyTag(RequestContext requestContext)
Gets called when a tag is applied.
|
String |
copy(RequestContext requestContext)
Copy a resource in the registry.
|
void |
delete(RequestContext requestContext)
Processes the DELETE action of the media type.
|
boolean |
equals(Object obj)
Revised implementation of the equals comparison to suite the modified hashCode method.
|
Resource |
get(RequestContext requestContext)
Processes the GET action for resource path of the requestContext.
|
Association[] |
getAllAssociations(RequestContext requestContext)
Gets called when getting all Associations.
|
Association[] |
getAssociations(RequestContext requestContext)
Gets called when getting Associations of given type.
|
float |
getAverageRating(RequestContext requestContext)
Gets called when getting average rating.
|
Comment[] |
getComments(RequestContext requestContext)
Gets called when retrieving comments.
|
String |
getMountPoint()
Method to remove an already mount point
|
int |
getRating(RequestContext requestContext)
Gets called when getting a rating given by a specific user.
|
static Set<SymLinkHandler> |
getSymLinkHandlers()
Return the sym-link handler set
|
Tag[] |
getTags(RequestContext requestContext)
Gets called when getting tags.
|
String |
getTargetPoint()
Method to get the target point
|
int |
hashCode()
This overrides the default hash code implementation for handler objects, to make sure that
each handler of the same type will have identical hash codes unless otherwise it has its own
extension.
|
void |
importResource(RequestContext requestContext)
Creates a resource in the given path by fetching the resource content from the given URL.
|
String |
move(RequestContext requestContext)
Move a resource in the registry.
|
void |
put(RequestContext requestContext)
Processes the PUT action.
|
void |
rateResource(RequestContext requestContext)
Gets called when rating a resource.
|
void |
removeAssociation(RequestContext requestContext)
Gets called when an Association is removed.
|
void |
removeLink(RequestContext requestContext)
Remove a symbolic link or un-mount a registry.
|
void |
removeTag(RequestContext requestContext)
Gets called when a tag is removed.
|
String |
rename(RequestContext requestContext)
Rename a resource in the registry.
|
boolean |
resourceExists(RequestContext requestContext)
Gets called when searching for existence of resource.
|
void |
setAuthor(String author)
Method to set the author
|
void |
setMountPoint(String mountPoint)
Method to set the mount point
|
void |
setTargetPoint(String targetPoint)
Method to set the target point
|
createLink, createVersion, dump, dumpLite, editComment, executeQuery, getRegistryContext, getResourcePathsWithTag, getVersions, importChild, invokeAspect, putChild, removeComment, restore, restoreVersion, searchContent
public int hashCode()
Handler
public boolean equals(Object obj)
Handler
public void put(RequestContext requestContext) throws RegistryException
Handler
put
in class Handler
requestContext
- Information about the current request.
requestContext.resourcePath: Path to put the resource.
requestContext.resource: Resource to putRegistryException
- If the media type handler is supposed to handle the put on the
media type and if the put fails due a handler specific errorpublic boolean resourceExists(RequestContext requestContext) throws RegistryException
Handler
resourceExists
in class Handler
requestContext
- Information about the current request.RegistryException
- If the media type handler is supposed to handle the resourceExists
on the media type and if the resourceExists fails due a handler
specific errorpublic Resource get(RequestContext requestContext) throws RegistryException
Handler
get
in class Handler
requestContext
- Information about the current request.
requestContext.resourcePath: Path of the resource
requestContext.resource: Resource at the given path. This can be null
if no other handler has retrieved that resource so far. If it contains
a value, matching handlers are free to do any change to the resource,
even they can replace the resource with completely new instance.RegistryException
- If the media type handler is supposed to handle the get on the media type and if the
get fails due a handler specific errorpublic void delete(RequestContext requestContext) throws RegistryException
Handler
delete
in class Handler
requestContext
- Information about the current request.
requestContext.resourcePath: path of the resource to be deleted.RegistryException
- If the media type handler is supposed to handle the delete on the
media type and if the delete fails due a handler specific errorpublic String rename(RequestContext requestContext) throws RegistryException
Handler
rename
in class Handler
requestContext
- Information about the current request.
requestContext.sourcePath: Source/Current Path
requestContext.targetPath: Destination/New PathRegistryException
- if something went wrongpublic String move(RequestContext requestContext) throws RegistryException
Handler
move
in class Handler
requestContext
- Information about the current request.
requestContext.sourcePath: Source/Current Path
requestContext.targetPath: Destination/New PathRegistryException
- if something went wrongpublic String copy(RequestContext requestContext) throws RegistryException
Handler
copy
in class Handler
requestContext
- Information about the current request.
requestContext.sourcePath: Source/Current Path
requestContext.targetPath: Destination/New PathRegistryException
- if something went wrongpublic float getAverageRating(RequestContext requestContext) throws RegistryException
Handler
getAverageRating
in class Handler
requestContext
- Information about the current request. requestContext.resourcePath:
Path of ResourceRegistryException
- If the media type handler is supposed to handle the
getAverageRating on the media type and if the getAverageRating
fails due a handler specific errorpublic int getRating(RequestContext requestContext) throws RegistryException
Handler
getRating
in class Handler
requestContext
- Information about the current request. requestContext.resourcePath:
Path of Resource requestContext.userName: The name of the userRegistryException
- If the media type handler is supposed to handle the getRating on
the media type and if the getRating fails due a handler specific
errorpublic void rateResource(RequestContext requestContext) throws RegistryException
Handler
rateResource
in class Handler
requestContext
- Information about the current request. requestContext.resourcePath:
Path of Resource requestContext.rating: RatingRegistryException
- If the media type handler is supposed to handle the rateResource on
the media type and if the rateResource fails due a handler specific
errorpublic Comment[] getComments(RequestContext requestContext) throws RegistryException
Handler
getComments
in class Handler
requestContext
- Information about the current request. requestContext.resourcePath:
Path of ResourceRegistryException
- If the media type handler is supposed to handle the getComments on
the media type and if the getComments fails due a handler specific
errorpublic String addComment(RequestContext requestContext) throws RegistryException
Handler
addComment
in class Handler
requestContext
- Information about the current request. requestContext.resourcePath:
Path of Resource requestContext.comment: The comment to addRegistryException
- If the media type handler is supposed to handle the addComment on
the media type and if the addComment fails due a handler specific
errorpublic Tag[] getTags(RequestContext requestContext) throws RegistryException
Handler
getTags
in class Handler
requestContext
- Information about the current request. requestContext.resourcePath:
Path of ResourceRegistryException
- If the media type handler is supposed to handle the getTags on the
media type and if the getTags fails due a handler specific errorpublic void applyTag(RequestContext requestContext) throws RegistryException
Handler
applyTag
in class Handler
requestContext
- Information about the current request. requestContext.resourcePath:
Path of Resource requestContext.tag: TagRegistryException
- If the media type handler is supposed to handle the applyTag on the
media type and if the applyTag fails due a handler specific errorpublic Association[] getAllAssociations(RequestContext requestContext) throws RegistryException
Handler
getAllAssociations
in class Handler
requestContext
- Information about the current request. requestContext.resourcePath:
Path of ResourceRegistryException
- If the media type handler is supposed to handle the
getAllAssociations on the media type and if the getAllAssociations
fails due a handler specific errorpublic Association[] getAssociations(RequestContext requestContext) throws RegistryException
Handler
getAssociations
in class Handler
requestContext
- Information about the current request. requestContext.resourcePath:
Path of Resource requestContext.associationType: Type of AssociationRegistryException
- If the media type handler is supposed to handle the getAssociations
on the media type and if the getAssociations fails due a handler
specific errorpublic void addAssociation(RequestContext requestContext) throws RegistryException
Handler
addAssociation
in class Handler
requestContext
- Information about the current request. requestContext.sourcePath:
Source/Current Path requestContext.targetPath: Destination/New Path
requestContext.associationType: Type of AssociationRegistryException
- If the media type handler is supposed to handle the addAssociation
on the media type and if the addAssociation fails due a handler
specific errorpublic void importResource(RequestContext requestContext) throws RegistryException
Handler
importResource
in class Handler
requestContext
- Information about the current request.
requestContext.resourcePath: Path to add the new resource.
requestContext.sourceURL: URL to fetch the resource content
requestContext.resource: Resource instance containing the meta data for
the resource to be imported. Once import is done, new resource is
created combining the meta data of this meta data object and the
imported content.RegistryException
- If the media type handler is supposed to handle the import on the
media type and if the import fails due a handler specific errorpublic void removeLink(RequestContext requestContext)
Handler
removeLink
in class Handler
requestContext
- Information about the current request.public void setMountPoint(String mountPoint)
mountPoint
- the mount pointpublic String getMountPoint()
public void setTargetPoint(String targetPoint)
targetPoint
- the target pointpublic String getTargetPoint()
public void setAuthor(String author)
author
- the authorpublic static Set<SymLinkHandler> getSymLinkHandlers()
public void removeAssociation(RequestContext requestContext) throws RegistryException
Handler
removeAssociation
in class Handler
requestContext
- Information about the current request. requestContext.sourcePath:
Source/Current Path requestContext.targetPath: Destination/New Path
requestContext.associationType: Type of AssociationRegistryException
- If the media type handler is supposed to handle the
removeAssociation on the media type and if the removeAssociation
fails due a handler specific errorpublic void removeTag(RequestContext requestContext) throws RegistryException
Handler
removeTag
in class Handler
requestContext
- Information about the current request. requestContext.resourcePath:
Path of Resource requestContext.tag: TagRegistryException
- If the media type handler is supposed to handle the removeTag on
the media type and if the removeTag fails due a handler specific
errorCopyright © 2016 WSO2 Inc. All Rights Reserved.