com.ibm.commerce.command
Class CommandContextImpl

java.lang.Object
  |
  +--com.ibm.commerce.command.CommandContextImpl
All Implemented Interfaces:
java.lang.Cloneable, CommandContext, ECConstants

public class CommandContextImpl
extends java.lang.Object
implements CommandContext, ECConstants

The command context contains session and user information. It is set in the controller command before the execute method is called


Field Summary
protected  long activityId
           
protected  DeviceFormatAdapter adapter
           
protected  UserDependantInfo curUserInfo
           
 java.lang.String preferredCurrency
           
 java.lang.Integer preferredLanguage
           
protected  java.lang.Object request
           
protected  java.lang.Object response
           
protected  java.lang.String webpath
           
 
Fields inherited from interface com.ibm.commerce.command.CommandContext
COPYRIGHT
 
Fields inherited from interface com.ibm.commerce.server.ECConstants
CFG_MERCHANT_KEY, COPYRIGHT, EC_ACC_ALL_RESOURCES, EC_ACC_CONTROLLER, EC_ACC_DEFAULT_POLICYMANAGER_CLASSNAME, EC_ACC_DEFAULT_POLICYMANAGER_CREATEINSTANCE_METHOD, EC_ACC_VIEW, EC_ADDR_PERMANENT, EC_ADDR_RN, EC_ADDR_TEMPORARY, EC_ADDRESS, EC_ADDRESSBOOK, EC_ADMIN_USER_TYPE, EC_BAD_PARAM, EC_BC_ENDTIME, EC_BC_JOBNBR, EC_BC_STATE, EC_BILLTO, EC_BUNDLE_BEAN, EC_CACHE_AUTOPAGEINVALIDATION, EC_CACHE_CACHE, EC_CACHE_CACHEABLEURL, EC_CACHE_CLEANUP_FILENAME, EC_CACHE_CLEANUPAGENTHOSTNAME, EC_CACHE_CLEANUPAGENTPORT, EC_CACHE_CLEANUPPOLLINGINTERVAL, EC_CACHE_CONNECTIONTIMEOUT, EC_CACHE_DAEMONBINDADDRESS, EC_CACHE_DAEMONMAXTHREADS, EC_CACHE_DAEMONPORT, EC_CACHE_DEL_HASHKEY, EC_CACHE_DEL_HASHVALUE, EC_CACHE_DEL_MEMBERKEY, EC_CACHE_DEL_MEMBERVALUE, EC_CACHE_DEL_URLNAME, EC_CACHE_DIRSPERMEMBER, EC_CACHE_ENABLED, EC_CACHE_FILEPATH, EC_CACHE_HASHKEY, EC_CACHE_ISMANDATORY, EC_CACHE_KEY, EC_CACHE_KEYNAME, EC_CACHE_KEYSET, EC_CACHE_MAXALLOWEDREFRESHPERIOD, EC_CACHE_MAXOBJECTSPERMEMBER, EC_CACHE_MEMBERKEY, EC_CACHE_NAME, EC_CACHE_SESSIONDEPENDENT, EC_CACHE_STORECLASSNAME, EC_CACHE_WEBAPPPATH, EC_CATALOG_ENTRY_ID, EC_CATALOG_ID, EC_CATEGORIES, EC_CATEGORY_ID, EC_CATEGORY_IDENTIFIER, EC_CATEGORY_NAME, EC_CC_NUMBER, EC_CC_TYPE, EC_CCV_CODE, EC_CCX_MONTH, EC_CCX_YEAR, EC_CFG_AUTHENTICATIONMODE, EC_CFG_CMD_PASSWORD_PROT_RETRIES, EC_CFG_CMD_PASSWORD_PROTECTION, EC_CFG_COOKIE, EC_CFG_COOKIE_ACCEPTANCE, EC_CFG_COOKIE_DOMAIN, EC_CFG_COOKIE_ENCRYPT, EC_CFG_COOKIE_PATH, EC_CFG_COOKIE_PERSIST, EC_CFG_COOKIE_SSLAUTH, EC_CFG_COOKIE_TRACE, EC_CFG_ENABLED, EC_CFG_FALSE, EC_CFG_IN_NON_SSL_PORT, EC_CFG_IN_SSL_PORT, EC_CFG_LOGIN_TIMEOUT, EC_CFG_NAME, EC_CFG_NON_SSLPORT, EC_CFG_OUT_NON_SSL_PORT, EC_CFG_OUT_SSL_PORT, EC_CFG_PASSWORD_INVALIDATION, EC_CFG_POLICYMANAGER_CLASSNAME, EC_CFG_POLICYMANAGER_CREATEINSTANCE_METHOD, EC_CFG_SSL_ACCELERATOR_OPTION, EC_CFG_SSLPORT, EC_CFG_TRUE, EC_CFG_URLMAPPER, EC_CFG_URLREWRITE, EC_CFG_VALUE, EC_CFG_WAS_PERSIST, EC_CFG_WCS_PERSIST, EC_CFG_X_SITE_SCRIPT, EC_CFG_X509, EC_CLEAR_FOR_USER, EC_CMDBEAN, EC_COLLAB_BASE_DN, EC_COLLAB_ENABLE, EC_COLLAB_LDAP_ADMIN, EC_COLLAB_LDAP_HOSTNAME, EC_COLLAB_LDAP_PASSWORD, EC_COLLAB_LDAP_PORT, EC_COLLAB_QP_COLLABADMIN_LOGON, EC_COLLAB_QP_COLLABADMIN_PASSWORD, EC_COLLAB_QP_DOMAIN, EC_COLLAB_QP_HOST, EC_COLLAB_QP_LOCALE, EC_COLLAB_QP_QPADMIN_LOGON, EC_COLLAB_QP_QPADMIN_PASSWORD, EC_COLLAB_WEBSERVER_HOSTNAME, EC_COMMANDCONTEXT, EC_COMMENT, EC_COMPONENT, EC_COMPONENT_CLASS, EC_COMPONENT_ENABLE, EC_COMPONENT_HTTPWEBCONTROLLER, EC_COMPONENT_NAME, EC_COMPONENT_PROPERTY, EC_COMPONENTS, EC_CONF_MSLOGNAME, EC_CONF_MSLOGTYPE, EC_CONF_TRACE_MASK, EC_CONTENTLENGTH, EC_CONTENTTYPE, EC_CONTRACT_CMD_GET_ELIGIBLE_TA_IDS, EC_CONTRACT_ID, EC_COOKIE_ERROR_VIEW, EC_COOKIE_ExternalReferrer, EC_CURRCONTRACTS_ID, EC_CURRCONTRACTSSSL_ID, EC_CURRENCY_ID, EC_CURRENCY_SYM, EC_DATABEAN_DEEPFETCH, EC_DEFAULT_ATTRIBUTE_VAL_LANGUAGE, EC_DEFAULT_INIT_TRANSACTION_TIMEOUT, EC_DEFAULT_STORE_ALIAS, EC_DEFAULT_TRANSACTION_TIMEOUT, EC_DISPLAY_BEAN, EC_DOCPATHNAME, EC_ELGBCONTRACTS_ID, EC_ELGBCONTRACTSSSL_ID, EC_EMPTY_STRING, EC_ERROR_CODE, EC_ERROR_JSP_NAME, EC_ERROR_VIEWNAME, EC_ERRORCODE, EC_EXCEPTION, EC_FIELD1, EC_FIELD2, EC_FIELD3, EC_FOR_USER, EC_FOR_USER_ID, EC_FORCED_PASSWORD_CHANGE_PAGE, EC_GENERIC_APP_ERROR_VIEW, EC_GENERIC_CMD, EC_GENERIC_DIRECTVIEW, EC_GENERIC_ERROR_PAGE, EC_GENERIC_FORWARDVIEW, EC_GENERIC_HTTPS_REDIRECTVIEW, EC_GENERIC_LOGONFORM, EC_GENERIC_PVCTIMEOUTFORM, EC_GENERIC_REDIRECTVIEW, EC_GENERIC_SYS_ERROR_VIEW, EC_GENERIC_USER_ID, EC_GENERIC_USER_REFNUM, EC_GENERIC_USER_TIMESTAMP, EC_GENERIC_USER_TYPE, EC_HTTP_DEVFMT, EC_HTTP_DEVFMTID_BROWSER, EC_HTTP_DEVFMTNAME_BROWSER, EC_HTTP_DEVFMTNAME_PVC, EC_HTTP_DEVFMTS, EC_HTTP_DEVFMTTYPID_BROWSER, EC_HTTP_DEVFMTTYPID_PVC, EC_HTTP_DEVFMTTYPID_XML, EC_HTTP_HDR_CACHE_CONTROL, EC_HTTP_ReferrerHeader, EC_HTTP_VALUE_PRIVATE, EC_HTTPADAPTER, EC_HTTPADAPTERS, EC_HTTPWEBCONTROLLER, EC_IBM_ENETWORK_30, EC_IILIST_ATTR_NAME, EC_IILIST_ATTR_VALUE, EC_IILIST_DISPLAYSEQ, EC_IILIST_FIELD1, EC_IILIST_FIELD2, EC_IILIST_FIELD3, EC_IILIST_ID, EC_IILIST_ID_NAME, EC_IILIST_MEMBER_ID, EC_IILIST_UOM, EC_IMERCHANT, EC_IN_IILIST_ID, EC_IN_IILIST_ID_NAME, EC_IN_IILIST_MEMBER_ID, EC_INIT_PARM_CONFIGFILE, EC_INIT_PARM_INSTANCENAME, EC_INIT_TRANSACTION_TIMEOUT, EC_INPUT_STREAM, EC_INSTANCE_INSTALL_DIR, EC_INSTANCE_NAME, EC_INVALID_PARM, EC_ITEM_BEAN, EC_JDBC_JNDINAME, EC_JSP_ADDR_ADD, EC_JSP_ADDR_UPDATE, EC_JSP_CHECK_INV_ERR, EC_JSP_COM_ERR, EC_JSP_LOGON_DSP, EC_JSP_ORD_DSP_COM, EC_JSP_ORD_DSP_PEN, EC_JSP_ORD_LST_COM, EC_JSP_ORD_LST_PEN, EC_JSP_ORD_OK, EC_JSP_PWD_ADMIN, EC_JSP_PWD_RESET, EC_JSP_PWD_UPDATE, EC_JSP_PWD_USER_AUTH, EC_JSP_REG_NEW, EC_JSP_REG_UPDATE, EC_JSP_SHIPTO_ASSOC, EC_JSP_SHIPTO_DSP, EC_JSP_SHIPTO_LST, EC_JSP_SHOPCART_DSP, EC_KRYPTO, EC_LANGUAGE_ID, EC_LDAP_OP_ONE_WAY, EC_LDAP_OP_TWO_WAY, EC_LDAP_OP_UNAVAIL, EC_LOCAL_HOST, EC_LOGIN_DEFAULT_TIMEOUT_VALUE, EC_LOGIN_RETURN_URL, EC_LOGIN_TIMEOUT, EC_LOGIN_TIMEOUT_ERROR_MSGCODE, EC_LOGIN_TIMEOUT_ERROR_VIEW, EC_LOGIN_TIMEOUT_VALUE, EC_LOGON_FAILED, EC_LOTUS_DOMINO_50, EC_MALLFOOT, EC_MALLHEAD, EC_MBRGRP_CUSTOMER, EC_MBRGRP_CUSTOMER_AGENT, EC_MBRGRP_SITE_ADMIN, EC_MBRGRP_STORE_ADMIN, EC_MBRGRPTYPE_ACCESS_GROUP, EC_MBRGRPTYPE_USER_GROUP, EC_MEMBER_AUTHENTICATIONMODE, EC_MEMBER_ID, EC_MERCHANT_KEY, EC_MERCHANT_PRODUCT, EC_MERCHANTFOOT, EC_MERCHANTHEAD, EC_MERCHANTKEY, EC_MM_CFG_CLASS, EC_MM_CFG_CONFIGURATION, EC_MM_CFG_ID, EC_MM_CFG_NAME, EC_MQWEBCONTROLLER, EC_NETSCAPE_DIR_40, EC_NO_STOREID, EC_NONENCRYPTED_PARAM_NAME, EC_NONENCRYPTED_PARAMETER, EC_NONENCRYPTED_PARAMETERS, EC_NONHTTPADAPTER, EC_NONHTTPADAPTERS, EC_NULLSTRING, EC_ORDER_RN, EC_ORDER_STATE, EC_ORDERITEM_RN, EC_ORDERLISTSUMMARY, EC_ORDERSUMMARY, EC_ORDERTOTALS, EC_ORIGINATING_COMMAND, EC_OUT_IILIST_DESC, EC_OUT_IILIST_ID, EC_OUT_IILIST_ID_NAME, EC_PACKAGE_BEAN, EC_PARORG_ID, EC_PARORGSSL_ID, EC_PASSWORD, EC_PASSWORD_EXPIRED_FLAG, EC_PASSWORD_PROTECTED_CMD, EC_PASSWORD_PROTECTED_CMDS, EC_PASSWORD_REREQUEST_CHECKRESULT, EC_PASSWORD_REREQUEST_ERRORVIEW, EC_PASSWORD_REREQUEST_FOR_CMD, EC_PASSWORD_REREQUEST_MSGCODE, EC_PASSWORD_REREQUEST_PASSWORD1, EC_PASSWORD_REREQUEST_PASSWORD2, EC_PASSWORD_REREQUEST_URL, EC_PASSWORD_REREQUEST_VIEW, EC_PAYINFO_ORDER_RN, EC_PAYINFO_URL, EC_PAYMTHDID, EC_PRC_CURRENCY, EC_PRC_FIELD1, EC_PRC_FIELD2, EC_PRC_MERCHANT_REF_NUM, EC_PRC_PRECEDENCE, EC_PRC_PRICE, EC_PRC_PRICE_REF_NUM, EC_PRC_PRODUCT_REF_NUM, EC_PRC_SHOPPER_GROUP_REF_NUM, EC_PRC_TIME_BEGIN, EC_PRC_TIME_END, EC_PRODUCT, EC_PRODUCT_BEAN, EC_PRODUCT_ID, EC_PRODUCT_SKU, EC_PRODUCTS, EC_PROHIB_CHAR_ENCODING_ATT, EC_PROHIB_CHAR_ENCODING_CMD, EC_PROHIB_CHARS_ENCODING, EC_PROHIB_CHARS_ENCODING_ERROR_PAGE, EC_PROHIBITED_ATTR, EC_PROHIBITED_ATTR_ERROR_PAGE, EC_PROHIBITED_ATTRIBUTES, EC_PROHIBITED_CHAR, EC_PROHIBITED_CHAR_ERROR_PAGE, EC_PROHIBITED_CHARS, EC_PROPERTIES, EC_PROPERTIES_DATABASE, EC_PROPERTIES_DB, EC_PROPERTIES_DBACTIVE, EC_PROPERTIES_DBACTIVE_VALUE, EC_PROPERTIES_DBMS_NAME, EC_PROPERTIES_INSTANCE, EC_PROTECTED_PARAM_NAME, EC_PROTECTED_PARAM_VALUE, EC_PROTECTED_PARAMETER, EC_PROTECTED_PARAMETERS, EC_PROTECTED_VIEW, EC_PROTECTED_VIEW_NAME, EC_PROTECTED_VIEWS, EC_PVC_ADDRESS1, EC_PVC_ADDRESS2, EC_PVC_ADDRTYPE1, EC_PVC_ADDRTYPE2, EC_PVC_ALREADY_REGISTERED, EC_PVC_B_ERR, EC_PVC_B_EXEC, EC_PVC_B_NEW, EC_PVC_B_NO, EC_PVC_B_UPDATE, EC_PVC_B_URL, EC_PVC_BROWSER, EC_PVC_BUF_ACTION, EC_PVC_BUF_TIMEOUT, EC_PVC_LOGONSTATUS, EC_PVC_MULTIPLE_DEVICE, EC_PVC_REENTPW, EC_PVC_REENTPW_FORM, EC_PVC_SINGLE_DEVICE, EC_PVC_USER_ALREADY_REGISTERED, EC_PVCADAPTER, EC_PVCADAPTERS, EC_PVCMODE_ACCEPT, EC_PVCMODE_REENTER_PWD, EC_PVCMODE_REJECT, EC_QUANTITY, EC_QUERYSTRING_DELIM, EC_RAWDOCUMENT, EC_REDIRECTURL, EC_REGISTRIES, EC_REGISTRY, EC_REGISTRY_CAPACITY, EC_REGISTRY_CLASS, EC_REGISTRY_ITEM_ADD, EC_REGISTRY_ITEM_DELETE, EC_REGISTRY_ITEM_UPDATE, EC_REGISTRY_LOAD_FACTOR, EC_REGISTRY_MAX_SIZE, EC_REGISTRY_NAME, EC_REQ_DEFAULT_NON_SSL_PORT, EC_REQ_DEFAULT_SSL_PORT, EC_REQ_HTTP, EC_REQ_HTTPS, EC_REQHDR_HOST, EC_REQUESTPROPERTIES, EC_RETRIABLE_CMD, EC_RF_ACTION, EC_RF_ITEM_KEY, EC_RF_REGISTRY_NAME, EC_SCHED_APPLICATION_TYPE, EC_SCHED_APPLICATIONNAME, EC_SCHED_APPLICATIONTYPE, EC_SCHED_APPTYPE_BROADCAST, EC_SCHED_APPTYPE_DEFAULT, EC_SCHED_ATTEMPTS, EC_SCHED_AUTOCLEAN, EC_SCHED_BROADCAST, EC_SCHED_BROADCASTEXPIRETIME, EC_SCHED_CHKCMD_ID, EC_SCHED_CLONEID, EC_SCHED_COMMAND, EC_SCHED_CYCLETIME, EC_SCHED_DEFAULT_DELAYTIME, EC_SCHED_DELAY, EC_SCHED_END_TIME, EC_SCHED_HOST, EC_SCHED_HOSTNAME, EC_SCHED_INTERVAL, EC_SCHED_JOB_ACTIVE, EC_SCHED_JOB_DELETED, EC_SCHED_JOBINSTREFNUM, EC_SCHED_JOBREFNUM, EC_SCHED_MAXNUMOFTHREADS, EC_SCHED_NAME, EC_SCHED_ON, EC_SCHED_PARAMETERS, EC_SCHED_POLICY, EC_SCHED_POLICY_MAINTAIN_SEQUENCE, EC_SCHED_POLICY_NOT_MAINTAIN_SEQUENCE, EC_SCHED_POLICY_RUNMISSEDJOBS, EC_SCHED_POLICY_SKIPMISSEDJOBS, EC_SCHED_PRIORITY, EC_SCHED_RESULT_FAILED, EC_SCHED_RESULT_SUCCESS, EC_SCHED_START_TIME, EC_SCHED_STATE, EC_SCHED_STATE_COMPLETED, EC_SCHED_STATE_COMPLETED_FAILED, EC_SCHED_STATE_IDLE, EC_SCHED_STATE_IDLE_FAILED, EC_SCHED_STATE_RUNNING, EC_SCHED_STATE_RUNNING_FAILED, EC_SCHED_STATE_WAITING, EC_SCS_ENDTIME, EC_SCS_INSTREFNUM, EC_SCS_JOBNBR, EC_SCS_QUEUE, EC_SCS_STATE, EC_SERVERPORT, EC_SESSCONTRACTS_ID, EC_SESSCONTRACTSSSL_ID, EC_SESSION_ACCEPTVALUE, EC_SESSION_COOKIEACCEPT, EC_SESSION_ID, EC_SESSIONDATA_ID, EC_SHIPMODE_RN, EC_SHOPPINGCART, EC_SITE_DEFAULT_LANGID, EC_SITE_ORGANIZATION, EC_SITE_SUPPORTED_LANGIDS, EC_SQL_CURRENT_TIMESTAMP, EC_START_TIME, EC_START_TIME_NANOS, EC_STATUS, EC_STORE_ENTITY_ID, EC_STORE_ID, EC_STR_EMPTY, EC_TECHNOLOGY_JSP, EC_TECHNOLOGY_XML, EC_TEXTDOCUMENT, EC_TIMEDOUT_USER_ID, EC_TIMEDOUT_USER_URL, EC_TIMESTAMP_PATTERN, EC_TRANSACTION_TIMEOUT, EC_UID, EC_UNITIALIZED_COMMAND, EC_UOM, EC_UPDATEABLE, EC_URL, EC_URL_PATH_SEPARATOR, EC_USE_STORE_DIR, EC_USER, EC_USER_ADMINISTRATOR, EC_USER_REGISTERED, EC_USER_SITE_ADMINISTRATOR, EC_USERNAME, EC_VIEWNAME, EC_VIEWTASKNAME, EC_WASSESSION_CONTRACTIDS, EC_WASSESSION_CURRENCYID, EC_WASSESSION_EXPIRYTIME, EC_WASSESSION_LANGID, EC_WASSESSION_LOCALE, EC_WASSESSION_LOGONTIME, EC_WASSESSION_STOREID, EC_WASSESSION_USERID, EC_WCS_SESSION_EXPIRED, EC_WCS_SESSION_EXPIRY, EC_WCS_SESSION_INFO, EC_WCS_SESSION_LAST_USER, EC_WCS_SESSION_LOGON, EC_WCS_SESSION_RELOGON, EC_WCS_SESSION_RELOGONURL, EC_WCS_SESSION_STATUS, EC_WCSADMIN, EC_WEBPATH, EC_WEBSERVER_HOSTNAME, EC_WILDCARD_CHAR, EC_X_SITE_SCRIPTING, EC_X509_ERROR_VIEW
 
Constructor Summary
CommandContextImpl()
          Default CommandContextImpl Constructor.
 
Method Summary
 java.lang.Long becomeUser(java.lang.Long userId)
          Become another user.
 java.lang.String buildRedirectUrl(TypedProperty prop)
          Returns a redirect url with the properties are part of parameters for the url.
 boolean canUserExecuteCommand(AccCommand command)
          This methods checks whether the user can execute a command.
 void changeStore(java.lang.Integer newValue)
          Changes the store and store associated information
 void changeUser(java.lang.Long newValue)
          Changes the user and information associated with user
 java.lang.Object clone()
          This method returns a clone of this command context.
 void generateLogId()
          Generate a Log Id.
 long getActivityId()
          Gets the activity ID associated with this command.
 boolean getAsyncCommand()
          Returns true if this command is an asynchronize command.
 boolean getCachePage()
          Gets the cache page value.
 boolean getClearForUser()
          Returns true if the parameter for clearing the for User Id is set.
 ECCommand getCommand()
          Gets the command.
 java.lang.String getCommandName()
          Gets the name of the command.
 java.lang.String getCountry()
          Gets the 2 character country code associated with this command.
 java.lang.String getCurrency()
          Gets the negotiated currency code associated with this request.
 java.lang.String getCurrentCommandName()
          Gets the class name of the current command.
 java.lang.String getCurrentTradingAgreementIdsAsString()
          Gets the eligible trading agreement ids as a string seperated by ";" For Internal use only.
 TradingAgreementAccessBean[] getCurrentTradingAgreements()
          Gets the current set of trading agreements.
 java.lang.Integer getDefaultDeviceFormat()
          Gets the default device type to be used for this request.
 DeviceFormatAdapter getDeviceFormatAdapter()
          Gets the device format adapter associated with this request.
 java.lang.Integer getDeviceFormatId()
          Gets the device format Id associated with this request.
 java.lang.Integer getDeviceFormatTypeId()
          Gets the device format type associated with this request.
 java.lang.Integer getDeviceType()
          Gets the device format type associated with this request.
 java.lang.String getDocumentPathName(java.lang.String baseName)
          Return the output document path name based on a base name.
 java.lang.String[] getEligibleTradingAgreementIds()
          Gets the eligible trading agreemnt ids as an array for type contract only.
 java.lang.String getEligibleTradingAgreementIdsAsString()
          Gets the eligible trading agreement ids as a string seperated by ";" For Internal use only.
 java.lang.String getEncCurContr()
          Insert the method's description here.
 java.lang.String getEncElgContr()
          Insert the method's description here.
 java.lang.String getEncParOrg()
          Insert the method's description here.
 java.lang.String getEncParOrgAndCurContr()
          Insert the method's description here.
 java.lang.String getEncSesContr()
          Insert the method's description here.
 java.lang.String getErrorViewName()
          Gets the error view name.
 java.sql.Timestamp getExpiryDate()
          Gets the expiry date for a cached page.
 java.lang.Long getForUserId()
          Gets the for user ID for this command.
 java.lang.Integer getInitialPreferredLanguage()
          Gets the preferred language Id for this request.
 java.lang.String getLanguage()
          Gets the language associated with this request.
 java.lang.Integer getLanguageId()
          Gets the negotiated language Id for this request.
 java.util.Locale getLocale()
          Returns the locale for this command.
 java.util.Locale getLocale(java.lang.Integer languageId)
          Returns the locale associated with a given language.
 java.lang.String getLocaleVariant()
          Gets the locale variant associated with this request.
 long getLogId()
          Gets the Log id.
 StoreAccessBean getNonNullStore()
          Returns a non null store access bean object.
 java.lang.Long getOriginalUserId()
          Gets the user ID for the caller of this request.
 java.lang.String getParentOrg()
          Insert the method's description here.
 java.lang.String getPreferredCurrency()
          Gets the preferred currency code associated with this request.
 java.lang.Integer getPreferredLanguage()
          Gets the preferred language Id for this request.
 java.lang.String getRedirectionURL()
          Gets the redirect URL for this request.
 java.lang.String getRemoteAddr()
          Gets the address of the remote host.
 java.lang.String getRemoteHost()
          Gets the name of the remote host.
 java.lang.Object getRequest()
          Gets the request object associated with this request.
 TypedProperty getRequestProperties()
          Gets the request properties associated with this request.
 java.lang.String getResolvedQueryString()
          Gets the interpreted request properties as a queryString.
 java.lang.Object getResponse()
          Gets the response object associated with this request.
 boolean getResult()
          Gets the result of this request.
 SessionContext getSessionContext()
          Gets the SessionContext associated with this request.
 SessionData getSessionData()
          Gets the session data associated with this request.
 java.lang.String getSessionTradingAgreementIdsAsString()
          Gets the session trading agreement ids as a string seperated by ";" This method is for internal use only.
 StoreAccessBean getStore()
          Gets the store access bean for this request.
 StoreAccessBean getStore(java.lang.Integer aStoreId)
          Gets the store access bean based on a store Id.
 java.lang.Integer getStoreId()
          Gets the store Id for this request.
 java.sql.Timestamp getTimestamp()
          Gets the current timestamp.
 TradingAgreementAccessBean getTradingAgreement(java.lang.Long id)
          Gets the trading agreement given an id.
 TradingAgreementAccessBean getTradingAgreement(java.lang.String id)
          Gets the trading agreement given an id.
 java.lang.String getUniqueSessionTag()
          Return a tag that is unique for the session.
 UserAccessBean getUser()
          Gets the user access bean for the user of this request.
 java.lang.Long getUserId()
          Gets the user ID for the caller of this request.
protected  TradingAgreementAccessBean[] getValidTradingAgreements(TradingAgreementAccessBean[] inTAs)
          Gets the valid set of trading agreements.
 java.lang.String getViewCommand()
          Gets the view name with this request.
 java.lang.String getWebpath()
          Gets the web path associated with this request.
 void invalidateTradingAgreement(java.lang.Long id)
          Remove a trading agreement from cache.
 void invalidateTradingAgreement(java.lang.String id)
          Remove a trading agreement from cache.
 boolean isCacheTarget()
          Returns true if this command is a cache target.
 boolean isResponseNecessary()
          Returns true if this is an https commands and returns false otherwise.
 boolean isSecure()
          Returns true if this is a https command, returns false otherwise.
 boolean isStoreCommand()
          Returns true if this is a store command.
protected static java.lang.String removeTradingAgreementFromTradingAgreementIds(java.lang.String taIds, java.lang.String id)
          Remove a trading agreement Id from the input trading agremment id string.
 void resetStoreRef()
          Resets the EJB reference for the the store associated with this command.
 void restoreUser(java.lang.Long uId)
          Restore to original user.
 void setActivityId(long newActivityId)
          Sets the activity ID associated with this command.
 void setAsyncCommand(boolean newValue)
          Sets the value to indicate whether this is an asynchronize command.
 void setCachePage(boolean newValue)
          Sets the value to indicate whether a page should be cached or not.
 void setCacheTarget(boolean newValue)
          Sets the isCacheTarget value for this command.
 void setCommand(ECCommand aCommand)
          Sets the command associated with this command context.
 void setCommandName(java.lang.String value)
          Sets the command name.
 void setCountry(java.lang.String value)
          Sets the 2 character country code associated with this command.
 void setCurrency(java.lang.String value)
          Sets the negotiated currency to be used for this request.
 void setCurrentCommandName(java.lang.String name)
          Sets the class name of the current command to be executed.
 void setCurrentTradingAgreementIdsAsString(java.lang.String newValue)
          Sets the session trading agreemnt ids as a string.
 void setCurrentTradingAgreements(TradingAgreementAccessBean[] newValue)
          Sets the current trading agreements.
 void setDefaultDeviceFormat(java.lang.Integer newValue)
          Sets the default device format type for this request.
 void setDeviceFormatAdapter(DeviceFormatAdapter newValue)
          Sets the device format adapter used for this request.
 void setDeviceFormatId(java.lang.Integer newValue)
          Sets the device format Id for this request.
 void setDeviceFormatTypeId(java.lang.Integer newValue)
          Sets the device format type id for this request.
 void setDeviceType(java.lang.Integer newValue)
          Sets the device format type id for this request.
 void setEligibleTradingAgreementIdsAsString(java.lang.String newValue)
          Sets the eligible trading agreemnt ids as a string.
 void setEncCurContr(java.lang.String newEncCurContr)
          Insert the method's description here.
 void setEncElgContr(java.lang.String newEncElgContr)
          Insert the method's description here.
 void setEncParOrg(java.lang.String newEncParOrg)
          Insert the method's description here.
 void setEncSesContr(java.lang.String newEncSesContr)
          Insert the method's description here.
 void setErrorViewName(java.lang.String value)
          Sets the error view name.
 void setExpiryDate(java.sql.Timestamp value)
          Sets the expiry date for a cached page.
 void setForUserId(java.lang.Long userId)
          Sets the user Id for this request.
 void setLanguage(java.lang.String value)
          Sets the negotiated language for this command.
 void setLanguageId(java.lang.Integer value)
          Sets the negotiated language Id for this command.
 void setLocale(java.util.Locale newValue)
          Sets the locale for the command.
 void setLocaleVariant(java.lang.String value)
          Sets the locale variant to be used for this request.
 void setParentOrg(java.lang.String newParentOrg)
          Insert the method's description here.
 void setPreferredCurrency(java.lang.String value)
          Sets the preferred currency to use for this request.
 void setPreferredLanguage(java.lang.Integer value)
          Sets the preferred language for this request.
 void setRedirectionURL(java.lang.String url)
          Sets the redirect URL name .
 void setRemoteAddr(java.lang.String newRemoteAddr)
          Sets the remote host address.
 void setRemoteHost(java.lang.String newRemoteHost)
          Sets the remote host name.
 void setRequest(java.lang.Object value)
          Sets the controller request object associated with this command.
 void setRequestProperties(TypedProperty value)
          Sets the request property object associated with this request.
 void setResponse(java.lang.Object value)
          Sets the response object associated with this command.
 void setResponseNecessary(boolean newValue)
          Sets the isSecure value for this command.
 void setResult(boolean newValue)
          Sets the result for this command.
 void setSecure(boolean newValue)
          Sets the isSecure value for this command.
 void setSessionContext(SessionContext aSessionContext)
          Sets the SessionContext object associated with this request.
 void setSessionData(SessionData value)
          Sets the SessionData object associated with this request.
 void setSessionTradingAgreementIdsAsString(java.lang.String newValue)
          Sets the session trading agreemnt ids as a string.
 void setStore(StoreAccessBean newValue)
          Sets the store associated with this command.
 void setStoreCommand(boolean value)
          Returns true if this is a store level command.
 void setStoreId(java.lang.Integer newValue)
          Sets the store Id associated with this command.
 void setTimestamp(java.sql.Timestamp value)
          Sets the timestamp for the comamnd.
 void setUniqueSessionTag(java.lang.String value)
          Sets a tag that is unique for the session.
 void setUserId(java.lang.Long newUserReferenceNumber)
          Sets the user Id for this request.
 void setViewCommand(java.lang.String view)
          Sets the view name for this command.
 void setWebpath(java.lang.String newValue)
          Sets the webpath associated with this command.
 boolean userCanExecuteCommand(AccCommand command)
          This methods checks whether the user can execute a command.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

activityId

protected long activityId

adapter

protected DeviceFormatAdapter adapter

curUserInfo

protected UserDependantInfo curUserInfo

preferredCurrency

public java.lang.String preferredCurrency

preferredLanguage

public java.lang.Integer preferredLanguage

request

protected java.lang.Object request

response

protected java.lang.Object response

webpath

protected java.lang.String webpath
Constructor Detail

CommandContextImpl

public CommandContextImpl()
Default CommandContextImpl Constructor.
Method Detail

becomeUser

public java.lang.Long becomeUser(java.lang.Long userId)
Become another user. This method is for internal use by the framework only.
Specified by:
becomeUser in interface CommandContext
Parameters:
userId - Long

buildRedirectUrl

public java.lang.String buildRedirectUrl(TypedProperty prop)
                                  throws ECApplicationException
Returns a redirect url with the properties are part of parameters for the url.
Specified by:
buildRedirectUrl in interface CommandContext
Parameters:
prop - TypedProperty - parameters for the redirect url

canUserExecuteCommand

public final boolean canUserExecuteCommand(AccCommand command)
                                    throws ECException
This methods checks whether the user can execute a command. This method is for internal use by the framework only.
Returns:
true - if user can execute command false - if user cannot execute command
Throws:
- - ECException

changeStore

public void changeStore(java.lang.Integer newValue)
Changes the store and store associated information

Specified by:
changeStore in interface CommandContext
Parameters:
storeId - java.lang.Integer

changeUser

public void changeUser(java.lang.Long newValue)
Changes the user and information associated with user

Specified by:
changeUser in interface CommandContext
Parameters:
userId - java.lang.Long

clone

public java.lang.Object clone()
This method returns a clone of this command context.
Specified by:
clone in interface CommandContext
Overrides:
clone in class java.lang.Object

generateLogId

public final void generateLogId()
Generate a Log Id. This is for internal use only.
Specified by:
generateLogId in interface CommandContext

getActivityId

public final long getActivityId()
Gets the activity ID associated with this command. This method is for internal use by the framework only.
Specified by:
getActivityId in interface CommandContext
Returns:
long - the activity Id

getAsyncCommand

public boolean getAsyncCommand()
Returns true if this command is an asynchronize command. This method is for internal use by the framework only
Specified by:
getAsyncCommand in interface CommandContext
Returns:
boolean - asynchronize command

getCachePage

public final boolean getCachePage()
Gets the cache page value. Returns true if page has to be cached. False otherwise. This method is for internal use only.

Specified by:
getCachePage in interface CommandContext
Returns:
boolean - the cache page value

getClearForUser

public final boolean getClearForUser()
Returns true if the parameter for clearing the for User Id is set. This method is for internal use by the framework only
Specified by:
getClearForUser in interface CommandContext
Returns:
boolean

getCommand

public final ECCommand getCommand()
Gets the command.
Specified by:
getCommand in interface CommandContext
Returns:
ECCommand

getCommandName

public final java.lang.String getCommandName()
Gets the name of the command.
Specified by:
getCommandName in interface CommandContext
Returns:
java.lang.String

getCountry

public final java.lang.String getCountry()
Gets the 2 character country code associated with this command.
Specified by:
getCountry in interface CommandContext
Returns:
java.lang.String

getCurrency

public final java.lang.String getCurrency()
                                   throws ECSystemException
Gets the negotiated currency code associated with this request.
Specified by:
getCurrency in interface CommandContext
Returns:
java.lang.String

getCurrentCommandName

public java.lang.String getCurrentCommandName()
Gets the class name of the current command.
Specified by:
getCurrentCommandName in interface CommandContext
Returns:
String - command class name

getCurrentTradingAgreementIdsAsString

public java.lang.String getCurrentTradingAgreementIdsAsString()
Gets the eligible trading agreement ids as a string seperated by ";" For Internal use only.
Specified by:
getCurrentTradingAgreementIdsAsString in interface CommandContext
Returns:
String

getCurrentTradingAgreements

public TradingAgreementAccessBean[] getCurrentTradingAgreements()
                                                         throws ECException
Gets the current set of trading agreements.
Specified by:
getCurrentTradingAgreements in interface CommandContext
Returns:
TradingAgreementAccessBean[]

getDefaultDeviceFormat

public java.lang.Integer getDefaultDeviceFormat()
Gets the default device type to be used for this request.
Specified by:
getDefaultDeviceFormat in interface CommandContext
Returns:
java.lang.Integer

getDeviceFormatAdapter

public DeviceFormatAdapter getDeviceFormatAdapter()
Gets the device format adapter associated with this request.
Specified by:
getDeviceFormatAdapter in interface CommandContext
Returns:
DeviceFormatAdapter

getDeviceFormatId

public final java.lang.Integer getDeviceFormatId()
Gets the device format Id associated with this request.
Specified by:
getDeviceFormatId in interface CommandContext
Returns:
java.lang.Integer

getDeviceFormatTypeId

public final java.lang.Integer getDeviceFormatTypeId()
Gets the device format type associated with this request.
Specified by:
getDeviceFormatTypeId in interface CommandContext
Returns:
java.lang.Integer

getDeviceType

public final java.lang.Integer getDeviceType()
Gets the device format type associated with this request.
Specified by:
getDeviceType in interface CommandContext
Returns:
java.lang.Integer

getDocumentPathName

public java.lang.String getDocumentPathName(java.lang.String baseName)
Return the output document path name based on a base name. The document path name returned is dependant on the device format adapter.
Specified by:
getDocumentPathName in interface CommandContext
Parameters:
baseName - String - base name of the document
Returns:
String - actual name of output document

getEligibleTradingAgreementIds

public java.lang.String[] getEligibleTradingAgreementIds()
                                                  throws ECException
Gets the eligible trading agreemnt ids as an array for type contract only.

Specified by:
getEligibleTradingAgreementIds in interface CommandContext
Returns:
String[] - trading agreement Ids

getEligibleTradingAgreementIdsAsString

public java.lang.String getEligibleTradingAgreementIdsAsString()
Gets the eligible trading agreement ids as a string seperated by ";" For Internal use only.
Specified by:
getEligibleTradingAgreementIdsAsString in interface CommandContext
Returns:
String

getEncCurContr

public final java.lang.String getEncCurContr()
Insert the method's description here. Creation date: (1/28/2002 5:05:53 PM)
Specified by:
getEncCurContr in interface CommandContext
Returns:
java.lang.String

getEncElgContr

public final java.lang.String getEncElgContr()
Insert the method's description here. Creation date: (1/28/2002 5:05:53 PM)
Specified by:
getEncElgContr in interface CommandContext
Returns:
java.lang.String

getEncParOrg

public final java.lang.String getEncParOrg()
Insert the method's description here. Creation date: (1/28/2002 5:05:53 PM)
Specified by:
getEncParOrg in interface CommandContext
Returns:
java.lang.String

getEncParOrgAndCurContr

public final java.lang.String getEncParOrgAndCurContr()
Insert the method's description here. Creation date: (1/28/2002 5:05:53 PM)
Specified by:
getEncParOrgAndCurContr in interface CommandContext
Returns:
java.lang.String

getEncSesContr

public final java.lang.String getEncSesContr()
Insert the method's description here. Creation date: (1/28/2002 5:05:53 PM)
Specified by:
getEncSesContr in interface CommandContext
Returns:
java.lang.String

getErrorViewName

public java.lang.String getErrorViewName()
Gets the error view name. This method is used by the command framework only.
Specified by:
getErrorViewName in interface CommandContext
Returns:
String - name of error view

getExpiryDate

public final java.sql.Timestamp getExpiryDate()
Gets the expiry date for a cached page. This method is for internal use by the framework only
Specified by:
getExpiryDate in interface CommandContext
Returns:
Timestamp - the expiry date

getForUserId

public final java.lang.Long getForUserId()
                                  throws ECException
Gets the for user ID for this command. The forUserId is extracted from the requestProperties saved in the commandContext. This method is for internal use by the framework only
Specified by:
getForUserId in interface CommandContext
Returns:
Long - user Id

getInitialPreferredLanguage

public final java.lang.Integer getInitialPreferredLanguage()
Gets the preferred language Id for this request.
Specified by:
getInitialPreferredLanguage in interface CommandContext
Returns:
Integer
Throws:
ECSystemException -  

getLanguage

public final java.lang.String getLanguage()
Gets the language associated with this request.
Specified by:
getLanguage in interface CommandContext
Returns:
String

getLanguageId

public final java.lang.Integer getLanguageId()
Gets the negotiated language Id for this request. If this is a command associated with a store, then the negotiated language Id is the preferred langauge if it is supported by the store. Otherwise, the store default language will be returned. If this is a site wide command, then the negotiated langauge is the preferred language if it is supported by the site. Otherwise, the site default language will e returned.

Specified by:
getLanguageId in interface CommandContext
Returns:
Integer - the negotiated language Id.

getLocale

public final java.util.Locale getLocale()
Returns the locale for this command.
Specified by:
getLocale in interface CommandContext
Returns:
Locale

getLocale

public final java.util.Locale getLocale(java.lang.Integer languageId)
Returns the locale associated with a given language. Returns the default system locale if no language access bean is found.
Specified by:
getLocale in interface CommandContext
Returns:
Locale

getLocaleVariant

public final java.lang.String getLocaleVariant()
Gets the locale variant associated with this request.
Specified by:
getLocaleVariant in interface CommandContext
Returns:
java.lang.String

getLogId

public final long getLogId()
Gets the Log id. This method is for internal use only.
Specified by:
getLogId in interface CommandContext
Returns:
long

getNonNullStore

public final StoreAccessBean getNonNullStore()
                                      throws ECSystemException
Returns a non null store access bean object. An exception is thrown if the StoreAccessBean object accociated with this command is null.

Specified by:
getNonNullStore in interface CommandContext
Returns:
StoreAccessBean, - non null store access bean object
Throws:
ECSystemException -  

getOriginalUserId

public final java.lang.Long getOriginalUserId()
Gets the user ID for the caller of this request.
Specified by:
getOriginalUserId in interface CommandContext
Returns:
Long - user Id

getParentOrg

public final java.lang.String getParentOrg()
Insert the method's description here. Creation date: (1/28/2002 5:05:53 PM)
Specified by:
getParentOrg in interface CommandContext
Returns:
java.lang.String

getPreferredCurrency

public final java.lang.String getPreferredCurrency()
                                            throws ECSystemException
Gets the preferred currency code associated with this request. The preferred currency is retrieved from the session if one is present or from the user object if it is not found in the session.
Specified by:
getPreferredCurrency in interface CommandContext
Returns:
java.lang.String

getPreferredLanguage

public final java.lang.Integer getPreferredLanguage()
                                             throws ECSystemException
Gets the preferred language Id for this request. The preferred language Id is the value of the "langId" parameter found in the request properties. If the language Id is not present in the request properties, the language Id found in the session will be used. If the language Id is not found in the session, the preferred language of the user as defined in the user access bean will be returned.
Specified by:
getPreferredLanguage in interface CommandContext
Returns:
Integer
Throws:
ECSystemException -  

getRedirectionURL

public final java.lang.String getRedirectionURL()
Gets the redirect URL for this request. This method is for internal use only.
Specified by:
getRedirectionURL in interface CommandContext
Returns:
String

getRemoteAddr

public final java.lang.String getRemoteAddr()
Gets the address of the remote host.

Specified by:
getRemoteAddr in interface CommandContext
Returns:
java.lang.String

getRemoteHost

public final java.lang.String getRemoteHost()
Gets the name of the remote host.

Specified by:
getRemoteHost in interface CommandContext
Returns:
java.lang.String

getRequest

public final java.lang.Object getRequest()
Gets the request object associated with this request.
Specified by:
getRequest in interface CommandContext
Returns:
Object - the request object

getRequestProperties

public final TypedProperty getRequestProperties()
Gets the request properties associated with this request.
Specified by:
getRequestProperties in interface CommandContext
Returns:
TypedProperty - the request properties

getResolvedQueryString

public java.lang.String getResolvedQueryString()
Gets the interpreted request properties as a queryString.
Specified by:
getResolvedQueryString in interface CommandContext
Returns:
String - the interpreted query string

getResponse

public final java.lang.Object getResponse()
Gets the response object associated with this request.
Specified by:
getResponse in interface CommandContext
Returns:
Object - the response object

getResult

public final boolean getResult()
Gets the result of this request. True if successful, false otherwise This method is for inernal use only.
Specified by:
getResult in interface CommandContext
Returns:
boolean

getSessionContext

public SessionContext getSessionContext()
                                 throws ECException
Gets the SessionContext associated with this request.
Specified by:
getSessionContext in interface CommandContext
Returns:
SessionContext

getSessionData

public final SessionData getSessionData()
Gets the session data associated with this request.
Specified by:
getSessionData in interface CommandContext
Returns:
SessionData

getSessionTradingAgreementIdsAsString

public java.lang.String getSessionTradingAgreementIdsAsString()
                                                       throws ECException
Gets the session trading agreement ids as a string seperated by ";" This method is for internal use only.
Specified by:
getSessionTradingAgreementIdsAsString in interface CommandContext
Returns:
String

getStore

public final StoreAccessBean getStore()
                               throws ECSystemException
Gets the store access bean for this request.
Specified by:
getStore in interface CommandContext
Returns:
StoreAccessBean - the store access bean

getStore

public final StoreAccessBean getStore(java.lang.Integer aStoreId)
                               throws ECSystemException
Gets the store access bean based on a store Id.
Specified by:
getStore in interface CommandContext
Returns:
StoreAccessBean - the store access bean

getStoreId

public final java.lang.Integer getStoreId()
Gets the store Id for this request.
Specified by:
getStoreId in interface CommandContext
Returns:
Integer - the store Id

getTimestamp

public final java.sql.Timestamp getTimestamp()
Gets the current timestamp. This is set once for the duration of the command.
Specified by:
getTimestamp in interface CommandContext
Returns:
Timestamp - the current timestamp

getTradingAgreement

public TradingAgreementAccessBean getTradingAgreement(java.lang.Long id)
                                               throws ECException
Gets the trading agreement given an id.
Specified by:
getTradingAgreement in interface CommandContext
Parameters:
Long - id - trading agreement id
Returns:
TradingAgreementAccessBean

getTradingAgreement

public TradingAgreementAccessBean getTradingAgreement(java.lang.String id)
                                               throws ECException
Gets the trading agreement given an id.
Specified by:
getTradingAgreement in interface CommandContext
Parameters:
String - id - trading agreement id
Returns:
TradingAgreementAccessBean

getUniqueSessionTag

public final java.lang.String getUniqueSessionTag()
Return a tag that is unique for the session.
Specified by:
getUniqueSessionTag in interface CommandContext
Returns:
java.lang.String

getUser

public final UserAccessBean getUser()
                             throws ECSystemException
Gets the user access bean for the user of this request.
Specified by:
getUser in interface CommandContext
Returns:
UserAccessBean

getUserId

public final java.lang.Long getUserId()
Gets the user ID for the caller of this request.
Specified by:
getUserId in interface CommandContext
Returns:
Long - user Id

getValidTradingAgreements

protected TradingAgreementAccessBean[] getValidTradingAgreements(TradingAgreementAccessBean[] inTAs)
                                                          throws java.lang.Exception
Gets the valid set of trading agreements.
Returns:
TradingAgreementAccessBean[]

getViewCommand

public final java.lang.String getViewCommand()
Gets the view name with this request. This method is for internal use only.
Specified by:
getViewCommand in interface CommandContext
Returns:
String

getWebpath

public java.lang.String getWebpath()
Gets the web path associated with this request. If this is an Http request, the webpath for the command will be returned. Otherwise, the stores webpath as defined in the configuration xml file will be returned.
Specified by:
getWebpath in interface CommandContext
Returns:
String

invalidateTradingAgreement

public void invalidateTradingAgreement(java.lang.Long id)
                                throws ECException
Remove a trading agreement from cache.
Specified by:
invalidateTradingAgreement in interface CommandContext
Parameters:
id - Long - trading agreement id.

invalidateTradingAgreement

public void invalidateTradingAgreement(java.lang.String id)
                                throws ECException
Remove a trading agreement from cache.
Specified by:
invalidateTradingAgreement in interface CommandContext
Parameters:
id - String - trading agreement id.

isCacheTarget

public final boolean isCacheTarget()
Returns true if this command is a cache target. This method is for internal use only.
Specified by:
isCacheTarget in interface CommandContext
Returns:
boolean - cacheTarget

isResponseNecessary

public boolean isResponseNecessary()
Returns true if this is an https commands and returns false otherwise. This method is for internal use only.
Specified by:
isResponseNecessary in interface CommandContext

isSecure

public final boolean isSecure()
Returns true if this is a https command, returns false otherwise.
Specified by:
isSecure in interface CommandContext
Returns:
boolean

isStoreCommand

public boolean isStoreCommand()
Returns true if this is a store command. This implied that the store directory will be automatically added to the document path for any forward view command. This method is for internal use only.
Specified by:
isStoreCommand in interface CommandContext

removeTradingAgreementFromTradingAgreementIds

protected static java.lang.String removeTradingAgreementFromTradingAgreementIds(java.lang.String taIds,
                                                                                java.lang.String id)
Remove a trading agreement Id from the input trading agremment id string. This method is for internal use only.
Parameters:
tradingAgreementIds - String
tradingAgreementId - String
Returns:
String

resetStoreRef

public final void resetStoreRef()
Resets the EJB reference for the the store associated with this command. This method is for internal use only.
Specified by:
resetStoreRef in interface CommandContext

restoreUser

public void restoreUser(java.lang.Long uId)
Restore to original user. This method is for internal use by the framework only.
Specified by:
restoreUser in interface CommandContext
Following copied from interface: com.ibm.commerce.command.CommandContext
Parameters:
user - Long - original user Id

setActivityId

public void setActivityId(long newActivityId)
Sets the activity ID associated with this command. This is for internal use only.

Specified by:
setActivityId in interface CommandContext
Parameters:
value - long - activity Id

setAsyncCommand

public void setAsyncCommand(boolean newValue)
Sets the value to indicate whether this is an asynchronize command. This method is for internal use only.
Specified by:
setAsyncCommand in interface CommandContext
Parameters:
newValue - boolean - true for asynchronize command

setCachePage

public final void setCachePage(boolean newValue)
Sets the value to indicate whether a page should be cached or not. This method is for internal use only.
Specified by:
setCachePage in interface CommandContext
Parameters:
newValue - boolean

setCacheTarget

public final void setCacheTarget(boolean newValue)
Sets the isCacheTarget value for this command. This method is for internal use only.
Specified by:
setCacheTarget in interface CommandContext
Parameters:
newValue - boolean

setCommand

public final void setCommand(ECCommand aCommand)
Sets the command associated with this command context. This method is used by the command framework only.
Specified by:
setCommand in interface CommandContext
Parameters:
command - ControllerCommand

setCommandName

public final void setCommandName(java.lang.String value)
Sets the command name. This method is used by the command framework only.
Specified by:
setCommandName in interface CommandContext
Parameters:
value - language java.lang.String

setCountry

public final void setCountry(java.lang.String value)
Sets the 2 character country code associated with this command.
Specified by:
setCountry in interface CommandContext

setCurrency

public final void setCurrency(java.lang.String value)
Sets the negotiated currency to be used for this request.
Specified by:
setCurrency in interface CommandContext
Parameters:
value - java.lang.String - a characeter String that represents the currency

setCurrentCommandName

public void setCurrentCommandName(java.lang.String name)
Sets the class name of the current command to be executed.
Specified by:
setCurrentCommandName in interface CommandContext
Parameters:
String - - command class name

setCurrentTradingAgreementIdsAsString

public void setCurrentTradingAgreementIdsAsString(java.lang.String newValue)
Sets the session trading agreemnt ids as a string. This method is for internal use only.
Parameters:
value - String - trading agreement Ids

setCurrentTradingAgreements

public void setCurrentTradingAgreements(TradingAgreementAccessBean[] newValue)
Sets the current trading agreements. This method is for internal use only.
Specified by:
setCurrentTradingAgreements in interface CommandContext
Parameters:
value - TradingAgreementAccessBean[] - trading agreements

setDefaultDeviceFormat

public final void setDefaultDeviceFormat(java.lang.Integer newValue)
Sets the default device format type for this request.
Specified by:
setDefaultDeviceFormat in interface CommandContext
Parameters:
value - Integer - device format type

setDeviceFormatAdapter

public final void setDeviceFormatAdapter(DeviceFormatAdapter newValue)
Sets the device format adapter used for this request. This method is for use by the framework only.
Specified by:
setDeviceFormatAdapter in interface CommandContext
Parameters:
value - - DeviceFormatAdapter

setDeviceFormatId

public final void setDeviceFormatId(java.lang.Integer newValue)
Sets the device format Id for this request. This method is for use by the framework only.
Specified by:
setDeviceFormatId in interface CommandContext
Parameters:
value - Integer- device format id

setDeviceFormatTypeId

public final void setDeviceFormatTypeId(java.lang.Integer newValue)
Sets the device format type id for this request. This method is for internal use by the framework only.
Specified by:
setDeviceFormatTypeId in interface CommandContext
Parameters:
newValue - java.lang.Integer - device format type id

setDeviceType

public final void setDeviceType(java.lang.Integer newValue)
Sets the device format type id for this request. This method is for internal use by the framework only.
Specified by:
setDeviceType in interface CommandContext
Parameters:
newValue - java.lang.Integer - device format type id

setEligibleTradingAgreementIdsAsString

public void setEligibleTradingAgreementIdsAsString(java.lang.String newValue)
Sets the eligible trading agreemnt ids as a string. This method is for internal use only.
Specified by:
setEligibleTradingAgreementIdsAsString in interface CommandContext
Parameters:
value - String - eligible trading agreement Ids

setEncCurContr

public void setEncCurContr(java.lang.String newEncCurContr)
Insert the method's description here. Creation date: (1/28/2002 5:05:53 PM)
Specified by:
setEncCurContr in interface CommandContext
Parameters:
newIstrEncElgContr - java.lang.String

setEncElgContr

public void setEncElgContr(java.lang.String newEncElgContr)
Insert the method's description here. Creation date: (1/28/2002 5:05:53 PM)
Specified by:
setEncElgContr in interface CommandContext
Parameters:
newIstrEncElgContr - java.lang.String

setEncParOrg

public void setEncParOrg(java.lang.String newEncParOrg)
Insert the method's description here. Creation date: (1/28/2002 5:05:53 PM)
Specified by:
setEncParOrg in interface CommandContext
Parameters:
newIstrEncElgContr - java.lang.String

setEncSesContr

public void setEncSesContr(java.lang.String newEncSesContr)
Insert the method's description here. Creation date: (1/28/2002 5:05:53 PM)
Specified by:
setEncSesContr in interface CommandContext
Parameters:
newIstrEncElgContr - java.lang.String

setErrorViewName

public final void setErrorViewName(java.lang.String value)
Sets the error view name. This method is used by the command framework only.
Specified by:
setErrorViewName in interface CommandContext
Parameters:
value - language java.lang.String - name of error view

setExpiryDate

public final void setExpiryDate(java.sql.Timestamp value)
Sets the expiry date for a cached page. This method is for internal use only.
Specified by:
setExpiryDate in interface CommandContext
Parameters:
newValue - - TimeStamp

setForUserId

public final void setForUserId(java.lang.Long userId)
Sets the user Id for this request. This method is for internal used by the framework only.
Specified by:
setForUserId in interface CommandContext

setLanguage

public final void setLanguage(java.lang.String value)
Sets the negotiated language for this command. This is for internal use by the framework only.
Specified by:
setLanguage in interface CommandContext
Parameters:
value - language java.lang.String - a 2 characeter String that represents the language

setLanguageId

public final void setLanguageId(java.lang.Integer value)
Sets the negotiated language Id for this command. This is for internal use by the framework only.
Specified by:
setLanguageId in interface CommandContext
Parameters:
value - Integer - an Id represents the language

setLocale

public final void setLocale(java.util.Locale newValue)
Sets the locale for the command. This method is for internal use by the framework.
Specified by:
setLocale in interface CommandContext

setLocaleVariant

public final void setLocaleVariant(java.lang.String value)
Sets the locale variant to be used for this request. This method is for internal use by the framework.
Specified by:
setLocaleVariant in interface CommandContext
Parameters:
value - language java.lang.String

setParentOrg

public final void setParentOrg(java.lang.String newParentOrg)
Insert the method's description here. Creation date: (1/28/2002 5:05:53 PM)
Parameters:
newIstrParentOrg - java.lang.String

setPreferredCurrency

public final void setPreferredCurrency(java.lang.String value)
Sets the preferred currency to use for this request. This method is for internal use by the framework only.

Specified by:
setPreferredCurrency in interface CommandContext
Parameters:
value - String - the preferred currency

setPreferredLanguage

public final void setPreferredLanguage(java.lang.Integer value)
Sets the preferred language for this request. This is for internal use by the command framework only.
Specified by:
setPreferredLanguage in interface CommandContext

setRedirectionURL

public final void setRedirectionURL(java.lang.String url)
Sets the redirect URL name . This method is for internal use by the framework.
Specified by:
setRedirectionURL in interface CommandContext
Parameters:
value - String - redirect URL name

setRemoteAddr

public final void setRemoteAddr(java.lang.String newRemoteAddr)
Sets the remote host address.

Specified by:
setRemoteAddr in interface CommandContext
Parameters:
newRemoteAddr - java.lang.String

setRemoteHost

public final void setRemoteHost(java.lang.String newRemoteHost)
Sets the remote host name.

Specified by:
setRemoteHost in interface CommandContext
Parameters:
newRemoteHost - java.lang.String

setRequest

public final void setRequest(java.lang.Object value)
Sets the controller request object associated with this command. This is for internal used by the framework only.
Specified by:
setRequest in interface CommandContext

setRequestProperties

public final void setRequestProperties(TypedProperty value)
Sets the request property object associated with this request. This is used by the framework only.
Specified by:
setRequestProperties in interface CommandContext
Parameters:
value - - TypedProperty

setResponse

public final void setResponse(java.lang.Object value)
Sets the response object associated with this command. This method is for internal use by the framework only.
Specified by:
setResponse in interface CommandContext
Parameters:
value - Object - response object.

setResponseNecessary

public void setResponseNecessary(boolean newValue)
Sets the isSecure value for this command. This method is for internal use by the framework only.
Specified by:
setResponseNecessary in interface CommandContext
Parameters:
newValue - boolean

setResult

public final void setResult(boolean newValue)
Sets the result for this command. This is for internal use by the framework only.
Specified by:
setResult in interface CommandContext
Parameters:
newValue - boolean

setSecure

public final void setSecure(boolean newValue)
Sets the isSecure value for this command. This method is for internal use by the framework only.
Specified by:
setSecure in interface CommandContext
Parameters:
newValue - boolean

setSessionContext

public final void setSessionContext(SessionContext aSessionContext)
Sets the SessionContext object associated with this request. This method is for internal use by the framework only.
Specified by:
setSessionContext in interface CommandContext
Parameters:
sessionContext - SessionContext

setSessionData

public final void setSessionData(SessionData value)
Sets the SessionData object associated with this request. This method is for internal use by the framework only.
Specified by:
setSessionData in interface CommandContext
Parameters:
sessionData - SessionData

setSessionTradingAgreementIdsAsString

public void setSessionTradingAgreementIdsAsString(java.lang.String newValue)
Sets the session trading agreemnt ids as a string. This method is for internal use only.
Specified by:
setSessionTradingAgreementIdsAsString in interface CommandContext
Parameters:
value - String - trading agreement Ids

setStore

public final void setStore(StoreAccessBean newValue)
Sets the store associated with this command. This method is for internal use by the framework only.
Specified by:
setStore in interface CommandContext
Parameters:
store - StoreAccessBean

setStoreCommand

public void setStoreCommand(boolean value)
Returns true if this is a store level command. Returns false otherwise. This method is for internal use by the framework only.
Specified by:
setStoreCommand in interface CommandContext
Parameters:
value - boolean

setStoreId

public final void setStoreId(java.lang.Integer newValue)
Sets the store Id associated with this command. This method is for internal use by the command framework only.
Specified by:
setStoreId in interface CommandContext
Parameters:
storeId - java.lang.Integer

setTimestamp

public final void setTimestamp(java.sql.Timestamp value)
Sets the timestamp for the comamnd. This method is for internal use by the framework only.
Specified by:
setTimestamp in interface CommandContext
Parameters:
value - Timestamp

setUniqueSessionTag

public final void setUniqueSessionTag(java.lang.String value)
                               throws ECException
Sets a tag that is unique for the session. This method is for internal use by the framework only.
Specified by:
setUniqueSessionTag in interface CommandContext
Parameters:
value - - java.lang.String

setUserId

public final void setUserId(java.lang.Long newUserReferenceNumber)
Sets the user Id for this request. This method is for internal used by the framework only.
Specified by:
setUserId in interface CommandContext

setViewCommand

public final void setViewCommand(java.lang.String view)
Sets the view name for this command. This method is for internal use by the framework only.
Specified by:
setViewCommand in interface CommandContext
Parameters:
value - String - view name

setWebpath

public final void setWebpath(java.lang.String newValue)
Sets the webpath associated with this command. This method is for internal use by the framework only.
Specified by:
setWebpath in interface CommandContext
Parameters:
webpath - String

userCanExecuteCommand

public final boolean userCanExecuteCommand(AccCommand command)
                                    throws ECException
This methods checks whether the user can execute a command. This method is for internal use by the framework only.
Specified by:
userCanExecuteCommand in interface CommandContext
Returns:
true - if user can execute command false - if user cannot execute command
Throws:
ECException -