org.wso2.carbon.registry.core.jdbc.handlers.builtin
Class RegexBaseRestrictionHandler
java.lang.Object
org.wso2.carbon.registry.core.jdbc.handlers.Handler
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.
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 |
RegexBaseRestrictionHandler
public RegexBaseRestrictionHandler()
RegexBaseRestrictionHandler
public RegexBaseRestrictionHandler(Set<String> regexPatterns)
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 © 2012 WSO2 Inc. All Rights Reserved.