*/
public Iterator query( QueryLocator locator )
{
List list = new LinkedList();
Role role = locator.getRole();
Group group = locator.getGroup();
JetspeedUser user = locator.getUser();
// search thru anonymous directories?
int qm = locator.getQueryMode();
if ((qm & QueryLocator.QUERY_USER) == QueryLocator.QUERY_USER)
{
Profile profile = createProfile();
StringBuffer path = new StringBuffer();
path.append(PATH_USER);
String name = null;
int state = STATE_INIT;
if (null != user)
{
name = user.getUserName();
profile.setUser( user );
if (null != name)
{
path.append(File.separator).append(name);
state = STATE_BASE;
}
}
File base = this.rootDir;
File file = new File(base, path.toString());
String absPath = file.getAbsolutePath();
QueryState qs = new QueryState( QUERY_BY_USER,
profile,
locator,
list,
name,
state);
subQuery(qs, absPath);
}
if ((qm & QueryLocator.QUERY_ROLE) == QueryLocator.QUERY_ROLE)
{
Profile profile = createProfile();
StringBuffer path = new StringBuffer();
path.append(PATH_ROLE);
String name = null;
int state = STATE_INIT;
if (null != role)
{
name = role.getName();
profile.setRole( role );
if (null != name)
{
path.append(File.separator).append(name);
state = STATE_BASE;