Hi!
I'm developing some java code, and I need to get the taskspace application name that calls the java class containing the code...What I want to do is to select the folder names in which the search will be done, depending on the taskspace application in which I perform the advanced search. The names of my taskspace applications are "MyApp" and "NewApp". Now I have the following codet, but it doesn't work:
String queryObjectType = userInputBuilderObj.getObjectType();
String locationPath1="",locationPath2="";
boolean isDescend = true;
String source = "MyRepository";
HttpServletRequest request = (HttpServletRequest) getPageContext().getRequest();
StringBuffer url=request.getRequestURL();
String urlString=url.toString();
String urlString=url.toString();
if (urlString.contains("My")){
locationPath1="/MyAppDocuments";
locationPath2="/MyAppInforms";
}
else if (urlString.contains("New")){
locationPath1="/NewAppDocuments";
locationPath2="/NewAppInforms";
}
IDfQueryBuilder modifiedBuilderObj = qryMgr.newQueryBuilder(queryObjectType);
modifiedBuilderObj.addSelectedSource(source);
modifiedBuilderObj.addLocationScope(source, locationPath1, isDescend);
modifiedBuilderObj.addLocationScope(source, locationPath2, isDescend);
IDfExpressionSet modifiedExprSet = modifiedBuilderObj.getRootExpressionSet();