org.wso2.carbon.registry.core.jdbc.handlers.builtin
Class RegexBaseRestrictionHandler

java.lang.Object
  extended by org.wso2.carbon.registry.core.jdbc.handlers.Handler
      extended by org.wso2.carbon.registry.core.jdbc.handlers.builtin.RegexBaseRestrictionHandler

public class RegexBaseRestrictionHandler
extends Handler

RegexBaseRestrictionHandler is used to restrict certain operations such as move, rename performing against certain resources. These restrictions are applied on the candidate resources by providing them in the form of regular expressions.


Constructor Summary
RegexBaseRestrictionHandler()
           
RegexBaseRestrictionHandler(Set<String> regexPatterns)
           
 
Method Summary
 void addRegExPattern(String regExPattern)
           
 String move(RequestContext requestContext)
          Move a resource in the registry.
 String rename(RequestContext requestContext)
          Rename a resource in the registry.
 
Methods inherited from class org.wso2.carbon.registry.core.jdbc.handlers.Handler
addAssociation, addComment, applyTag, copy, createLink, createVersion, delete, dump, editComment, equals, executeQuery, get, getAllAssociations, getAssociations, getAverageRating, getComments, getRating, getRegistryContext, getResourcePathsWithTag, getTags, getVersions, hashCode, importChild, importResource, invokeAspect, put, putChild, rateResource, removeAssociation, removeComment, removeLink, removeTag, resourceExists, restore, restoreVersion, searchContent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexBaseRestrictionHandler

public RegexBaseRestrictionHandler()

RegexBaseRestrictionHandler

public RegexBaseRestrictionHandler(Set<String> regexPatterns)
Method Detail

addRegExPattern

public void addRegExPattern(String regExPattern)

move

public String move(RequestContext requestContext)
            throws RegistryException
Description copied from class: Handler
Move a resource in the registry. This is equivalent to 1) delete the resource, then 2) add the resource to the new location. The operation is atomic, so if it fails the old resource will still be there.

Overrides:
move in class Handler
Parameters:
requestContext - Information about the current request.

requestContext.sourcePath: Source/Current Path

requestContext.targetPath: Destination/New Path

Returns:
the actual path for the new resource if the handler processed the MOVE action successfully.
Throws:
RegistryException - if something went wrong

rename

public String rename(RequestContext requestContext)
              throws RegistryException
Description copied from class: Handler
Rename a resource in the registry. This is equivalent to 1) delete the resource, then 2) add the resource to the new location. The operation is atomic, so if it fails the old resource will still be there.

Overrides:
rename in class Handler
Parameters:
requestContext - Information about the current request.

requestContext.sourcePath: Source/Current Path

requestContext.targetPath: Destination/New Path

Returns:
the actual path for the new resource if the handler processed the RENAME action successfully.
Throws:
RegistryException - if something went wrong


Copyright © 2011 WSO2 Inc. All Rights Reserved.