{
// System.out.println( "Processing group includes: '" + groups + "'\nExcludes: '" + excludedGroups + "'" );
try
{
AndGroupMatcher matcher = new AndGroupMatcher();
GroupMatcher in = null;
if ( groups != null && groups.trim().length() > 0 )
{
in = new GroupMatcherParser( groups ).parse();
}
if ( in != null )
{
matcher.addMatcher( in );
}
GroupMatcher ex = null;
if ( excludedGroups != null && excludedGroups.trim().length() > 0 )
{
ex = new GroupMatcherParser( excludedGroups ).parse();
}
if ( ex != null )
{
matcher.addMatcher( new InverseGroupMatcher( ex ) );
}
if ( in != null || ex != null )
{
// System.out.println( "Group matcher: " + matcher );