org.wso2.carbon.registry.core.jdbc.handlers.filters
Class SimulationFilter

java.lang.Object
  extended by org.wso2.carbon.registry.core.jdbc.handlers.filters.Filter
      extended by org.wso2.carbon.registry.core.jdbc.handlers.filters.SimulationFilter

public class SimulationFilter
extends Filter

This is a built-in Filter that is used for simulation operations. The handler simulator uses an instance of this filter. When in simulation mode, this filter will run the associated simulation handler, and when not, the handler methods won't get called. The simulation mode can be set by accessing the instance of this Filter.


Field Summary
 
Fields inherited from class org.wso2.carbon.registry.core.jdbc.handlers.filters.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 Summary
SimulationFilter()
           
 
Method Summary
 boolean handleAddAssociation(RequestContext requestContext)
          Determines whether the associating handler should handle the addAssociation action.
 boolean handleAddComment(RequestContext requestContext)
          Determines whether the associating handler should handle the addComment action.
 boolean handleApplyTag(RequestContext requestContext)
          Determines whether the associating handler should handle the applyTag action.
 boolean handleCopy(RequestContext requestContext)
          Determines whether the associating handler should handle the copy action.
 boolean handleCreateLink(RequestContext requestContext)
          Determines whether the associating handler should handle the createLink action.
 boolean handleCreateVersion(RequestContext requestContext)
          Determines whether the associating handler should handle the createVersion action.
 boolean handleDelete(RequestContext requestContext)
          Determines whether the associating handler should handle the delete action.
 boolean handleDump(RequestContext requestContext)
          Determines whether the associating handler should handle the dump action.
 boolean handleEditComment(RequestContext requestContext)
          Determines whether the associating handler should handle the editComment action.
 boolean handleExecuteQuery(RequestContext requestContext)
          Determines whether the associating handler should handle the executeQuery action.
 boolean handleGet(RequestContext requestContext)
          Determines whether the associating handler should handle the get action.
 boolean handleGetAllAssociations(RequestContext requestContext)
          Determines whether the associating handler should handle the getAllAssociations action.
 boolean handleGetAssociations(RequestContext requestContext)
          Determines whether the associating handler should handle the getAssociations action.
 boolean handleGetAverageRating(RequestContext requestContext)
          Determines whether the associating handler should handle the getAverageRating action.
 boolean handleGetComments(RequestContext requestContext)
          Determines whether the associating handler should handle the getComments action.
 boolean handleGetRating(RequestContext requestContext)
          Determines whether the associating handler should handle the getRating action.
 boolean handleGetResourcePathsWithTag(RequestContext requestContext)
          Determines whether the associating handler should handle the getResourcePathsWithTag action.
 boolean handleGetTags(RequestContext requestContext)
          Determines whether the associating handler should handle the getTags action.
 boolean handleGetVersions(RequestContext requestContext)
          Determines whether the associating handler should handle the getVersions action.
 boolean handleImportChild(RequestContext requestContext)
          Determines whether the associating handler should handle the importChild action.
 boolean handleImportResource(RequestContext requestContext)
          Determines whether the associating handler should handle the import resource action.
 boolean handleInvokeAspect(RequestContext requestContext)
          Determines whether the associating handler should handle the invokeAspect action.
 boolean handleMove(RequestContext requestContext)
          Determines whether the associating handler should handle the move action.
 boolean handlePut(RequestContext requestContext)
          Determines whether the associating handler should handle the put action.
 boolean handlePutChild(RequestContext requestContext)
          Determines whether the associating handler should handle the putChild action.
 boolean handleRateResource(RequestContext requestContext)
          Determines whether the associating handler should handle the rateResource action.
 boolean handleRemoveAssociation(RequestContext requestContext)
          Determines whether the associating handler should handle the removeAssociation action.
 boolean handleRemoveComment(RequestContext requestContext)
          Determines whether the associating handler should handle the removeComment action.
 boolean handleRemoveLink(RequestContext requestContext)
          Determines whether the associating handler should handle the removeLink action.
 boolean handleRemoveTag(RequestContext requestContext)
          Determines whether the associating handler should handle the removeTag action.
 boolean handleRename(RequestContext requestContext)
          Determines whether the associating handler should handle the rename action.
 boolean handleResourceExists(RequestContext requestContext)
          Determines whether the associating handler should handle the resourceExists action.
 boolean handleRestore(RequestContext requestContext)
          Determines whether the associating handler should handle the restore action.
 boolean handleRestoreVersion(RequestContext requestContext)
          Determines whether the associating handler should handle the restoreVersion action.
 boolean handleSearchContent(RequestContext requestContext)
          Determines whether the associating handler should handle the searchContent action.
static Boolean isSimulation()
          Method to obtain whether in simulation mode or not.
static void setSimulation(Boolean input)
          Method to set whether in simulation mode or not.
 
Methods inherited from class org.wso2.carbon.registry.core.jdbc.handlers.filters.Filter
equals, getInvert, handleGetRegistryContext, hashCode, setInvert
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimulationFilter

public SimulationFilter()
Method Detail

isSimulation

public static Boolean isSimulation()
Method to obtain whether in simulation mode or not.

Returns:
whether in simulation mode or not.

setSimulation

public static void setSimulation(Boolean input)
Method to set whether in simulation mode or not.

Parameters:
input - whether in simulation mode or not.

handleGet

public boolean handleGet(RequestContext requestContext)
                  throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the get action.

Specified by:
handleGet in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handlePut

public boolean handlePut(RequestContext requestContext)
                  throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the put action.

Specified by:
handlePut in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleImportResource

public boolean handleImportResource(RequestContext requestContext)
                             throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the import resource action.

Specified by:
handleImportResource in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleDelete

public boolean handleDelete(RequestContext requestContext)
                     throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the delete action.

Specified by:
handleDelete in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handlePutChild

public boolean handlePutChild(RequestContext requestContext)
                       throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the putChild action. putChild action occurs when it is attempted to put a resource as a child of the resource referred by requestContext.parentPath or to the resource requestContext.parentCollection.

Specified by:
handlePutChild in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleImportChild

public boolean handleImportChild(RequestContext requestContext)
                          throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the importChild action.

Specified by:
handleImportChild in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleInvokeAspect

public boolean handleInvokeAspect(RequestContext requestContext)
                           throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the invokeAspect action.

Overrides:
handleInvokeAspect in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleMove

public boolean handleMove(RequestContext requestContext)
                   throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the move action.

Overrides:
handleMove in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleCopy

public boolean handleCopy(RequestContext requestContext)
                   throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the copy action.

Overrides:
handleCopy in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleRename

public boolean handleRename(RequestContext requestContext)
                     throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the rename action.

Overrides:
handleRename in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleCreateLink

public boolean handleCreateLink(RequestContext requestContext)
                         throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the createLink action.

Overrides:
handleCreateLink in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleRemoveLink

public boolean handleRemoveLink(RequestContext requestContext)
                         throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the removeLink action.

Overrides:
handleRemoveLink in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleAddAssociation

public boolean handleAddAssociation(RequestContext requestContext)
                             throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the addAssociation action.

Overrides:
handleAddAssociation in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleRemoveAssociation

public boolean handleRemoveAssociation(RequestContext requestContext)
                                throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the removeAssociation action.

Overrides:
handleRemoveAssociation in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleGetAllAssociations

public boolean handleGetAllAssociations(RequestContext requestContext)
                                 throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the getAllAssociations action.

Overrides:
handleGetAllAssociations in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleGetAssociations

public boolean handleGetAssociations(RequestContext requestContext)
                              throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the getAssociations action.

Overrides:
handleGetAssociations in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleApplyTag

public boolean handleApplyTag(RequestContext requestContext)
                       throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the applyTag action.

Overrides:
handleApplyTag in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleRemoveTag

public boolean handleRemoveTag(RequestContext requestContext)
                        throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the removeTag action.

Overrides:
handleRemoveTag in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleRateResource

public boolean handleRateResource(RequestContext requestContext)
                           throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the rateResource action.

Overrides:
handleRateResource in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleRestoreVersion

public boolean handleRestoreVersion(RequestContext requestContext)
                             throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the restoreVersion action.

Overrides:
handleRestoreVersion in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleCreateVersion

public boolean handleCreateVersion(RequestContext requestContext)
                            throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the createVersion action.

Overrides:
handleCreateVersion in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleEditComment

public boolean handleEditComment(RequestContext requestContext)
                          throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the editComment action.

Overrides:
handleEditComment in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleRemoveComment

public boolean handleRemoveComment(RequestContext requestContext)
                            throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the removeComment action.

Overrides:
handleRemoveComment in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleAddComment

public boolean handleAddComment(RequestContext requestContext)
                         throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the addComment action.

Overrides:
handleAddComment in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleGetComments

public boolean handleGetComments(RequestContext requestContext)
                          throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the getComments action.

Overrides:
handleGetComments in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleGetResourcePathsWithTag

public boolean handleGetResourcePathsWithTag(RequestContext requestContext)
                                      throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the getResourcePathsWithTag action.

Overrides:
handleGetResourcePathsWithTag in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleGetTags

public boolean handleGetTags(RequestContext requestContext)
                      throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the getTags action.

Overrides:
handleGetTags in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleGetAverageRating

public boolean handleGetAverageRating(RequestContext requestContext)
                               throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the getAverageRating action.

Overrides:
handleGetAverageRating in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleGetRating

public boolean handleGetRating(RequestContext requestContext)
                        throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the getRating action.

Overrides:
handleGetRating in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleGetVersions

public boolean handleGetVersions(RequestContext requestContext)
                          throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the getVersions action.

Overrides:
handleGetVersions in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleExecuteQuery

public boolean handleExecuteQuery(RequestContext requestContext)
                           throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the executeQuery action.

Overrides:
handleExecuteQuery in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleSearchContent

public boolean handleSearchContent(RequestContext requestContext)
                            throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the searchContent action.

Overrides:
handleSearchContent in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleResourceExists

public boolean handleResourceExists(RequestContext requestContext)
                             throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the resourceExists action.

Overrides:
handleResourceExists in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleDump

public boolean handleDump(RequestContext requestContext)
                   throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the dump action.

Overrides:
handleDump in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.

handleRestore

public boolean handleRestore(RequestContext requestContext)
                      throws RegistryException
Description copied from class: Filter
Determines whether the associating handler should handle the restore action.

Overrides:
handleRestore in class Filter
Parameters:
requestContext - Information about the current requestContext.
Returns:
true if the associating handler should handle the request. false otherwise.
Throws:
RegistryException - Filter implementations should deal with the specific exceptions and throw a RegistryException if the exception has to be propagated to the surface.


Copyright © 2014 WSO2 Inc. All Rights Reserved.