|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.registry.core.jdbc.handlers.Handler
org.wso2.carbon.registry.core.jdbc.handlers.builtin.SimulationHandler
public class SimulationHandler
This handler is used to capture results after a handler simulation has taken place. The simulation handler is a reporting handler that runs in the reporting handler lifecycle phase. Handler simulation is useful to debug and also to identify the various operations that take place during the execution of the various handlers for a particular operation.
| Constructor Summary | |
|---|---|
SimulationHandler()
|
|
| Method Summary | |
|---|---|
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 |
createLink(RequestContext requestContext)
Create a symbolic link or mount a registry. |
void |
createVersion(RequestContext requestContext)
Gets called when creating a version. |
void |
delete(RequestContext requestContext)
Processes the DELETE action of the media type. |
void |
dump(RequestContext requestContext)
Gets called when dumping an path |
void |
editComment(RequestContext requestContext)
Gets called when editing a comment. |
Collection |
executeQuery(RequestContext requestContext)
Gets called when executing Queries. |
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. |
int |
getRating(RequestContext requestContext)
Gets called when getting a rating given by a specific user. |
TaggedResourcePath[] |
getResourcePathsWithTag(RequestContext requestContext)
Gets called when getting the resource paths corresponding to the given tag. |
static Map<String,List<String[]>> |
getStatus()
Method to obtain the simulation status |
Tag[] |
getTags(RequestContext requestContext)
Gets called when getting tags. |
String[] |
getVersions(RequestContext requestContext)
Gets called when getting versions. |
void |
importChild(RequestContext requestContext)
Invokes when a child resource is imported. |
void |
importResource(RequestContext requestContext)
Creates a resource in the given path by fetching the resource content from the given URL. |
void |
invokeAspect(RequestContext requestContext)
Gets called when an Associated Aspect gets invoked. |
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 |
removeComment(RequestContext requestContext)
Gets called when removing a comment. |
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 |
restore(RequestContext requestContext)
Gets called when restoring a path |
void |
restoreVersion(RequestContext requestContext)
Gets called when restoring a version. |
Collection |
searchContent(RequestContext requestContext)
Gets called when searching for content. |
| Methods inherited from class org.wso2.carbon.registry.core.jdbc.handlers.Handler |
|---|
equals, getRegistryContext, hashCode, putChild |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimulationHandler()
| Method Detail |
|---|
public static Map<String,List<String[]>> getStatus()
public Resource get(RequestContext requestContext)
throws RegistryException
Handler
get in class HandlerrequestContext - 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 error
public void put(RequestContext requestContext)
throws RegistryException
Handler
put in class HandlerrequestContext - Information about the current request.
requestContext.resourcePath: Path to put the resource.
requestContext.resource: Resource to put
RegistryException - If the media type handler is supposed to handle the put on the
media type and if the put fails due a handler specific error
public void importResource(RequestContext requestContext)
throws RegistryException
Handler
importResource in class HandlerrequestContext - 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 error
public String move(RequestContext requestContext)
throws RegistryException
Handler
move in class HandlerrequestContext - Information about the current request.
requestContext.sourcePath: Source/Current Path
requestContext.targetPath: Destination/New Path
RegistryException - if something went wrong
public String copy(RequestContext requestContext)
throws RegistryException
Handler
copy in class HandlerrequestContext - Information about the current request.
requestContext.sourcePath: Source/Current Path
requestContext.targetPath: Destination/New Path
RegistryException - if something went wrong
public String rename(RequestContext requestContext)
throws RegistryException
Handler
rename in class HandlerrequestContext - Information about the current request.
requestContext.sourcePath: Source/Current Path
requestContext.targetPath: Destination/New Path
RegistryException - if something went wrong
public void createLink(RequestContext requestContext)
throws RegistryException
Handler
createLink in class HandlerrequestContext - Information about the current request.
requestContext.targetPath: Destination/New Path
RegistryException - if something went wrong
public void removeLink(RequestContext requestContext)
throws RegistryException
Handler
removeLink in class HandlerrequestContext - Information about the current request.
RegistryException - if something went wrong
public void delete(RequestContext requestContext)
throws RegistryException
Handler
delete in class HandlerrequestContext - 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 error
public void importChild(RequestContext requestContext)
throws RegistryException
Handler
importChild in class HandlerrequestContext - requestContext.resourcePath
RegistryException - If the media type handler is supposed to handle the importChild on
the media type and if the importChild fails due a handler specific
error
public void invokeAspect(RequestContext requestContext)
throws RegistryException
Handler
invokeAspect in class HandlerrequestContext - requestContext.resourcePath: path of the resource.
requestContext.aspect: The Aspect to be invoked requestContext.action:
The action to be provided when invoking the Aspect
RegistryException - If the media type handler is supposed to handle the invokeAspect on
the media type and if the invokeAspect fails due a handler specific
error
public void addAssociation(RequestContext requestContext)
throws RegistryException
Handler
addAssociation in class HandlerrequestContext - Information about the current request. requestContext.sourcePath:
Source/Current Path requestContext.targetPath: Destination/New Path
requestContext.associationType: Type of Association
RegistryException - If the media type handler is supposed to handle the addAssociation
on the media type and if the addAssociation fails due a handler
specific error
public void removeAssociation(RequestContext requestContext)
throws RegistryException
Handler
removeAssociation in class HandlerrequestContext - Information about the current request. requestContext.sourcePath:
Source/Current Path requestContext.targetPath: Destination/New Path
requestContext.associationType: Type of Association
RegistryException - If the media type handler is supposed to handle the
removeAssociation on the media type and if the removeAssociation
fails due a handler specific error
public Association[] getAllAssociations(RequestContext requestContext)
throws RegistryException
Handler
getAllAssociations in class HandlerrequestContext - Information about the current request. requestContext.resourcePath:
Path of Resource
RegistryException - If the media type handler is supposed to handle the
getAllAssociations on the media type and if the getAllAssociations
fails due a handler specific error
public Association[] getAssociations(RequestContext requestContext)
throws RegistryException
Handler
getAssociations in class HandlerrequestContext - Information about the current request. requestContext.resourcePath:
Path of Resource requestContext.associationType: Type of Association
RegistryException - If the media type handler is supposed to handle the getAssociations
on the media type and if the getAssociations fails due a handler
specific error
public void applyTag(RequestContext requestContext)
throws RegistryException
Handler
applyTag in class HandlerrequestContext - Information about the current request. requestContext.resourcePath:
Path of Resource requestContext.tag: Tag
RegistryException - If the media type handler is supposed to handle the applyTag on the
media type and if the applyTag fails due a handler specific error
public void removeTag(RequestContext requestContext)
throws RegistryException
Handler
removeTag in class HandlerrequestContext - Information about the current request. requestContext.resourcePath:
Path of Resource requestContext.tag: Tag
RegistryException - If the media type handler is supposed to handle the removeTag on
the media type and if the removeTag fails due a handler specific
error
public void rateResource(RequestContext requestContext)
throws RegistryException
Handler
rateResource in class HandlerrequestContext - Information about the current request. requestContext.resourcePath:
Path of Resource requestContext.rating: Rating
RegistryException - If the media type handler is supposed to handle the rateResource on
the media type and if the rateResource fails due a handler specific
error
public void restoreVersion(RequestContext requestContext)
throws RegistryException
Handler
restoreVersion in class HandlerrequestContext - Information about the current request. requestContext.versionPath: Path
of Resource with version This can be used to derive the path of the
resource as well.
RegistryException - If the media type handler is supposed to handle the restoreVersion
on the media type and if the restoreVersion fails due a handler
specific error
public void createVersion(RequestContext requestContext)
throws RegistryException
Handler
createVersion in class HandlerrequestContext - Information about the current request. requestContext.resourcePath:
Path of Resource
RegistryException - If the media type handler is supposed to handle the createVersion
on the media type and if the createVersion fails due a handler
specific error
public void editComment(RequestContext requestContext)
throws RegistryException
Handler
editComment in class HandlerrequestContext - Information about the current request. requestContext.comment: The
comment with associated modifications.
RegistryException - If the media type handler is supposed to handle the editComment on
the media type and if the editComment fails due a handler specific
error
public void removeComment(RequestContext requestContext)
throws RegistryException
Handler
removeComment in class HandlerrequestContext - Information about the current request. requestContext.resourcePath:
Path of Resource requestContext.comment: The comment to remove
RegistryException - If the media type handler is supposed to handle the addComment on
the media type and if the addComment fails due a handler specific
error
public String addComment(RequestContext requestContext)
throws RegistryException
Handler
addComment in class HandlerrequestContext - Information about the current request. requestContext.resourcePath:
Path of Resource requestContext.comment: The comment to add
RegistryException - If the media type handler is supposed to handle the addComment on
the media type and if the addComment fails due a handler specific
error
public Comment[] getComments(RequestContext requestContext)
throws RegistryException
Handler
getComments in class HandlerrequestContext - Information about the current request. requestContext.resourcePath:
Path of Resource
RegistryException - If the media type handler is supposed to handle the getComments on
the media type and if the getComments fails due a handler specific
error
public float getAverageRating(RequestContext requestContext)
throws RegistryException
Handler
getAverageRating in class HandlerrequestContext - Information about the current request. requestContext.resourcePath:
Path of Resource
RegistryException - If the media type handler is supposed to handle the
getAverageRating on the media type and if the getAverageRating
fails due a handler specific error
public int getRating(RequestContext requestContext)
throws RegistryException
Handler
getRating in class HandlerrequestContext - Information about the current request. requestContext.resourcePath:
Path of Resource requestContext.userName: The name of the user
RegistryException - If the media type handler is supposed to handle the getRating on
the media type and if the getRating fails due a handler specific
error
public String[] getVersions(RequestContext requestContext)
throws RegistryException
Handler
getVersions in class HandlerrequestContext - Information about the current request. requestContext.resourcePath:
Path of Resource
RegistryException - If the media type handler is supposed to handle the getVersions on
the media type and if the getVersions fails due a handler specific
error
public Tag[] getTags(RequestContext requestContext)
throws RegistryException
Handler
getTags in class HandlerrequestContext - Information about the current request. requestContext.resourcePath:
Path of Resource
RegistryException - If the media type handler is supposed to handle the getTags on the
media type and if the getTags fails due a handler specific error
public TaggedResourcePath[] getResourcePathsWithTag(RequestContext requestContext)
throws RegistryException
Handler
getResourcePathsWithTag in class HandlerrequestContext - Information about the current request. requestContext.tag: Tag
RegistryException - If the media type handler is supposed to handle the
getResourcePathsWithTag on the media type and if the
getResourcePathsWithTag fails due a handler specific error
public Collection executeQuery(RequestContext requestContext)
throws RegistryException
Handler
executeQuery in class HandlerrequestContext - Information about the current request. requestContext.resourcePath:
Path of Resource requestContext.queryParameters: Map of query
parameters.
RegistryException - If the media type handler is supposed to handle the executeQuery on
the media type and if the executeQuery fails due a handler specific
error
public Collection searchContent(RequestContext requestContext)
throws RegistryException
Handler
searchContent in class HandlerrequestContext - Information about the current request. requestContext.keywords: Search
keywords.
RegistryException - If the media type handler is supposed to handle the searchContent
on the media type and if the searchContent fails due a handler
specific error
public boolean resourceExists(RequestContext requestContext)
throws RegistryException
Handler
resourceExists in class HandlerrequestContext - 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 error
public void dump(RequestContext requestContext)
throws RegistryException
Handler
dump in class HandlerrequestContext - Information about the current request. requestContext.keywords: Search
keywords.
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 error
public void restore(RequestContext requestContext)
throws RegistryException
Handler
restore in class HandlerrequestContext - Information about the current request. requestContext.keywords: Search
keywords.
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 error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||