THE GREAT RENAMING! All that was "SIG" should now be "community," except for
the database and the URLs (for backward compatibility). Do a full rebuild after browsing this one!
This commit is contained in:
@@ -36,7 +36,7 @@ public class FindData implements JSPRender, SearchMode
|
||||
protected static final String ATTR_NAME = "com.silverwrist.venice.content.FindData";
|
||||
|
||||
// The various display categories
|
||||
public static final int FD_SIGS = 0;
|
||||
public static final int FD_COMMUNITIES = 0;
|
||||
public static final int FD_USERS = 1;
|
||||
public static final int FD_CATEGORIES = 2;
|
||||
|
||||
@@ -75,13 +75,13 @@ public class FindData implements JSPRender, SearchMode
|
||||
if (header_titles==null)
|
||||
{ // construct the title and URL vectors
|
||||
header_titles = new Vector();
|
||||
header_titles.add("SIGs");
|
||||
header_titles.add("Communities");
|
||||
header_titles.add("Users");
|
||||
header_titles.add("Categories");
|
||||
header_titles.trimToSize();
|
||||
|
||||
header_urls = new Vector();
|
||||
header_urls.add("find?disp=" + String.valueOf(FD_SIGS));
|
||||
header_urls.add("find?disp=" + String.valueOf(FD_COMMUNITIES));
|
||||
header_urls.add("find?disp=" + String.valueOf(FD_USERS));
|
||||
header_urls.add("find?disp=" + String.valueOf(FD_CATEGORIES));
|
||||
header_urls.trimToSize();
|
||||
@@ -257,17 +257,17 @@ public class FindData implements JSPRender, SearchMode
|
||||
|
||||
public void loadGet(int catid) throws DataException
|
||||
{
|
||||
if (disp==FD_SIGS)
|
||||
{ // fill in the list of subcategories and of SIGs in this category
|
||||
if (disp==FD_COMMUNITIES)
|
||||
{ // fill in the list of subcategories and of communities in this category
|
||||
cat = user.getCategoryDescriptor(catid);
|
||||
subcats = cat.getSubCategories();
|
||||
if (cat.getCategoryID()>=0)
|
||||
{ // fill in the SIGs that are in this category
|
||||
results = user.getSIGsInCategory(cat,offset,getNumResultsDisplayed());
|
||||
find_count = user.getNumSIGsInCategory(cat);
|
||||
{ // fill in the communities that are in this category
|
||||
results = user.getCommunitiesInCategory(cat,offset,getNumResultsDisplayed());
|
||||
find_count = user.getNumCommunitiesInCategory(cat);
|
||||
|
||||
} // end if
|
||||
field = FIELD_SIG_NAME;
|
||||
field = FIELD_COMMUNITY_NAME;
|
||||
|
||||
} // end if
|
||||
else if (disp==FD_USERS)
|
||||
@@ -286,12 +286,12 @@ public class FindData implements JSPRender, SearchMode
|
||||
// category ID (if specified) and the field identifier.
|
||||
switch (disp)
|
||||
{
|
||||
case FD_SIGS:
|
||||
case FD_COMMUNITIES:
|
||||
catid = getParamInt(request,"cat",-1);
|
||||
if (!engine.isValidCategoryID(catid))
|
||||
throw new ValidationException("The category ID parameter is not valid.");
|
||||
field = getParamInt(request,"field",FIELD_SIG_NAME);
|
||||
if ((field!=FIELD_SIG_NAME) && (field!=FIELD_SIG_SYNOPSIS))
|
||||
field = getParamInt(request,"field",FIELD_COMMUNITY_NAME);
|
||||
if ((field!=FIELD_COMMUNITY_NAME) && (field!=FIELD_COMMUNITY_SYNOPSIS))
|
||||
throw new ValidationException("The field search parameter is not valid.");
|
||||
break;
|
||||
|
||||
@@ -344,25 +344,25 @@ public class FindData implements JSPRender, SearchMode
|
||||
// Run the actual search.
|
||||
switch (disp)
|
||||
{
|
||||
case FD_SIGS:
|
||||
case FD_COMMUNITIES:
|
||||
if (catid>=0)
|
||||
{ // retrieve the category descriptor and the subcategory list
|
||||
cat = user.getCategoryDescriptor(catid);
|
||||
subcats = cat.getSubCategories();
|
||||
if (cat.getCategoryID()>=0)
|
||||
{ // fill in the SIGs that are in this category
|
||||
results = user.getSIGsInCategory(cat,offset,count);
|
||||
{ // fill in the communities that are in this category
|
||||
results = user.getCommunitiesInCategory(cat,offset,count);
|
||||
if (find_count<0)
|
||||
find_count = user.getNumSIGsInCategory(cat);
|
||||
find_count = user.getNumCommunitiesInCategory(cat);
|
||||
|
||||
} // end if
|
||||
|
||||
} // end if
|
||||
else
|
||||
{ // retrieve the SIG search data
|
||||
results = user.searchForSIGs(field,mode,term,offset,count);
|
||||
{ // retrieve the community search data
|
||||
results = user.searchForCommunities(field,mode,term,offset,count);
|
||||
if (find_count<0)
|
||||
find_count = user.getSearchSIGCount(field,mode,term);
|
||||
find_count = user.getSearchCommunityCount(field,mode,term);
|
||||
|
||||
} // end else
|
||||
break;
|
||||
@@ -385,7 +385,7 @@ public class FindData implements JSPRender, SearchMode
|
||||
|
||||
public static String getCatJumpLink(RenderData rdat, int catid)
|
||||
{
|
||||
return rdat.getEncodedServletPath("find?disp=" + String.valueOf(FD_SIGS) + "&cat="
|
||||
return rdat.getEncodedServletPath("find?disp=" + String.valueOf(FD_COMMUNITIES) + "&cat="
|
||||
+ String.valueOf(catid));
|
||||
|
||||
} // end getCatJumpLink
|
||||
|
||||
Reference in New Issue
Block a user