Package com.netscape.certsrv.pattern
Class Pattern
java.lang.Object
com.netscape.certsrv.pattern.Pattern
This is a generic pattern subtitution engine. The
pattern format should be:
$[attribute set key].[attribute name]$
For example,
$request.requestor_email$ $ctx.user_id$
- Version:
- $Revision$, $Date$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsubstitute
(AttrSetCollection attrSetCollection) Subtitutes this pattern with the given attribute set.substitute
(String key, IAttrSet attrSet) Subtitutes this pattern with the given attribute set.substitute2
(String key, IAttrSet attrSet) Subtitutes this pattern with the given attribute set.
-
Constructor Details
-
Pattern
Constructs a pattern object with the given string.- Parameters:
s
- string with pattern (i.e. $request.requestor_email$)
-
-
Method Details
-
substitute
Subtitutes this pattern with the given attribute set.- Parameters:
key
- key name of the given attribute setattrSet
- attribute set- Returns:
- substituted string
-
substitute
Subtitutes this pattern with the given attribute set.- Parameters:
attrSetCollection
- attribute set collection- Returns:
- substituted string
-
substitute2
Subtitutes this pattern with the given attribute set. This is an extended version of the substitute() method. It takes a more flexible pattern format that could have non-token ($...$) format. e.g. $request.screenname$@redhat.com where "@redhat.com" is not in token pattern format, and will be literally put in place. e.g. TomRiddle@redhat.com- Parameters:
key
- key name of the given attribute setattrSet
- attribute set- Returns:
- substituted string
-