org.cofax.cms
Class CofaxToolsUtil


java.lang.Object

  |

  +--org.cofax.cms.CofaxToolsUtil


public class CofaxToolsUtil
extends java.lang.Object

CofaxToolsUtil: Collection of shared utilities for Cofax Tools. CofaxToolsUtil consists of routines needed to populate an HTML page with SQL data or get HTML data from a request.

Author:
Charles Harvey

Field Summary
static java.lang.String st_selectPackagetags
           
static java.lang.String st_selectPackagetagsCache
           
 
Constructor Summary
CofaxToolsUtil()
           
 
Method Summary
static java.lang.StringBuffer arrayToStringBuffer(java.lang.String[] input)
          Ports Array elements into a StringBuffer in their natural order.
static java.lang.String[] bubbleSort(java.lang.String[] toBeSorted)
          Sorts a String array by value and returns sorted value.
static int caseInsensitiveIndexOf(java.lang.String mainText, java.lang.String index)
          Duplicates String indexOf() functionality but is case insensitive.
static boolean checkFileTransferFolder(java.lang.String path)
          Check to see that the file transfer folder is set correctly
static java.util.HashMap convertBooleanToChecked(java.util.HashMap ht, java.lang.String itemToBeConverted)
          Converts a given boolean in a hashmap to "checked" or "" accordingly for placement on an html page.
static java.lang.String convertCheckedToBoolean(java.lang.String checked)
          Converts a given checkbox String to a boolean according to its status.
static java.lang.String createCheckBoxTable(java.util.HashMap nameValue, java.lang.String name)
          Takes a HashMap of items, text, and a name and returns an HTML table populated with checkboxes.
static java.lang.String createCheckBoxTable(java.util.HashMap nameValueIn, java.util.Vector checked, java.lang.String name)
          Takes a HashMap of items, text, and a name and a vector of checked items returns an HTML table populated with checkboxes checked where applicable.
static java.lang.String createMultipleSelect(java.lang.String selectName, java.util.HashMap nameValue, int size)
          Returns an html multiple select field given a name, a HashMap of names and values, and a size for the amount of fields to show.
static java.lang.String createMultipleSelect(java.lang.String selectName, java.util.HashMap nameValue, int size, java.util.Vector selected)
          Returns an html multiple select field given a name, a HashMap of names and values, and a size for the amount of fields to show.
static java.lang.String createSelect(java.lang.String selectName, java.util.ArrayList nameValue)
          Returns an html select bar given a name and a HashMap of values.
static java.lang.String createSelect(java.lang.String selectName, java.util.ArrayList nameValue, java.lang.String selected)
          Returns an html select bar given a name and a HashMap of values.  Parameter selected will be marked as selected in the bar.
static java.lang.String createSelect(java.lang.String selectName, java.util.ArrayList nameValue, java.lang.String selected, java.lang.String javaScript)
          Returns an html select bar given a name and a HashMap of values.  Parameter selected will be marked as selected in the bar.  Parameter javascript will be placed in the SELECT tag for onChange, etc.
static java.lang.String createSelect(java.lang.String selectName, java.util.HashMap nameValue)
          Returns an html select bar given a name and a HashMap of values.
static java.lang.String createSelect(java.lang.String selectName, java.util.HashMap nameValue, java.lang.String selected)
          Returns an html select bar given a name and a HashMap of values.  Parameter selected will be marked as selected in the bar.
static java.lang.String createSelect(java.lang.String selectName, java.util.HashMap nameValue, java.lang.String selected, java.lang.String javaScript)
          Returns an html select bar given a name and a HashMap of values.  Parameter selected will be marked as selected in the bar.  Parameter javascript will be placed in the SELECT tag for onChange, etc.
static java.lang.String createShowPreOrderSelect(java.lang.String label, java.lang.String selected)
           
static java.util.HashMap escapeHTML(java.util.HashMap hm)
          Escapes >,<,",' to ascii characters and returns the HashMap
static java.lang.String fillTemplate(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpSession session, java.lang.String fileName)
          Returns a fulfilled template by running a HashMap of results against a template file and replacing key with key value from given HashMap.
static java.lang.String fillTemplate(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpSession session, java.lang.String fileName, java.util.HashMap items, boolean ifHeader)
          Returns a fulfilled template by running a HashMap of results against a template file and replacing key with key value from given HashMap.  Parameter ifHeader determines if the designated header file should be prepended to the results body template.
static java.util.HashMap getArticleInfoByItemID(DataStore db, java.lang.String itemID, javax.servlet.http.HttpSession session)
          Returns info needed to edit an article by itemID.
static java.util.HashMap getArticleMappingsAndRankByItemID(DataStore db, java.lang.String itemID, java.lang.String section, java.lang.String pubName)
          Returns mappings/ ranks associated with an article by itemID - Omits original rank!
static java.util.HashMap getArticletypeInfoByID(DataStore db, java.lang.String articleTypeID)
          Returns info associated with an article type by articletypeID.
static java.util.HashMap getCofaxUrlParameters(java.lang.String url)
          Splits an url into section, date, publication, fileName and returns a HashMap of values.
static java.util.HashMap getDateInfo()
          Returns info about the current date in a hash.
static java.lang.String getDateString()
          Formats the current date into String yyyy/mm/dd.
static java.lang.String getFileExtension(java.lang.String path)
          Strips a file extension from a path and returns it
static java.util.HashMap getGroupInfo(DataStore db, java.lang.String groupID)
          Return group info for a specific group.
static java.util.HashMap getGroups(DataStore db, javax.servlet.http.HttpSession session)
          Returns groupID & GroupName for all groups.
static java.util.HashMap getGroupsConverse(DataStore db)
          Return GroupName & groupID for all groups.
static java.util.HashMap getGroupsNonPublications(DataStore db, java.lang.String groupID)
          Returns the publications not associated with a group.
static java.util.HashMap getGroupsPublications(DataStore db, java.lang.String groupID)
          Returns the publications associated with a group.
static java.lang.String getGroupsSelectID(DataStore db, javax.servlet.http.HttpSession session)
          Produces an html select of all Groups.
static java.lang.String getGroupsSelectID(DataStore db, java.lang.String selected, javax.servlet.http.HttpSession session)
          Produces an html select of all Groups with parameter selected as the selected value.
static java.util.Vector getGroupTypeIDs(DataStore db)
          Return groupTypeID in a Vector.
static java.util.HashMap getGroupTypeInfo(DataStore db, java.lang.String groupTypeID)
          Returns a select of all group types.
static java.util.Vector getGroupTypeNames(DataStore db)
          Return groupTypeName in a Vector.
static java.util.HashMap getGroupTypes(DataStore db)
          Return all group types in a HashMap.
static java.lang.String getGroupTypesSelectID(DataStore db)
          Produces an html select of all Group Types.
static java.lang.String getGroupTypesSelectID(DataStore db, java.lang.String selected)
          Produces an html select of all Group Types with parameter selected as the selected value.
static java.lang.String getImportFileComboBox(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpSession session)
          Return comboBox of possible files to import.
static java.lang.String getItemIDFromNameSectionDate(DataStore db, java.util.HashMap ht)
          Returns an itemid when given a hash of section name and section date.
static java.lang.String getMappingCodeBySectionPublication(DataStore db, java.util.HashMap ht)
          Returns a mapping code when given a hash of section name and pubname.
static java.lang.String getMappingCodesRankComboTable(DataStore db, int howManyRows, javax.servlet.http.HttpSession session)
          Returns a combo box allowing user to set or delete mappings, sets selected values and mappings.
static java.lang.String getMappingCodesRankComboTable(DataStore db, int howManyRows, javax.servlet.http.HttpSession session, java.util.HashMap sectionSelectRank)
          Returns a combo box allowing user to set or delete mappings, sets selected values and mappings.
static java.util.ArrayList getModes(DataStore db)
          Return modes/ group types in a Vector of Hashes.
static java.lang.String getMultiMediaComboBox(DataStore db, java.util.List l, java.lang.String pubDate, javax.servlet.http.HttpSession session, java.lang.String storyItemID)
          returns a MultiMedia comboBox associated with an article by itemID.
static java.util.HashMap getMultiMediaTypes(DataStore db)
          Returns all MultiMedia types.
static java.lang.String getOrderSectionComboBox(DataStore db, java.lang.String publication, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletRequest req, java.util.HashMap temp, java.lang.String numPreOrders)
          Returns a comboBox to order sections by.
static java.lang.String getOrderSectionComboBox(DataStore db, java.lang.String publication, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletRequest req, java.lang.String numPreOrders)
          Returns a comboBox to order sections by.
static java.lang.String getPubDescFromID(DataStore db, java.lang.String pubID)
          Returns pubDesc given pubID.
static java.lang.String getPubIDFromName(DataStore db, java.lang.String pubName)
          Returns pubID given pubName.
static java.util.HashMap getPublicationInfo(DataStore db, java.lang.String pubID)
          Returns a hash of all publication info by pub id.
static java.util.HashMap getPublications(DataStore db)
          Returns pub Desc / pub ID for all Publications.
static java.lang.String getPublicationSelectID(DataStore db, javax.servlet.http.HttpSession session, java.lang.String name)
          Produces an html select of all publications.
static java.lang.String getPublicationSelectID(DataStore db, javax.servlet.http.HttpSession session, java.lang.String selected, java.lang.String name)
          Produces an html select of all publications with parameter selected as the selected value.  Produces only the publications a user is grouped to unless the user is a national admin, in which case produces all publications.
static java.lang.String getPubNameFromID(DataStore db, java.lang.String pubID)
          Returns pubName given pubID.
static java.util.HashMap getPubNamePubDescFromID(DataStore db, java.lang.String pubID)
          Returns a HashMap of pubDesc and pubName given a pubID.
static java.lang.String getRelatedLinksComboBox(DataStore db)
          Return comboBox of related links
static java.lang.String getRelatedLinksComboBox(DataStore db, java.lang.String itemID)
          Return comboBox of related links by an itemID
static java.util.List getRelatedMultiMediaByItemID(DataStore db, java.lang.String itemID)
          Returns all MultiMedia info associated with an article by itemID.
static java.util.List getRelatedMultiMediaByMultiMediaID(DataStore db, java.lang.String itemID)
          Returns all MultiMedia info associated with a MultiMedia item by multiMediaID.
static java.lang.String getSearchSelectCombo(javax.servlet.http.HttpServletRequest req)
          Unpacks a serialized search and returns the correctly selected elements to the user.
static java.util.HashMap getSectionInfoByMappingCode(DataStore db, java.lang.String sectionMappingCode)
          Returns a hash of all values associated with a section mapping code.
static java.lang.String getSecurityCheckboxTable(DataStore db)
          Returns a checkbox table for security settings.
static java.lang.String getSelectArticleSection(DataStore db, java.lang.String currentPubName, java.lang.String name)
          Returns a select of all article sections for a given publication with no selected value.
static java.lang.String getSelectArticleSection(DataStore db, java.lang.String currentPubName, java.lang.String name, java.lang.String selected)
          Returns a select of all article sections for a given publication with a selected value.
static java.lang.String getSelectArticleType(DataStore db, java.lang.String currentPubName, java.lang.String label)
          Returns a select of article types for a given publication with no selected value.
static java.lang.String getSelectArticleType(DataStore db, java.lang.String currentPubName, java.lang.String label, java.lang.String selected)
          Returns a select of article types for a given publication with a selected value.
static java.lang.String getSelectArticleTypeCategory(DataStore db, java.lang.String label)
          Returns a select of article type categories with no selected value.
static java.lang.String getSelectArticleTypeCategory(DataStore db, java.lang.String label, java.lang.String selected)
          Returns a select of article type categories with a selected value.
static java.lang.String getSelectCategoriesMultiplePublications(DataStore db, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletRequest req)
          Returns a select of all sections from all publications a user is grouped to.
static java.lang.String getSelectDate(java.lang.String label)
          Returns a select of dates (mm/dd/yyyy).
static java.lang.String getSelectDate(java.lang.String label, int year, int month, int day)
          Returns a select of dates with given dates selected (mm/dd/yyyy).
static java.lang.String getSelectGroupType(DataStore db)
          Returns a select of all group types with a group selected
static java.lang.String getSelectGroupType(DataStore db, java.lang.String groupID)
          Returns a select of all group types.
static java.util.HashMap getSelectMappingsMultiplePublications(DataStore db, java.lang.String label, javax.servlet.http.HttpSession session)
          Returns a hash of all mappings from all publications a user is grouped to.
static java.util.List getSelectMappingsMultiplePublicationsArrayList(DataStore db, java.lang.String label, javax.servlet.http.HttpSession session)
          Returns a hash of all mappings from all publications a user is grouped to.
static java.lang.String getSelectMultipleMultiplePublication(javax.servlet.http.HttpSession session, int size, javax.servlet.http.HttpServletRequest req)
          Returns a multiple select of all publications that user is grouped to.
static java.lang.String getSelectOrderSectionResults(java.lang.String selected)
          Returns a select with params for how many results a user desires to see.
static java.lang.String getSelectSavedSearches(DataStore db, javax.servlet.http.HttpSession session)
          Returns a user's saved searches from the database
static java.lang.String getSelectSection(DataStore db, java.lang.String currentPubName, java.lang.String label)
          Returns a select of section types for a given publication with no selected value.
static java.lang.String getSelectSection(DataStore db, java.lang.String pubName, java.lang.String label, java.lang.String selected)
          Returns a select of section types for a given publication with a selected value.
static java.lang.String getSelectTime(java.lang.String name, int hour, int minute, int second, java.lang.String amPm)
           
static java.util.Vector getUserGroups(DataStore db, java.lang.String userID)
          Return all groups that a given user belongs to in a Vector.
static java.util.HashMap getUserInfo(DataStore db, java.lang.String userID)
          Return contents of tblPermUser for a specific user in a HashMap.
static java.lang.String getUsersSelect(DataStore db, javax.servlet.http.HttpSession session)
          Produces an html select of all users.
static java.lang.String getUsersSelect(DataStore db, javax.servlet.http.HttpSession session, java.lang.String selected)
          Produces an html select of all users with parameter selected selected. Produces only users that belong to the same group(s) as the current user, unless the current user is a national admin, in which case produces all users.
static void log(java.lang.String input)
          Logs to a file or to System.out - basic function is to concentrate error checking.
static java.lang.String readFile(java.lang.String fileLocation)
          Reads a local file given the complete filepath and returns the body as a String.
static java.lang.String readFile(java.lang.String fileLocation, boolean delete)
          Reads a local file given the complete filepath and returns the body as a String.  If parameter delete is set to true file will be deleted after it is read.
static java.lang.String replace(java.lang.String originalText, java.lang.String subStringToFind, java.lang.String subStringToReplaceWith)
          Replaces all occurances of the specified sub-string to find with the specified sub-string to replace with.
static boolean resetServlet(DataStore db)
          Replicates CofaxToolsServlet init function so server does not have to be restarted on change of config file.
static java.lang.String saveSearch(DataStore db, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletRequest req)
          Saves a search for articles (URL string) to the database for later access
static java.lang.String searchArticles(DataStore db, javax.servlet.http.HttpServletRequest req)
          Returns a list of article name, mapping, etc after compiling DB request on fly.
static java.lang.String setArticle(DataStore db, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpSession session)
          Updates or inserts an article, attached MultiMedia, and related links
static java.lang.String setArticleType(DataStore db, javax.servlet.http.HttpServletRequest req)
          Updates article types into the article types table.
static java.lang.String setGroupInfo(DataStore db, javax.servlet.http.HttpServletRequest req)
          Updates or inserts info into the group table.
static java.lang.String setGroupTypeInfo(DataStore db, javax.servlet.http.HttpServletRequest req)
          Updates or inserts info into the group type table.
static java.lang.String setOrderSection(DataStore db, javax.servlet.http.HttpServletRequest req)
          Updates or inserts info into the articleOrder and creates new stories if needed.
static void setPackageTagSqlStatements()
          Set the call to load all package tags depending on datastore.
static java.lang.String setPublicationInfo(DataStore db, javax.servlet.http.HttpServletRequest req)
          Updates or inserts info into the publication and publication config tables.
static java.lang.String setSection(DataStore db, javax.servlet.http.HttpServletRequest req)
          Updates sections into the section table.
static java.lang.String setSecurity(DataStore db, javax.servlet.http.HttpServletRequest req)
          Updates security info into the securities table table.
static java.lang.String setTemplateValues(java.lang.String fileName, java.util.HashMap items)
          Reads a template file and populates a template with values from a HashMap based on key values typed as key in the template. Does the grunt work for fillTemplate();
static java.lang.String setUserInfo(DataStore db, javax.servlet.http.HttpServletRequest req)
          Updates or inserts info into the user table and associated tables as appropriate.
static void setUserWorkingPubConfigElements(DataStore db, javax.servlet.http.HttpSession session, java.lang.String askingPub)
          Sets the globals that we will need when working with the current pub for http construction, FTP file transfer, etc.
static void showHash(java.lang.String name, java.util.HashMap hm)
          Prints a HashMap to System.out in name/ value pairs for reporting/ debugging.
static void showHeader(javax.servlet.http.HttpServletRequest req)
          Displays the elements of an http header.
static void showListOfHashes(java.lang.String name, java.util.List list)
          Prints a List of HashMaps to System.out in name/ value pairs for reporting/ debugging.
static void showVector(java.lang.String name, java.util.Vector vec)
          Prints a HashMap to System.out in name/ value pairs for reporting/ debugging.
static void showVectorOfHashes(java.lang.String s, java.util.Vector v)
          Prints out info regarding a vector full of hashes.
static java.util.HashMap splitGetQuery(javax.servlet.http.HttpServletRequest req)
          Splits an http query, returns a hash. For GET only..If multiple values exists, returns a vector inside the hash for particluar value.
static java.util.HashMap splitPostQuery(javax.servlet.http.HttpServletRequest req)
          Splits an http query, returns a hash. For POST only..If multiple values exists, returns a string[] inside the hash for particluar value.
static java.lang.String sqlDateToCofaxDate(java.lang.String date)
          Formats a sql date into a Cofax usable date
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

st_selectPackagetags


public static java.lang.String st_selectPackagetags

st_selectPackagetagsCache


public static java.lang.String st_selectPackagetagsCache
Constructor Detail

CofaxToolsUtil


public CofaxToolsUtil()
Method Detail

setPackageTagSqlStatements


public static void setPackageTagSqlStatements()
Set the call to load all package tags depending on datastore.

fillTemplate


public static java.lang.String fillTemplate(javax.servlet.http.HttpServletRequest req,

                                            javax.servlet.http.HttpSession session,

                                            java.lang.String fileName)
Returns a fulfilled template by running a HashMap of results against a template file and replacing key with key value from given HashMap.

fillTemplate


public static java.lang.String fillTemplate(javax.servlet.http.HttpServletRequest req,

                                            javax.servlet.http.HttpSession session,

                                            java.lang.String fileName,

                                            java.util.HashMap items,

                                            boolean ifHeader)
Returns a fulfilled template by running a HashMap of results against a template file and replacing key with key value from given HashMap.  Parameter ifHeader determines if the designated header file should be prepended to the results body template.

setTemplateValues


public static java.lang.String setTemplateValues(java.lang.String fileName,

                                                 java.util.HashMap items)
Reads a template file and populates a template with values from a HashMap based on key values typed as key in the template. Does the grunt work for fillTemplate();

readFile


public static java.lang.String readFile(java.lang.String fileLocation)
Reads a local file given the complete filepath and returns the body as a String.

readFile


public static java.lang.String readFile(java.lang.String fileLocation,

                                        boolean delete)
Reads a local file given the complete filepath and returns the body as a String.  If parameter delete is set to true file will be deleted after it is read.

createCheckBoxTable


public static java.lang.String createCheckBoxTable(java.util.HashMap nameValue,

                                                   java.lang.String name)
Takes a HashMap of items, text, and a name and returns an HTML table populated with checkboxes.

createCheckBoxTable


public static java.lang.String createCheckBoxTable(java.util.HashMap nameValueIn,

                                                   java.util.Vector checked,

                                                   java.lang.String name)
Takes a HashMap of items, text, and a name and a vector of checked items returns an HTML table populated with checkboxes checked where applicable.

createSelect


public static java.lang.String createSelect(java.lang.String selectName,

                                            java.util.HashMap nameValue)
Returns an html select bar given a name and a HashMap of values.

createSelect


public static java.lang.String createSelect(java.lang.String selectName,

                                            java.util.HashMap nameValue,

                                            java.lang.String selected)
Returns an html select bar given a name and a HashMap of values.  Parameter selected will be marked as selected in the bar.

createSelect


public static java.lang.String createSelect(java.lang.String selectName,

                                            java.util.HashMap nameValue,

                                            java.lang.String selected,

                                            java.lang.String javaScript)
Returns an html select bar given a name and a HashMap of values.  Parameter selected will be marked as selected in the bar.  Parameter javascript will be placed in the SELECT tag for onChange, etc.

createMultipleSelect


public static java.lang.String createMultipleSelect(java.lang.String selectName,

                                                    java.util.HashMap nameValue,

                                                    int size)
Returns an html multiple select field given a name, a HashMap of names and values, and a size for the amount of fields to show.

createMultipleSelect


public static java.lang.String createMultipleSelect(java.lang.String selectName,

                                                    java.util.HashMap nameValue,

                                                    int size,

                                                    java.util.Vector selected)
Returns an html multiple select field given a name, a HashMap of names and values, and a size for the amount of fields to show. Sets values in Vector selected to selected.

bubbleSort


public static java.lang.String[] bubbleSort(java.lang.String[] toBeSorted)
Sorts a String array by value and returns sorted value.

arrayToStringBuffer


public static java.lang.StringBuffer arrayToStringBuffer(java.lang.String[] input)
Ports Array elements into a StringBuffer in their natural order.

getGroupTypesSelectID


public static java.lang.String getGroupTypesSelectID(DataStore db)
Produces an html select of all Group Types.

getGroupTypesSelectID


public static java.lang.String getGroupTypesSelectID(DataStore db,

                                                     java.lang.String selected)
Produces an html select of all Group Types with parameter selected as the selected value.

getGroupsSelectID


public static java.lang.String getGroupsSelectID(DataStore db,

                                                 javax.servlet.http.HttpSession session)
Produces an html select of all Groups.

getGroupsSelectID


public static java.lang.String getGroupsSelectID(DataStore db,

                                                 java.lang.String selected,

                                                 javax.servlet.http.HttpSession session)
Produces an html select of all Groups with parameter selected as the selected value.

getPublicationSelectID


public static java.lang.String getPublicationSelectID(DataStore db,

                                                      javax.servlet.http.HttpSession session,

                                                      java.lang.String name)
Produces an html select of all publications. Produces only the publications a user is grouped to unless the user is a national admin, in which case produces all publications.

getPublicationSelectID


public static java.lang.String getPublicationSelectID(DataStore db,

                                                      javax.servlet.http.HttpSession session,

                                                      java.lang.String selected,

                                                      java.lang.String name)
Produces an html select of all publications with parameter selected as the selected value.  Produces only the publications a user is grouped to unless the user is a national admin, in which case produces all publications.

getPubNamePubDescFromID


public static java.util.HashMap getPubNamePubDescFromID(DataStore db,

                                                        java.lang.String pubID)
Returns a HashMap of pubDesc and pubName given a pubID.

getUsersSelect


public static java.lang.String getUsersSelect(DataStore db,

                                              javax.servlet.http.HttpSession session)
Produces an html select of all users.

getUsersSelect


public static java.lang.String getUsersSelect(DataStore db,

                                              javax.servlet.http.HttpSession session,

                                              java.lang.String selected)
Produces an html select of all users with parameter selected selected. Produces only users that belong to the same group(s) as the current user, unless the current user is a national admin, in which case produces all users.

getUserInfo


public static java.util.HashMap getUserInfo(DataStore db,

                                            java.lang.String userID)
Return contents of tblPermUser for a specific user in a HashMap.

getUserGroups


public static java.util.Vector getUserGroups(DataStore db,

                                             java.lang.String userID)
Return all groups that a given user belongs to in a Vector.

getGroups


public static java.util.HashMap getGroups(DataStore db,

                                          javax.servlet.http.HttpSession session)
Returns groupID & GroupName for all groups.

getGroupsConverse


public static java.util.HashMap getGroupsConverse(DataStore db)
Return GroupName & groupID for all groups.

getGroupTypes


public static java.util.HashMap getGroupTypes(DataStore db)
Return all group types in a HashMap.

getGroupInfo


public static java.util.HashMap getGroupInfo(DataStore db,

                                             java.lang.String groupID)
Return group info for a specific group.

log


public static void log(java.lang.String input)
Logs to a file or to System.out - basic function is to concentrate error checking.

getPublications


public static java.util.HashMap getPublications(DataStore db)
Returns pub Desc / pub ID for all Publications.

getGroupsPublications


public static java.util.HashMap getGroupsPublications(DataStore db,

                                                      java.lang.String groupID)
Returns the publications associated with a group.

getGroupsNonPublications


public static java.util.HashMap getGroupsNonPublications(DataStore db,

                                                         java.lang.String groupID)
Returns the publications not associated with a group.

getPubDescFromID


public static java.lang.String getPubDescFromID(DataStore db,

                                                java.lang.String pubID)
Returns pubDesc given pubID.

getPubNameFromID


public static java.lang.String getPubNameFromID(DataStore db,

                                                java.lang.String pubID)
Returns pubName given pubID.

getPubIDFromName


public static java.lang.String getPubIDFromName(DataStore db,

                                                java.lang.String pubName)
Returns pubID given pubName.

showVector


public static void showVector(java.lang.String name,

                              java.util.Vector vec)
Prints a HashMap to System.out in name/ value pairs for reporting/ debugging.

showHash


public static void showHash(java.lang.String name,

                            java.util.HashMap hm)
Prints a HashMap to System.out in name/ value pairs for reporting/ debugging.

showListOfHashes


public static void showListOfHashes(java.lang.String name,

                                    java.util.List list)
Prints a List of HashMaps to System.out in name/ value pairs for reporting/ debugging.

getGroupTypeIDs


public static java.util.Vector getGroupTypeIDs(DataStore db)
Return groupTypeID in a Vector.

getGroupTypeNames


public static java.util.Vector getGroupTypeNames(DataStore db)
Return groupTypeName in a Vector.

getModes


public static java.util.ArrayList getModes(DataStore db)
Return modes/ group types in a Vector of Hashes.

showVectorOfHashes


public static void showVectorOfHashes(java.lang.String s,

                                      java.util.Vector v)
Prints out info regarding a vector full of hashes.

getPublicationInfo


public static java.util.HashMap getPublicationInfo(DataStore db,

                                                   java.lang.String pubID)
Returns a hash of all publication info by pub id.

getSelectGroupType


public static java.lang.String getSelectGroupType(DataStore db)
Returns a select of all group types with a group selected

getSelectGroupType


public static java.lang.String getSelectGroupType(DataStore db,

                                                  java.lang.String groupID)
Returns a select of all group types.

getGroupTypeInfo


public static java.util.HashMap getGroupTypeInfo(DataStore db,

                                                 java.lang.String groupTypeID)
Returns a select of all group types.

replace


public static java.lang.String replace(java.lang.String originalText,

                                       java.lang.String subStringToFind,

                                       java.lang.String subStringToReplaceWith)
Replaces all occurances of the specified sub-string to find with the specified sub-string to replace with.

getSelectDate


public static java.lang.String getSelectDate(java.lang.String label)
Returns a select of dates (mm/dd/yyyy).

getSelectDate


public static java.lang.String getSelectDate(java.lang.String label,

                                             int year,

                                             int month,

                                             int day)
Returns a select of dates with given dates selected (mm/dd/yyyy).

getSelectArticleSection


public static java.lang.String getSelectArticleSection(DataStore db,

                                                       java.lang.String currentPubName,

                                                       java.lang.String name)
Returns a select of all article sections for a given publication with no selected value.

getSelectArticleSection


public static java.lang.String getSelectArticleSection(DataStore db,

                                                       java.lang.String currentPubName,

                                                       java.lang.String name,

                                                       java.lang.String selected)
Returns a select of all article sections for a given publication with a selected value.

getMappingCodesRankComboTable


public static java.lang.String getMappingCodesRankComboTable(DataStore db,

                                                             int howManyRows,

                                                             javax.servlet.http.HttpSession session)
Returns a combo box allowing user to set or delete mappings, sets selected values and mappings.

getMappingCodesRankComboTable


public static java.lang.String getMappingCodesRankComboTable(DataStore db,

                                                             int howManyRows,

                                                             javax.servlet.http.HttpSession session,

                                                             java.util.HashMap sectionSelectRank)
Returns a combo box allowing user to set or delete mappings, sets selected values and mappings.

getSelectMultipleMultiplePublication


public static java.lang.String getSelectMultipleMultiplePublication(javax.servlet.http.HttpSession session,

                                                                    int size,

                                                                    javax.servlet.http.HttpServletRequest req)
Returns a multiple select of all publications that user is grouped to.

getSelectCategoriesMultiplePublications


public static java.lang.String getSelectCategoriesMultiplePublications(DataStore db,

                                                                       javax.servlet.http.HttpSession session,

                                                                       javax.servlet.http.HttpServletRequest req)
Returns a select of all sections from all publications a user is grouped to.

getSelectMappingsMultiplePublications


public static java.util.HashMap getSelectMappingsMultiplePublications(DataStore db,

                                                                      java.lang.String label,

                                                                      javax.servlet.http.HttpSession session)
Returns a hash of all mappings from all publications a user is grouped to.

splitGetQuery


public static java.util.HashMap splitGetQuery(javax.servlet.http.HttpServletRequest req)
Splits an http query, returns a hash. For GET only..If multiple values exists, returns a vector inside the hash for particluar value.

splitPostQuery


public static java.util.HashMap splitPostQuery(javax.servlet.http.HttpServletRequest req)
Splits an http query, returns a hash. For POST only..If multiple values exists, returns a string[] inside the hash for particluar value.

showHeader


public static void showHeader(javax.servlet.http.HttpServletRequest req)
Displays the elements of an http header.

searchArticles


public static java.lang.String searchArticles(DataStore db,

                                              javax.servlet.http.HttpServletRequest req)
Returns a list of article name, mapping, etc after compiling DB request on fly.

setUserWorkingPubConfigElements


public static void setUserWorkingPubConfigElements(DataStore db,

                                                   javax.servlet.http.HttpSession session,

                                                   java.lang.String askingPub)
Sets the globals that we will need when working with the current pub for http construction, FTP file transfer, etc.

getDateInfo


public static java.util.HashMap getDateInfo()
Returns info about the current date in a hash.

getArticleInfoByItemID


public static java.util.HashMap getArticleInfoByItemID(DataStore db,

                                                       java.lang.String itemID,

                                                       javax.servlet.http.HttpSession session)
Returns info needed to edit an article by itemID.

escapeHTML


public static java.util.HashMap escapeHTML</