wt.eff
Class AddEffFormProcessor

java.lang.Object
  extended bywt.enterprise.BasicTemplateProcessor
      extended bywt.templateutil.processor.DefaultTemplateProcessor
          extended bywt.templateutil.processor.GenerateFormProcessor
              extended bywt.eff.AddEffFormProcessor
All Implemented Interfaces:
ContextHolder, ContextTranslator, Evolvable, Externalizable, Serializable, TemplateProcessor
Direct Known Subclasses:
SetEffFormProcessor

public class AddEffFormProcessor
extends GenerateFormProcessor



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
static String AUTHORIZED_BY
           
private static String CLASSNAME
           
static String CONFIG_NAME_VARIABLE_NAME
           
protected static String DEFAULT_FORM_ACTION
           
protected static String DEFAULT_FORM_METHOD
           
protected static String DEFAULT_FORM_NAME
           
protected static String DEFAULT_PROCESS_METHOD
           
protected static String DEFAULT_VALIDATE_FUNCTION_NAME
           
static String EFF_TYPE_SELECT_NAME
           
static String EFF_TYPE_VARIABLE_NAME
           
static String EFF_VALUE_VARIABLE_NAME
           
protected  EffContext effContext
           
static long EXTERNALIZATION_VERSION_UID
           
static String OBJREF_VARIABLE_NAME
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
private static ReferenceFactory rf
           
static String SEARCH_RESULT_OBJREF
           
(package private) static long serialVersionUID
           
protected static boolean VERBOSE
           
 
Fields inherited from class wt.templateutil.processor.GenerateFormProcessor
DEFAULT_LIFECYCLE, ON_CHANGE_EVENT_NAME, TEAMTEMPLATE_INPUT_NAME
 
Fields inherited from class wt.templateutil.processor.DefaultTemplateProcessor
ACTION, CLASS, CODEBASE, LINE_FEED_DELIMITER, MESSAGE_SEPARATOR, OID
 
Fields inherited from class wt.enterprise.BasicTemplateProcessor
ADD_HELP_ICON, ALL_CABINETS, BLANK_SPACE, BREAK_SEPARATOR, BREAK_TAG, componentFactory, CONTAINER_NAME, CONTENT_RESOURCE, contextClass, DEFAULT_CHARSET, DEFAULT_HELP_ICON_SELECTOR, DEFAULT_HELP_LABEL, DEFAULT_PREFERENCE_CONTEXT, DOCFROMTEMPLATE, ENABLE_HELP_ICON_PROPERTY_NAME, ENTERPRISE_SEARCH, FEDERATION_SEARCH, GLOBAL_NAVIGATION_ENABLE_HELP_ICON, globalNavBarHelpIconEnabledDefault, HELP_CONTEXT, HELP_ICON_POSITION, HELP_ICON_SELECTOR, HELP_LABEL, HELP_LABEL_RESOURCE, HELP_WINDOW_NAME, helpContext, helpIconEnabled, helpIconEnabledDefault, HOMEPAGE, IDPREFIX, IMPORT, INTEGRATED_SEARCH, isDndMicroAppletEnabled, isDndMicroAppletEnabledInitialized, LABEL_SEPARATOR, linkPrefix, LOCAL_SEARCH, pageContext, PDMLINK_INSTALL_KEY, PERSONAL_CABINET, PREF_WINDOW_NAME, PREFERENCE_CONTEXT, PRESENT_HELP_LABEL, PROJECTLINK_INSTALL_KEY, SEARCH, SHARE_ICON, TEXT_RESOURCE_BUNDLE, URL_RESOURCE, WORKLIST, wtAttribute, WTCORE_IMAGE_DIR
 
Fields inherited from interface wt.templateutil.processor.ContextTranslator
CONTEXT_LIST_IN, CONTEXT_LIST_OUT
 
Fields inherited from interface wt.templateutil.processor.ContextHolder
CONTEXT_ACTION, CONTEXT_CLASS_NAME, CONTEXT_OBJ, CONTEXT_PROPERTIES, FORM_DATA, QUERY_DATA, RESPONSE_EXCEPTIONS, RESPONSE_FOOTERS, RESPONSE_HEADERS, RESPONSE_MESSAGES, RESPONSE_STRING, STATUS
 
Constructor Summary
AddEffFormProcessor()
           
 
Method Summary
static String addFontTags(String text, String[] tags, String[] values)
          Add HTML tags to the given string text.
 void buildSearchURL(Properties properties, Locale locale, OutputStream os)
          Builds a URL to search using the ObjectSearchProcessor

Supported API: false
 void buildSearchURL(String form_action, Properties properties, Locale locale, OutputStream os)
          Builds a URL to search using the ObjectSearchProcessor

Supported API: false
protected static Properties copyProperties(Properties props)
          Returns a new Properties object with the same key-value pairs as the given properties object.
 void endForm(Properties props, Locale locale, OutputStream os)
          Outputs the ending tag for an HTML form.
protected  EffContext getContextEffContext()
          Returns the EffContext object associated with this template processor.
protected  EffManagedVersion getContextEffManagedVersion()
          Returns the EffManagedVersion object which is the context object for this processor.
 void getCurrentPageURL(Properties props, Locale locale, OutputStream os)
           
protected static EffContext getEffContextByName(String context_name)
          Attempts to retrieve an EffContext based on the given String name.
protected static String[][] getEffGroupPairs(EffManagedVersion eff_version, EffContext eff_context, Locale locale)
          Returns an array of String arrays which contain pairs used in building the drop-down list for choosing an effectivity type.
static String getHiddenFieldHTML(String name, String value)
           
static void outputConfigItemVariableName(Properties props, Locale locale, OutputStream os)
          Outputs the name of the config item name variable.
 void outputEffContextDisplayIdentity(Properties props, Locale locale, OutputStream os)
          Outputs the name of the EffContext object if one has been associated with this template processor.
 void outputEffContextObjRef(Properties props, Locale locale, OutputStream os)
          Outputs the object id of the EffContext to a hidden field in the HTML page.
 void outputEffectivityType(Properties parameters, Locale locale, OutputStream os)
          Outputs an HTML drop-down SELECT object displaying the valid effectivity types.
 void outputEffectivityValue(Properties props, Locale locale, OutputStream os)
           
static void outputFormName(Properties props, Locale locale, OutputStream os)
          Outputs the name of the form to the given output stream
static void outputHiddenField(String name, String value, PrintWriter out)
          Outputs a HIDDEN form field with the given name and given value to the given printwriter.
static void outputObjRefVariableName(Properties props, Locale locale, OutputStream os)
           
static void outputSubmitButton(Properties props, Locale locale, OutputStream os)
          Outputs the HTML code to display a 'submit' button for submitting a form.
static void outputTypeVariableName(Properties props, Locale locale, OutputStream os)
          Outputs the name of the effectivity type variable.
static void outputValueVariableName(Properties props, Locale locale, OutputStream os)
          Outputs the name of the effectivity value variable.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(AddEffFormProcessor thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void startForm(Properties props, Locale locale, OutputStream os)
          Outputs the FORM tag for starting an HTML FORM.
 void startForm(String process_method, String form_method, String form_name, String form_action, Properties props, Locale locale, OutputStream os)
          Outputs the FORM tag for starting an HTML FORM.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class wt.templateutil.processor.GenerateFormProcessor
addHiddenProperties, changedContextualValue, contextualValue, contextualValueEncoded, currentFolderId, currentFolderPath, enumeratedTypeMenu, enumeratedTypeMenuForClass, generateAction, generatePostURL, generateUpdatePostURL, getButtonText, getContentHolder, getContextualValue, getDefaultPath, getDelim, getDnDAppletTags, getEnumeratedTypeMenu, getFormat, getFormValueFromSession, getFormValueFromSession, getFormValueFromSessionWithEnumeratedPropertyDefault, getFormValueFromSessionWithPropertyDefault, getLastUpdated, getMessageURL, getObjectIdentity, getPreferenceValue, getPrimary, getPrimary, getPrimaryAttribute, getPrimaryChecksum, getPrimaryChecksum, getPrimaryDownloadURL, getPrimaryDownloadURL, getPrimaryFileName, getPrimaryFileName, getPrimaryOidString, getPrimaryOidString, getPrimaryUploadedFromPath, getPrimaryUploadedFromPath, getPrimaryUploadURL, getPrimaryUploadURL, getResponseExceptions, getResponseFooters, getResponseHeaders, getResponseMessages, getSize, getTargetType, getURLTabLink, getWTContainerRef, handleRequest, holderUploadTable, listLifeCycles, listTeamTemplates, obtainFromCovertProperty, parentFolderPath, readVersion, selectFolderMenu, selectFolderMenuForContainers, setContentHolder
 
Methods inherited from class wt.templateutil.processor.DefaultTemplateProcessor
addHiddenProperty, addToFeedbackCookie, addToFeedbackCookie, getContextPropertyValue, getCurrentUrl, getFeedbackCookieExceptions, getFeedbackCookieMessages, getHtmlTemplateFactory, getMessageSeparator, getPAGE_EXPIRATION, getPageExpirationResource, getTemplate, getTemplateDisplay, hiddenContextString, readVersion, setContextPropertyValue, setHtmlTemplateFactory, setMethodContextProperty, setNameProcessor, setPAGE_EXPIRATION, setPageExpirationResource, writeHiddenContext, writeQueryStringContext
 
Methods inherited from class wt.enterprise.BasicTemplateProcessor
AccessOK, addHTMLHelpLink, addToResponseExceptions, addToResponseFooters, addToResponseHeaders, addToResponseMessages, allVersions, bcwti, buildFormProcessorURL, buildFormProcessorURL, comment, createActionsBar, createFederationNavigationBar, createGlobalNavigationBar, createNavigationBar, createParentFolderLink, currentTimestamp, displayAllCabinets, displayAttributeName, displayAttributesTable, displayAttributeValue, displayFolderContents, displayFolderObject, displayFolderTrail, displayGoToLatestLink, displayOrganizationIdentifier, displayPendingChangeIndicator, displayStyleSheetAttributesTable, displayVisualData, formatDate, getActionPairs, getAllCabinetsURL, getBaselineItems, getCharsetEncoding, getCheckedOutFolderURL, getClassIcon, getClassInfo, getContextAction, getContextClass, getContextClassName, getContextListIn, getContextListOut, getContextObj, getContextProperties, getContextServiceName, getDisplayName, getDomainPath, getEnabledVersion, getEncoding, getFederationSearchURL, getFolderLocation, getFolderPath, getFormData, getGenericInstanceIconImgTag, getGlyphImageTag, getGlyphsArray, getGlyphTagsNoDnD, getHelpContext, getHomepageURL, getHTMLComponentFactory, getHTMLHelpLink, getHTMLHelpURL, getHTMLHelpURL, getHTMLTableService, getIconResource, getIconResource, getIconResource, getIconSelector, getId, getJavaScriptManager, getLocalizedDateFormatMessage, getLocalizedMessage, getLocalizedPrintWriter, getLocalizedString, getObjectDnDIcon, getObjectIcon, getObjectIconDnDTag, getObjectIconGlyphs, getObjectIconImgTag, getObjectIconImgTag, getObjectIconImgTag, getObjectIconImgTag, getObjectIconImgTag, getObjectIconImgTag, getObjectPropertyValueString, getObjectPropertyValueString, getPageContext, getParentFolderLink, getPersonalCabinet, getPersonalCabinetURL, getPreferenceValue, getPrincipalEmailLink, getPrincipalEmailLink, getPrintWriter, getPropertyFromPropertyFile, getQuery, getQueryData, getReferenceString, getReferenceString, getResourceString, getResourceString, getResponseExceptions, getResponseFooters, getResponseHeaders, getResponseMessages, getResponseString, getSearchCriteriaURL, getSearchCriteriaURL, getSearchResultsURL, getShareImage, getShareImage, getState, getStatus, getStringFromResourceBundle, getStringFromResourceBundle, getTemplateDisplayGeneral, getTrailId, getTrlIdAttribute, getURLActions, getURLActions, getURLActions, getURLActions, getURLActionsString, getURLActionsString, getURLFactory, getURLFromDelegate, getURLProcessorLink, getURLProcessorLink, getURLProcessorLink, getURLProcessorLinkWithLabel, getUsedByLinks, getWCColor, getWCColor, getWCColorDec, getWCColorDec, getWCFontFamily, getWCFontFamily, getWorklistURL, getWTAttribute, getWTContainerByName, handleExceptionTP, handleExceptionTP, handleProcessorException, include, initJavaScriptManager, isDndMicroAppletEnabled, isEqual, listContent, objectActionLink, objectActionLinkAux, objectActionLinkAux, objectActionLinkAux, objectActionLinkAux, objectActionLinkAux, objectActionLinkAux, objectActionLinkAux, objectBackground, objectIdentification, objectIdentifier, objectProperties, objectPropertyName, objectPropertyNameAux, objectPropertyNameAux2, objectPropertyValue, objectPropertyValueAux, objectPropertyValueAux2, objectPropertyValueString, outputLink, outputPropertyFromPropertyFile, parameterValue, partUsedBy, PDMLinkIsInstalled, printQueryTable, printTable, printTextArea, processSubTemplate, readContext, readVersion, setColumnProperties, setContextAction, setContextClass, setContextClassName, setContextListIn, setContextListOut, setContextObj, setContextProperties, setFormData, setHelpContext, setHTMLTableService, setJavaScriptManager, setPageContext, setQueryData, setResponseExceptions, setResponseFooters, setResponseHeaders, setResponseMessages, setResponseString, setState, setStatus, showResponseExceptions, showResponseFooters, showResponseHeaders, showResponseMessage, showResponseMessages, showVersions, sortQueryResult, splitStringIntoTokens, tableService, translateToHtml, useProcessorService, visualizationIsEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

VERBOSE

protected static boolean VERBOSE

DEFAULT_FORM_METHOD

protected static String DEFAULT_FORM_METHOD

DEFAULT_FORM_NAME

protected static String DEFAULT_FORM_NAME

DEFAULT_PROCESS_METHOD

protected static String DEFAULT_PROCESS_METHOD

DEFAULT_FORM_ACTION

protected static String DEFAULT_FORM_ACTION

DEFAULT_VALIDATE_FUNCTION_NAME

protected static String DEFAULT_VALIDATE_FUNCTION_NAME

effContext

protected EffContext effContext

OBJREF_VARIABLE_NAME

public static String OBJREF_VARIABLE_NAME

SEARCH_RESULT_OBJREF

public static String SEARCH_RESULT_OBJREF

CONFIG_NAME_VARIABLE_NAME

public static String CONFIG_NAME_VARIABLE_NAME

EFF_TYPE_SELECT_NAME

public static String EFF_TYPE_SELECT_NAME

EFF_TYPE_VARIABLE_NAME

public static String EFF_TYPE_VARIABLE_NAME

EFF_VALUE_VARIABLE_NAME

public static String EFF_VALUE_VARIABLE_NAME

AUTHORIZED_BY

public static final String AUTHORIZED_BY
See Also:
Constant Field Values

rf

private static ReferenceFactory rf
Constructor Detail

AddEffFormProcessor

public AddEffFormProcessor()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class GenerateFormProcessor
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class GenerateFormProcessor
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(AddEffFormProcessor thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

buildSearchURL

public void buildSearchURL(Properties properties,
                           Locale locale,
                           OutputStream os)
                    throws WTException
Builds a URL to search using the ObjectSearchProcessor

Supported API: false

Parameters:
properties -
locale -
os -
Throws:
WTException

outputEffectivityType

public void outputEffectivityType(Properties parameters,
                                  Locale locale,
                                  OutputStream os)
Outputs an HTML drop-down SELECT object displaying the valid effectivity types. If a configuration item has already been set, the effectivity types available are taken from the configuration item.

Supported API: false

Parameters:
parameters -
locale -
os -

outputObjRefVariableName

public static void outputObjRefVariableName(Properties props,
                                            Locale locale,
                                            OutputStream os)

outputEffectivityValue

public void outputEffectivityValue(Properties props,
                                   Locale locale,
                                   OutputStream os)

startForm

public void startForm(Properties props,
                      Locale locale,
                      OutputStream os)
               throws WTException
Outputs the FORM tag for starting an HTML FORM. If a value for the key, "context_action", has been given in the given Properties object, this method will only output the form if the given action matches the context action. This method allows HTML templates containing form elements to be used within a larger form.

Parameters:
props - the Properties object containing parameters passed in the SCRIPT call
locale - the Locale of the client
os - the OutputStream to write the FORM to
Throws:
WTException

endForm

public void endForm(Properties props,
                    Locale locale,
                    OutputStream os)
Outputs the ending tag for an HTML form. If a value for the key, "context_action", has been given in the given properties object, this method will only output the form tag if the given action matches the context action. This method allows HTML templates containing form elements to be used within larger forms.

Parameters:
props - the Properties object containing parameters passed in the SCRIPT call
locale - the Locale of the client
os - the OutputStream to write the FORM to

outputSubmitButton

public static void outputSubmitButton(Properties props,
                                      Locale locale,
                                      OutputStream os)
Outputs the HTML code to display a 'submit' button for submitting a form. If a value for the key, "label", has been given in the given Properties object, that value will be used as the label of the submit button.

Parameters:
props - the Properties object containing parameters passed in the SCRIPT call
locale - the Locale of the client
os - the OutputStream to write the submit button to

copyProperties

protected static Properties copyProperties(Properties props)
Returns a new Properties object with the same key-value pairs as the given properties object.

Parameters:
props - the Properties object to copy
Returns:
the copied Properties object

getEffGroupPairs

protected static String[][] getEffGroupPairs(EffManagedVersion eff_version,
                                             EffContext eff_context,
                                             Locale locale)
Returns an array of String arrays which contain pairs used in building the drop-down list for choosing an effectivity type. The pair consists of the String to display in the list and the String representation of the Class indicating the type.


getContextEffManagedVersion

protected EffManagedVersion getContextEffManagedVersion()
Returns the EffManagedVersion object which is the context object for this processor. It is possible that the context object is not an EffManagedVersion - e.g., the context object could be a change order or change activity. In that case, null is returned.


getContextEffContext

protected EffContext getContextEffContext()
Returns the EffContext object associated with this template processor. If no EffContext is currently associated with this template processor, return null.


getCurrentPageURL

public void getCurrentPageURL(Properties props,
                              Locale locale,
                              OutputStream os)

outputEffContextDisplayIdentity

public void outputEffContextDisplayIdentity(Properties props,
                                            Locale locale,
                                            OutputStream os)
Outputs the name of the EffContext object if one has been associated with this template processor.


outputEffContextObjRef

public void outputEffContextObjRef(Properties props,
                                   Locale locale,
                                   OutputStream os)
                            throws WTException
Outputs the object id of the EffContext to a hidden field in the HTML page. If no EffContext exists, no hidden field is output

Throws:
WTException

outputHiddenField

public static void outputHiddenField(String name,
                                     String value,
                                     PrintWriter out)
Outputs a HIDDEN form field with the given name and given value to the given printwriter.

Parameters:
name - the Name of the hidden field
value - the value of the hidden field
out - the PrintWriter to write to.

getHiddenFieldHTML

public static String getHiddenFieldHTML(String name,
                                        String value)

outputFormName

public static void outputFormName(Properties props,
                                  Locale locale,
                                  OutputStream os)
Outputs the name of the form to the given output stream


outputTypeVariableName

public static void outputTypeVariableName(Properties props,
                                          Locale locale,
                                          OutputStream os)
Outputs the name of the effectivity type variable.


outputValueVariableName

public static void outputValueVariableName(Properties props,
                                           Locale locale,
                                           OutputStream os)
Outputs the name of the effectivity value variable.


outputConfigItemVariableName

public static void outputConfigItemVariableName(Properties props,
                                                Locale locale,
                                                OutputStream os)
Outputs the name of the config item name variable.


addFontTags

public static String addFontTags(String text,
                                 String[] tags,
                                 String[] values)
Add HTML tags to the given string text. The tags and their corresponding vaues are passed in the two given String arrays.

Parameters:
text - the String text to wrap with FONT tags
tags - an array of String FONT tags
values - an array of String values which correspond to the given font tags.
Returns:
the given text wrapped in FONT tags.

getEffContextByName

protected static EffContext getEffContextByName(String context_name)
                                         throws WTException
Attempts to retrieve an EffContext based on the given String name. This method will query using the given name for an EffContext.

Parameters:
context_name - the String name of the EffContext to search for
Returns:
the EffContext corresponding to the given name.
Throws:
WTException

startForm

public void startForm(String process_method,
                      String form_method,
                      String form_name,
                      String form_action,
                      Properties props,
                      Locale locale,
                      OutputStream os)
               throws WTException
Outputs the FORM tag for starting an HTML FORM. If a value for the key, "context_action", has been given in the given Properties object, this method will only output the form if the given action matches the context action. This method allows HTML templates containing form elements to be used within a larger form.

Parameters:
process_method - The name of the method on URLProcessor that will respond to the POST or GET
form_method - POST or GET
form_name - The name of the form. This is used by JavaScript methods in the HTML template
form_action - The context action which gets invoked after the user has selected a Configuration Item or Product.
props - the Properties object containing parameters passed in the SCRIPT call
locale - the Locale of the client
os - the OutputStream to write the FORM to
Throws:
WTException

buildSearchURL

public void buildSearchURL(String form_action,
                           Properties properties,
                           Locale locale,
                           OutputStream os)
                    throws WTException
Builds a URL to search using the ObjectSearchProcessor

Supported API: false

Parameters:
form_action - The context action which gets invoked after the user has selected a Configuration Item or Product.
properties -
locale -
os -
Throws:
WTException