protected java.lang.String | extractUsingTemplate(java.lang.String templateStart, java.lang.String templateEnd, java.lang.String message)Extracts the constraint name based on a template (i.e., templateStartconstraintNametemplateEnd).
int templateStartPosition = message.indexOf( templateStart );
if ( templateStartPosition < 0 ) {
return null;
}
int start = templateStartPosition + templateStart.length();
int end = message.indexOf( templateEnd, start );
if ( end < 0 ) {
end = message.length();
}
return message.substring( start, end );
|