DLESE Tools
v1.6.0

org.dlese.dpc.services.dds.action.form
Class JSHTMLForm_1_1

java.lang.Object
  extended by org.apache.struts.action.ActionForm
      extended by org.dlese.dpc.services.dds.action.form.JSHTMLForm_1_1
All Implemented Interfaces:
Serializable

public class JSHTMLForm_1_1
extends org.apache.struts.action.ActionForm
implements Serializable

A ActionForm bean that holds data for the JavaScript HTML search service.

Version:
$Id: JSHTMLForm_1_1.java,v 1.9 2010/07/14 00:19:27 jweather Exp $
Author:
John Weatherley
See Also:
JSHTMLAction_1_1, Serialized Form

Nested Class Summary
 class JSHTMLForm_1_1.DateLabelPair
          DESCRIPTION
 
Field Summary
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
JSHTMLForm_1_1()
          Constructor for the RepositoryForm object
 
Method Summary
 Object addMenuItem(String menu, String item)
          Adds menu and item to the page.
 String getAuthorizedFor()
          Gets the role name for which this user is authorized for
 DocReader getDocReader()
          Gets the DocReader for the first item in the results.
protected static String getDs()
          Return a string for the current time and date, sutiable for display in log files and output to standout:
 String getErrorMsg()
          Gets the errorMsg attribute of the JSHTMLForm_1_1 object
 boolean getHasMenuItemSelected()
          Gets whether one or more itmes in a menu is selected.
 String getLocalizedRecordXml()
          Gets the localizedRecordXml attribute of the JSHTMLForm_1_1 object
 Map getMenuItemsMap()
          Gets a Map of all items in the smart link menus, keyed by their menu and item number of the form slm0-0, where slm0 is the ID for the menu and 0 is the ID for the item in that menu.
 HashMap getMenuLabelsMap()
          Gets a Map of the smart link menu labels, for example 'My custom menu', keyed by the menu number, for example 'slm0'.
 ArrayList getMenuNamesInOrder()
           
 HashMap getMenuPositions()
          Gets a Map of the menu positions keyed by menu name, for example'My custom menu'.
 Map getMenus()
          Gets a Map of all smart link menus keyed by menu name, for example 'My custom menu', with values containing Lists of the items in the given menu.
 int getN()
          Gets the n attribute of the JSHTMLForm_1_1 object
 int getNumMenuItems(String menu)
          Gets the number of items in the smart link menu by the given name.
 int getNumResults()
          Gets the number of matching results.
 String getRecordFormat()
          Gets the recordFormat attribute of the JSHTMLForm_1_1 object
 String getRecordXml()
          Gets the recordXml attribute of the JSHTMLForm_1_1 object
 ResultDocList getResults()
          Gets the results attribute of the JSHTMLForm_1_1 object
 int getS()
          Gets the s attribute of the JSHTMLForm_1_1 object
 ArrayList getSmartLinkParameterNames()
          Gets the names of the parameters used to refer to the all current smart links, for example slm0, slm1, etc.
 List getUtcDates()
          A list of UTC dates in the past in the following order: one minute, one hour, one day, one week, one month, one year.
 MetadataVocab getVocab()
          Gets the vocab attribute of the JSHTMLForm_1_1 object
 String getVocabLabel()
          Gets the vocabLabel attribute of the JSHTMLForm_1_1 object
 List getXmlFormats()
          Gets the xmlFormats attribute of the JSHTMLForm_1_1 object
protected  void prtln(String s)
          Output a line of text to standard out, with datestamp, if debug is set to true.
protected  void prtlnErr(String s)
          Output a line of text to error out, with datestamp.
 void reset(org.apache.struts.action.ActionMapping mapping, HttpServletRequest request)
          Reset all bean properties to their default state.
 void setAuthorizedFor(String val)
          Sets the role name for which this user is authorized for
static void setDebug(boolean isDebugOuput)
          Sets the debug attribute
 void setErrorMsg(String errorMsg)
          Sets the errorMsg attribute of the JSHTMLForm_1_1 object
 void setHasMenuItemSelected(boolean isSelected)
          Sets whether one or more itmes in a menu is selected.
 void setMenuItemsMap(HashMap map)
          Sets the Map of all items in the smart link menus, keyed by their menu and item number of the form slm0-0, where slm0 is the ID for the menu and 0 is the ID for the item in that menu.
 void setN(int val)
          Sets the n attribute of the JSHTMLForm_1_1 object
 void setRecordFormat(String val)
          Sets the recordFormat attribute of the JSHTMLForm_1_1 object
 void setRecordXml(String val)
          Sets the recordXml attribute of the JSHTMLForm_1_1 object
 void setResults(ResultDocList results)
          Sets the results attribute of the JSHTMLForm_1_1 object
 void setS(int val)
          Sets the s attribute of the JSHTMLForm_1_1 object
 void setVocabFieldId(String id)
          Sets the vocabFieldId attribute of the JSHTMLForm_1_1 object
 void setVocabValueId(String id)
          Sets the vocabValueId attribute of the JSHTMLForm_1_1 object
 void setXmlFormats(List var)
          Sets the xmlFormats attribute of the JSHTMLForm_1_1 object
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSHTMLForm_1_1

public JSHTMLForm_1_1()
Constructor for the RepositoryForm object

Method Detail

getVocab

public final MetadataVocab getVocab()
Gets the vocab attribute of the JSHTMLForm_1_1 object

Returns:
The vocab value

setVocabFieldId

public void setVocabFieldId(String id)
Sets the vocabFieldId attribute of the JSHTMLForm_1_1 object

Parameters:
id - The new vocabFieldId value

setVocabValueId

public void setVocabValueId(String id)
Sets the vocabValueId attribute of the JSHTMLForm_1_1 object

Parameters:
id - The new vocabValueId value

getVocabLabel

public String getVocabLabel()
Gets the vocabLabel attribute of the JSHTMLForm_1_1 object

Returns:
The vocabLabel value

reset

public void reset(org.apache.struts.action.ActionMapping mapping,
                  HttpServletRequest request)
Reset all bean properties to their default state. This method is called before the properties are repopulated by the controller servlet.

Overrides:
reset in class org.apache.struts.action.ActionForm
Parameters:
mapping - The ActionMapping
request - The request

addMenuItem

public Object addMenuItem(String menu,
                          String item)
Adds menu and item to the page. If the given menu does not exist it will be created and the item will be added, otherwise the item will be added to the given menu.

Parameters:
menu - The name of the menu
item - The name of the menu item

getMenuLabelsMap

public HashMap getMenuLabelsMap()
Gets a Map of the smart link menu labels, for example 'My custom menu', keyed by the menu number, for example 'slm0'.

Returns:
A Map of menu labels

getNumMenuItems

public int getNumMenuItems(String menu)
Gets the number of items in the smart link menu by the given name.

Parameters:
menu - The menu name, for example 'My custom menu'
Returns:
The number of items in this menu

getMenuPositions

public HashMap getMenuPositions()
Gets a Map of the menu positions keyed by menu name, for example'My custom menu'.

Returns:
A map of positions, corresponding to slm0, slm1 etc, or null if no menu has not been added yet

getMenus

public Map getMenus()
Gets a Map of all smart link menus keyed by menu name, for example 'My custom menu', with values containing Lists of the items in the given menu. This map should be used to create the menu in the UI.

Returns:
A Map of smart link menus

getMenuNamesInOrder

public ArrayList getMenuNamesInOrder()

getMenuItemsMap

public Map getMenuItemsMap()
Gets a Map of all items in the smart link menus, keyed by their menu and item number of the form slm0-0, where slm0 is the ID for the menu and 0 is the ID for the item in that menu.

Returns:
The Map of all menu items

setMenuItemsMap

public void setMenuItemsMap(HashMap map)
Sets the Map of all items in the smart link menus, keyed by their menu and item number of the form slm0-0, where slm0 is the ID for the menu and 0 is the ID for the item in that menu.

Parameters:
map - The new menu items map

getSmartLinkParameterNames

public ArrayList getSmartLinkParameterNames()
Gets the names of the parameters used to refer to the all current smart links, for example slm0, slm1, etc.

Returns:
The names of the smart link parameters

getXmlFormats

public List getXmlFormats()
Gets the xmlFormats attribute of the JSHTMLForm_1_1 object

Returns:
The xmlFormats value

setXmlFormats

public void setXmlFormats(List var)
Sets the xmlFormats attribute of the JSHTMLForm_1_1 object

Parameters:
var - The new xmlFormats value

getLocalizedRecordXml

public String getLocalizedRecordXml()
Gets the localizedRecordXml attribute of the JSHTMLForm_1_1 object

Returns:
The localizedRecordXml value

getRecordXml

public String getRecordXml()
Gets the recordXml attribute of the JSHTMLForm_1_1 object

Returns:
The recordXml value

setRecordXml

public void setRecordXml(String val)
Sets the recordXml attribute of the JSHTMLForm_1_1 object

Parameters:
val - The new recordXml value

setRecordFormat

public void setRecordFormat(String val)
Sets the recordFormat attribute of the JSHTMLForm_1_1 object

Parameters:
val - The new recordFormat value

getRecordFormat

public String getRecordFormat()
Gets the recordFormat attribute of the JSHTMLForm_1_1 object

Returns:
The recordFormat value

getS

public int getS()
Gets the s attribute of the JSHTMLForm_1_1 object

Returns:
The s value

setS

public void setS(int val)
Sets the s attribute of the JSHTMLForm_1_1 object

Parameters:
val - The new s value

getN

public int getN()
Gets the n attribute of the JSHTMLForm_1_1 object

Returns:
The n value

setN

public void setN(int val)
Sets the n attribute of the JSHTMLForm_1_1 object

Parameters:
val - The new n value

getAuthorizedFor

public String getAuthorizedFor()
Gets the role name for which this user is authorized for

Returns:
The authorizedFor value

setAuthorizedFor

public void setAuthorizedFor(String val)
Sets the role name for which this user is authorized for

Parameters:
val - The new authorizedFor value

setErrorMsg

public void setErrorMsg(String errorMsg)
Sets the errorMsg attribute of the JSHTMLForm_1_1 object

Parameters:
errorMsg - The new errorMsg value

getErrorMsg

public String getErrorMsg()
Gets the errorMsg attribute of the JSHTMLForm_1_1 object

Returns:
The errorMsg value

getResults

public ResultDocList getResults()
Gets the results attribute of the JSHTMLForm_1_1 object

Returns:
The results value

getDocReader

public DocReader getDocReader()
Gets the DocReader for the first item in the results. Appropriate for getRecord requests where you're accessing a record by ID.

Returns:
The DocReader for the first result.

setResults

public void setResults(ResultDocList results)
Sets the results attribute of the JSHTMLForm_1_1 object

Parameters:
results - The new results value

getNumResults

public int getNumResults()
Gets the number of matching results.

Returns:
The numResults value

setHasMenuItemSelected

public void setHasMenuItemSelected(boolean isSelected)
Sets whether one or more itmes in a menu is selected.

Parameters:
isSelected - True if one or more items in a menu is selected, else false

getHasMenuItemSelected

public boolean getHasMenuItemSelected()
Gets whether one or more itmes in a menu is selected.

Returns:
True if one or more items in a menu is selected, else false

getUtcDates

public List getUtcDates()
A list of UTC dates in the past in the following order: one minute, one hour, one day, one week, one month, one year.

Returns:
A list of UTC dates in the past.

getDs

protected static final String getDs()
Return a string for the current time and date, sutiable for display in log files and output to standout:

Returns:
The dateStamp value

prtlnErr

protected final void prtlnErr(String s)
Output a line of text to error out, with datestamp.

Parameters:
s - The text that will be output to error out.

prtln

protected final void prtln(String s)
Output a line of text to standard out, with datestamp, if debug is set to true.

Parameters:
s - The String that will be output.

setDebug

public static void setDebug(boolean isDebugOuput)
Sets the debug attribute

Parameters:
isDebugOuput - The new debug value

DLESE Tools
v1.6.0