/** * Get the configured browse index that is defined to use this sort option. * * @param so sort option * @return browse index * @throws BrowseException if browse error */ public static BrowseIndex getBrowseIndex(SortOption so) throws BrowseException { for (BrowseIndex bix : BrowseIndex.getBrowseIndices()) { if (bix.getSortOption() == so) { return bix; } } return null; }
/** * @return array of tables * @throws BrowseException if browse error * @deprecated */ public static String[] tables() throws BrowseException { BrowseIndex[] bis = getBrowseIndices(); String[] returnTables = new String[bis.length]; for (int i = 0; i < bis.length; i++) { returnTables[i] = bis[i].getTableName(); } return returnTables; }
/** * Get the browse index from configuration with the specified name. * The name is the first part of the browse configuration * * @param name the name to retrieve * @return the specified browse index * @throws BrowseException if browse error */ public static BrowseIndex getBrowseIndex(String name) throws BrowseException { for (BrowseIndex bix : BrowseIndex.getBrowseIndices()) { if (bix.getName().equals(name)) { return bix; } } return null; }
/** * Add navigation for the configured browse tables to the supplied list. * * @param browseList * @param browseURL * @throws WingException */ private void addBrowseOptions(List browseList, String browseURL) throws WingException { // FIXME Exception handling try { // Get a Map of all the browse tables BrowseIndex[] bis = BrowseIndex.getBrowseIndices(); for (BrowseIndex bix : bis) { // Create a Map of the query parameters for this link Map<String, String> queryParams = new HashMap<String, String>(); queryParams.put("type", bix.getName()); // Add a link to this browse browseList.addItemXref(super.generateURL(browseURL, queryParams), message("xmlui.ArtifactBrowser.Navigation.browse_" + bix.getName())); } } catch (BrowseException bex) { throw new UIException("Unable to get browse indicies", bex); } }
BrowseIndex[] bis = BrowseIndex.getBrowseIndices(); for (BrowseIndex bix : bis)
bis = BrowseIndex.getBrowseIndices(); } catch (BrowseException e) { log.error(e.getMessage(), e);
BrowseIndex[] bis = BrowseIndex.getBrowseIndices(); for (BrowseIndex bix : bis)
BrowseIndex[] bis = BrowseIndex.getBrowseIndices(); for (BrowseIndex bix : bis)