com.ibm.commerce.command

Class CommandContextImpl

  • java.lang.Object
    • com.ibm.commerce.command.CommandContextImpl
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • preferredCurrency

        public java.lang.String preferredCurrency
        the preferred currency from user profile or session
      • preferredLanguage

        public java.lang.Integer preferredLanguage
        the preferred language from user
    • Constructor Detail

      • CommandContextImpl

        public CommandContextImpl()
        This is the default constructor for this class.
      • CommandContextImpl

        public CommandContextImpl(ActivityToken aToken)
    • Method Detail

      • becomeUser

        public java.lang.Long becomeUser(java.lang.Long userId)
        Reserved for IBM internal use. This method changes the current user to another user.
        Specified by:
        becomeUser in interface CommandContext
        Parameters:
        userId - The user id.
        Returns:
        A Long representing the original user id.
      • canUserExecuteCommand

        public final boolean canUserExecuteCommand(AccCommand command)
                                            throws ECException
        Deprecated. This method is replaced by CommandContextHelper.canUserExecuteCommand(AccCommand)
        Reserved for IBM internal use. Checks whether the user can execute a command.
        Parameters:
        command -
        Returns:
        true - if user can execute command
        Throws:
        ECException - is thrown if the user can not execute the command.
      • getInvokerStoreId

        public java.lang.Integer getInvokerStoreId()
        Deprecated. This method has no replacement as it should not be called.
        Reserved for IBM internal use. Gets the original store id.
        Returns:
        returns the original store Id.
      • changeStore

        public void changeStore(java.lang.Integer newValue)
        This method changes the store and store associated information.
        Specified by:
        changeStore in interface CommandContext
        Parameters:
        newValue - - storeId A java.lang.Integer object.
      • restoreStore

        public void restoreStore()
        This method restores store and store associated information.
        Specified by:
        restoreStore in interface CommandContext
        Parameters:
        storeId - A java.lang.Integer that represents the store id.
      • 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
        Returns:
        An Object that represents this command context.
      • getActivityId

        public final long getActivityId()
        Deprecated. This method is replaced by AuditContext.getRequestIdentifier()
        Reserved for IBM internal use. Gets the activity ID associated with this command which is used by the Logging component.
        Specified by:
        getActivityId in interface CommandContext
        Returns:
        long - the activity Id
      • getAsyncCommand

        public boolean getAsyncCommand()
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Returns true if this command is an AsyncCommand.
        Specified by:
        getAsyncCommand in interface CommandContext
        Returns:
        boolean - AsyncCommand
      • getUncacheable

        public final boolean getUncacheable()
        Deprecated. No replacement.
        Reserved for IBM internal use. Gets the uncacheable value. Returns false if page has to be cached. True otherwise.

        Specified by:
        getUncacheable in interface CommandContext
        Returns:
        boolean - the uncacheable value
      • getClearForUser

        public final boolean getClearForUser()
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Returns true if the parameter for clearing the for User ID is set.
        Specified by:
        getClearForUser in interface CommandContext
        Returns:
        boolean
      • getCommand

        public final ECCommand getCommand()
        This method gets the command associated with this command context.
        Specified by:
        getCommand in interface CommandContext
        Returns:
        An ECCommand object that represents the command.
      • getCommandName

        public final java.lang.String getCommandName()
        This method gets the name of the command.
        Specified by:
        getCommandName in interface CommandContext
        Returns:
        A java.lang.String object represents the command name.
      • getCountry

        public final java.lang.String getCountry()
        Deprecated. This method is replaced by CommandContextHelper.getCountry(CommandContext)
        This method gets the 2 character country code associated with this command.
        Specified by:
        getCountry in interface CommandContext
        Returns:
        The 2 character country code.
      • getCurrentCommandName

        public java.lang.String getCurrentCommandName()
        This method gets the interface name of the current command. It is possible that the current command name is different from the command name when the current command is invoked by another controller command.
        Specified by:
        getCurrentCommandName in interface CommandContext
        Returns:
        A String object that represents the current command interface name.
      • getCurrentTradingAgreements

        public TradingAgreementAccessBean[] getCurrentTradingAgreements()
                                                                 throws ECException
        Deprecated. This method is replaced by ContractCmdUtil.getCurrentTradingAgreements(CommandContext)
        This method gets the current set of trading agreements.
        Specified by:
        getCurrentTradingAgreements in interface CommandContext
        Returns:
        The trading agreements represented by an array of TradingAgreementAccessBean objects.
        Throws:
        ECException
      • getDefaultDeviceFormat

        public java.lang.Integer getDefaultDeviceFormat()
        Deprecated. No replacement.
        Reserved for IBM internal use. This method gets the default device type which. It is used to locate a view command implementation from the VIEWREG table when no view command is defined for the input device type.
        Specified by:
        getDefaultDeviceFormat in interface CommandContext
        Returns:
        java.lang.Integer
      • getDeviceFormatAdapter

        public com.ibm.commerce.adapter.DeviceFormatAdapter getDeviceFormatAdapter()
        Deprecated. No replacement.
        Reserved for IBM internal use. Gets the device format adapter associated with this request.
        Specified by:
        getDeviceFormatAdapter in interface CommandContext
        Returns:
        A DeviceFormatAdapter object.
      • getDeviceFormatId

        public final java.lang.Integer getDeviceFormatId()
        Deprecated. No replacement.
        Reserved for IBM internal use. 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()
        Deprecated. No replacement.
        Reserved for IBM internal use. Gets the device format type associated with this request which is used for locating view commands from the VIEWREG table.
        Specified by:
        getDeviceFormatTypeId in interface CommandContext
        Returns:
        java.lang.Integer
      • getDeviceType

        public final java.lang.Integer getDeviceType()
        Deprecated. No replacement.
        Reserved for IBM internal use. 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)
        Deprecated. No replacement.
        Reserved for IBM internal use. Returns the output document path name based on a base name, where 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
        Deprecated. This method is replaced by ContractCmdUtil.getEligibleTradingAgreementIds(CommandContext)
        This method gets the eligible trading agreement IDs as an array.
        Specified by:
        getEligibleTradingAgreementIds in interface CommandContext
        Returns:
        A String array of trading agreement ids.
        Throws:
        ECException
      • getEncCurContr

        public final java.lang.String getEncCurContr()
        Deprecated. This method has no replacement because it should not be called.

        Reserved for IBM internal use. Gets the encrypted current contracts.
        Specified by:
        getEncCurContr in interface CommandContext
        Returns:
        java.lang.String
      • getEncElgContr

        public final java.lang.String getEncElgContr()
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Gets the encrypted eligible contracts.
        Specified by:
        getEncElgContr in interface CommandContext
        Returns:
        java.lang.String
      • getEncParOrg

        public final java.lang.String getEncParOrg()
        Deprecated. This method has no replacement because it should not be called.

        Reserved for IBM internal use. Gets the encrypted parent organization.
        Specified by:
        getEncParOrg in interface CommandContext
        Returns:
        java.lang.String
      • getEncParOrgAndCurContr

        public final java.lang.String getEncParOrgAndCurContr()
        Deprecated. This method has no replacement because it should not be called.

        Reserved for IBM internal use. Gets the encrypted parent organization and current contract.
        Specified by:
        getEncParOrgAndCurContr in interface CommandContext
        Returns:
        java.lang.String
      • getEncSesContr

        public final java.lang.String getEncSesContr()
        Deprecated. This method has no replacement because it should not be called.

        Reserved for IBM internal use. Gets the encrypted session contracts.
        Specified by:
        getEncSesContr in interface CommandContext
        Returns:
        java.lang.String
      • getErrorViewName

        public java.lang.String getErrorViewName()
        Reserved for IBM internal use. Gets the error view name.
        Specified by:
        getErrorViewName in interface CommandContext
        Returns:
        String - name of error view
      • getExpiryDate

        public final java.sql.Timestamp getExpiryDate()
        Deprecated. No replacement.
        Reserved for IBM internal use. Gets the expiry date for a cached page.
        Specified by:
        getExpiryDate in interface CommandContext
        Returns:
        TimeStamp - the expiry date.
      • getForUserId

        public final java.lang.Long getForUserId()
                                          throws ECException
        Reserved for IBM internal use. Gets the for user ID for this command, which is extracted from the request properties saved in the commandContext.
        Specified by:
        getForUserId in interface CommandContext
        Returns:
        Long - user Id
        Throws:
        ECException
      • getLanguage

        public final java.lang.String getLanguage()
        This method gets the 2 character language code associated with this command.
        Specified by:
        getLanguage in interface CommandContext
        Returns:
        A java.lang.String object that represents the language code.
      • getLanguageId

        public final java.lang.Integer getLanguageId()
        This method gets the negotiated language id associated with this request.
        Specified by:
        getLanguageId in interface CommandContext
        Returns:
        The negotiated language id represented by an Integer object.
      • getLocale

        public final java.util.Locale getLocale()
        This method returns the locale associated with this request.
        Specified by:
        getLocale in interface CommandContext
        Returns:
        A Locale object that represents the locale.
      • getLocale

        public final java.util.Locale getLocale(java.lang.Integer languageId)
        Deprecated. This method is replaced by CommandContextHelper.getLocale(Integer)
        This method returns the locale associated with a given language.
        Specified by:
        getLocale in interface CommandContext
        Parameters:
        languageId - An Integer object that represents the language id.
        Returns:
        Locale
      • getLocaleVariant

        public final java.lang.String getLocaleVariant()
        This method gets the locale variant associated with this request.
        Specified by:
        getLocaleVariant in interface CommandContext
        Returns:
        A java.lang.String object that represents the locale variant.
      • getOriginalUserId

        public final java.lang.Long getOriginalUserId()
        Reserved for IBM internal use. 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()
        Deprecated. This method is replaced by CommandContextHelper.getParentOrg(CommandContext)
        Reserved for IBM internal use. Gets the parent organization.
        Specified by:
        getParentOrg in interface CommandContext
        Returns:
        java.lang.String
      • getPreferredLanguage

        public final java.lang.Integer getPreferredLanguage()
                                                     throws ECSystemException
        This method gets the preferred language id for this request. If the language id is not present in the request properties, the language id found in the session will be used. If it is not found in the session, the preferred language as defined in the user access bean will be returned.
        Specified by:
        getPreferredLanguage in interface CommandContext
        Returns:
        An Integer object that represents the preferred language id.
        Throws:
        ECSystemException
      • getRedirectionURL

        public final java.lang.String getRedirectionURL()
        Deprecated. No replacement.
        Reserved for IBM internal use. Gets the redirect URL for this request.
        Specified by:
        getRedirectionURL in interface CommandContext
        Returns:
        String
      • getRemoteAddr

        public final java.lang.String getRemoteAddr()
        Deprecated. Retrieve the TransportData object from the AuditContext of the request. Then get the remote address by calling TransportData.getRemoteAddress()
        Reserved for IBM internal use. Gets the address of the remote host.
        Specified by:
        getRemoteAddr in interface CommandContext
        Returns:
        java.lang.String
      • getRemoteHost

        public final java.lang.String getRemoteHost()
        Deprecated. Retrieve the TransportData object from the AuditContext of the request. Then get the remote host by calling TransportData.getRemoteHost()
        Reserved for IBM internal use. Gets the name of the remote host.
        Specified by:
        getRemoteHost in interface CommandContext
        Returns:
        java.lang.String
      • getRequest

        public java.lang.Object getRequest()
        Deprecated. If the CommandContext object is an instance of ViewCommandContext (that is, the request is initiated from the web channel), it should be cast to ViewCommandContext and the getRequest() method should be used.
        This method gets the controller request object associated with this request.
        Specified by:
        getRequest in interface CommandContext
        Returns:
        The request object.
      • getRequestProperties

        public final TypedProperty getRequestProperties()
        This method gets the request properties associated with this request.
        Specified by:
        getRequestProperties in interface CommandContext
        Returns:
        The request properties.
      • getResolvedQueryString

        public java.lang.String getResolvedQueryString()
        Deprecated. This method is replaced by CommandContextHelper.getResolvedQueryString(CommandContext)
        Reserved for IBM internal use. Gets the interpreted request properties as a query string.
        Specified by:
        getResolvedQueryString in interface CommandContext
        Returns:
        String - the interpreted query string
      • getResponse

        public java.lang.Object getResponse()
        Deprecated. If the CommandContext object is an instance of ViewCommandContext (that is, the request is initiated from the web channel), it should be cast to ViewCommandContext and the getResponse() method should be used.
        This method gets the response object associated with this request.
        Specified by:
        getResponse in interface CommandContext
        Returns:
        The response object.
      • getResult

        public final boolean getResult()
        Reserved for IBM internal use. Gets the result of this request, which is true if successful, false otherwise.
        Specified by:
        getResult in interface CommandContext
        Returns:
        boolean
      • getSessionContext

        public com.ibm.commerce.adapter.SessionContext getSessionContext()
                                                                  throws ECException
        Deprecated. No replacement.
        Reserved for IBM internal use. Gets the session context associated with this request.
        Specified by:
        getSessionContext in interface CommandContext
        Returns:
        SessionContext
        Throws:
        ECException
      • getSessionData

        public final com.ibm.commerce.adapter.SessionData getSessionData()
        Deprecated. No replacement. Instead of retrieving the attributes from the SessionData object, should call the equivalent methods from the command context.
        Reserved for IBM internal use. Gets the session data associated with this request.
        Specified by:
        getSessionData in interface CommandContext
        Returns:
        A SessionData object.
      • getStore

        public final StoreAccessBean getStore(java.lang.Integer aStoreId)
                                       throws ECSystemException
        This method gets the store access bean associated with this request. It returns null if no store is associated with this request.
        Specified by:
        getStore in interface CommandContext
        Parameters:
        aStoreId -
        Returns:
        A StoreAccessBean object.
        Throws:
        ECSystemException
      • getStoreId

        public final java.lang.Integer getStoreId()
        This method gets the store ID for this request.
        Specified by:
        getStoreId in interface CommandContext
        Returns:
        An Integer object that represents the store id.
      • getTimestamp

        public final java.sql.Timestamp getTimestamp()
        Reserved for IBM internal use. Gets the current time stamp, which is set once for the duration of the command.
        Specified by:
        getTimestamp in interface CommandContext
        Returns:
        The current TimeStamp.
      • getTradingAgreement

        public TradingAgreementAccessBean getTradingAgreement(java.lang.Long id)
                                                       throws ECException
        Deprecated. This method is replaced by ContractCmdUtil.getTradingAgreement(Long)
        This method gets a trading agreement given an ID.
        Specified by:
        getTradingAgreement in interface CommandContext
        Parameters:
        id - A Long object that represents the trading agreement id.
        Returns:
        A TradingAgreementAccessBean object.
        Throws:
        ECException
      • getTradingAgreement

        public TradingAgreementAccessBean getTradingAgreement(java.lang.String id)
                                                       throws ECException
        Deprecated. This method is replaced by ContractCmdUtil.getTradingAgreement(String)
        This method gets a trading agreement given a string ID.
        Specified by:
        getTradingAgreement in interface CommandContext
        Parameters:
        id - A String object that represents a trading agreement id.
        Returns:
        A TradingAgreementAccessBean object.
        Throws:
        ECException
      • getUniqueSessionTag

        public java.lang.String getUniqueSessionTag()
        Deprecated. This method is replaced by CommandContextHelper.getUniqueSessionTag(CommandContext)
        Reserved for IBM internal use. Returns 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
        This method gets the user access bean for the user of this request. Returns null if no user is defined.
        Specified by:
        getUser in interface CommandContext
        Parameters:
        id - A String object that represents the trading agreement id.
        Returns:
        A UserAccessBean object.
        Throws:
        ECSystemException
      • getUserId

        public final java.lang.Long getUserId()
        This method gets the user id.
        Specified by:
        getUserId in interface CommandContext
        Returns:
        A Long object that represents the user id.
      • getViewCommand

        public final java.lang.String getViewCommand()
        Deprecated. No replacement.
        Reserved for IBM internal use. Gets the view name associated with this request.
        Specified by:
        getViewCommand in interface CommandContext
        Returns:
        String
      • getWebpath

        public java.lang.String getWebpath()
        Deprecated. If the CommandContext is an instance of ViewCommandContext (that is, the request is initiated from the web channel), cast it to ViewCommandContext and use getWebpath() method.
        Reserved for IBM internal use. 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 Web path 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
        Deprecated. This method is replaced by ContractCmdUtil.invalidateTradingAgreement(String, CommandContext)
        This method removes a trading agreement from cache given a string ID.
        Specified by:
        invalidateTradingAgreement in interface CommandContext
        Parameters:
        id - A Long object that represents a trading agreement id.
        Throws:
        ECException
      • invalidateTradingAgreement

        public void invalidateTradingAgreement(java.lang.String id)
                                        throws ECException
        Deprecated. This method is replaced by ContractCmdUtil.invalidateTradingAgreement(String, CommandContext)
        This method removes a trading agreement from cache given a string ID.
        Specified by:
        invalidateTradingAgreement in interface CommandContext
        Parameters:
        id - A String object that represents a trading agreement id.
        Throws:
        ECException
      • isCacheTarget

        public final boolean isCacheTarget()
        Deprecated. No replacement.
        Reserved for IBM internal use. Returns true if this command is a cache target.
        Specified by:
        isCacheTarget in interface CommandContext
        Returns:
        boolean - cacheTarget
      • isResponseNecessary

        public boolean isResponseNecessary()
        Reserved for IBM internal use.
        Specified by:
        isResponseNecessary in interface CommandContext
        Returns:
        true if response is necessary for this command.
      • isSecure

        public final boolean isSecure()
        This method returns true if this is an HTTPS command and false otherwise.
        Specified by:
        isSecure in interface CommandContext
        Returns:
        boolean
      • isStoreCommand

        public boolean isStoreCommand()
        Deprecated. No replacement.
        Reserved for IBM internal use.
        Specified by:
        isStoreCommand in interface CommandContext
        Returns:
        true if this is a store command. Implies that the store directory will be automatically added to the document path for any forward view command.
      • resetStoreRef

        public final void resetStoreRef()
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Resets the EJB reference for the store associated with this command.
        Specified by:
        resetStoreRef in interface CommandContext
      • restoreUser

        public void restoreUser(java.lang.Long uId)
        Reserved for IBM internal use. Restores the current user to the original user.
        Specified by:
        restoreUser in interface CommandContext
        Parameters:
        uId - - original user Id
      • setActivityId

        public void setActivityId(long newActivityId)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the activity ID associated with this command which is used by the Logging component.
        Specified by:
        setActivityId in interface CommandContext
        Parameters:
        newActivityId - Long - activity Id
      • setAsyncCommand

        public void setAsyncCommand(boolean newValue)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the value to indicate whether this is an AsyncCommand.
        Specified by:
        setAsyncCommand in interface CommandContext
        Parameters:
        newValue - A boolean value; true for an AsyncCommand.
      • setUncacheable

        public final void setUncacheable(boolean newValue)
        Deprecated. No replacement.
        Reserved for IBM internal use. Sets the value to indicate whether a page should be cached or not.
        Specified by:
        setUncacheable in interface CommandContext
        Parameters:
        newValue - boolean
      • setCacheTarget

        public final void setCacheTarget(boolean newValue)
        Deprecated. No replacement.
        Reserved for IBM internal use. Sets the is cache target value for this command.
        Specified by:
        setCacheTarget in interface CommandContext
        Parameters:
        newValue - boolean
      • setCommand

        public final void setCommand(ECCommand aCommand)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the command that this command context is associated with.
        Specified by:
        setCommand in interface CommandContext
        Parameters:
        aCommand - ControllerCommand
      • setCommandName

        public final void setCommandName(java.lang.String value)
        Reserved for IBM internal use. Sets the command name.
        Specified by:
        setCommandName in interface CommandContext
        Parameters:
        value - The name of the command.
      • setCountry

        public final void setCountry(java.lang.String value)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the 2 character country code associated with this command.
        Specified by:
        setCountry in interface CommandContext
        Parameters:
        value - language java.lang.String
      • setCurrency

        public final void setCurrency(java.lang.String value)
        Deprecated. This method is replaced by GlobalizationContext.setCurrency(String)
        Reserved for IBM internal use. Sets the negotiated currency to be used for this request.
        Specified by:
        setCurrency in interface CommandContext
        Parameters:
        value - java.lang.String - a character String that represents the currency
      • setCurrentCommandName

        public void setCurrentCommandName(java.lang.String name)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the class name of the current command to be executed.
        Specified by:
        setCurrentCommandName in interface CommandContext
        Parameters:
        name - command class name
      • setCurrentTradingAgreementIdsAsString

        public void setCurrentTradingAgreementIdsAsString(java.lang.String newValue)
        Deprecated. This method is replaced by EntitlementContext.setCurrentTradingAgreementIds(String)
        Reserved for IBM internal use. Sets the session trading agreement IDs as a string.
        Parameters:
        newValue - String - trading agreement Ids
      • setCurrentTradingAgreements

        public void setCurrentTradingAgreements(TradingAgreementAccessBean[] newValue)
        Deprecated. This method is replaced by ContractCmdUtil.setCurrentTradingAgreements(TradingAgreementAccessBean[], CommandContext)
        Reserved for IBM internal use. Sets the current trading agreements.
        Specified by:
        setCurrentTradingAgreements in interface CommandContext
        Parameters:
        newValue - TradingAgreementAccessBean[] - trading agreements
      • setDefaultDeviceFormat

        public final void setDefaultDeviceFormat(java.lang.Integer newValue)
        Deprecated. No replacement.
        Reserved for IBM internal use. Sets the default device format type for this request.
        Specified by:
        setDefaultDeviceFormat in interface CommandContext
        Parameters:
        newValue - Integer - device format type
      • setDeviceFormatAdapter

        public final void setDeviceFormatAdapter(com.ibm.commerce.adapter.DeviceFormatAdapter newValue)
        Deprecated. No replacement.
        Reserved for IBM internal use. Sets the device format adapter used for this request.
        Specified by:
        setDeviceFormatAdapter in interface CommandContext
        Parameters:
        newValue - - DeviceFormatAdapter
      • setDeviceFormatId

        public final void setDeviceFormatId(java.lang.Integer newValue)
        Deprecated. No replacement.
        Reserved for IBM internal use. Sets the device format ID for this request.
        Specified by:
        setDeviceFormatId in interface CommandContext
        Parameters:
        newValue - Integer - device format id
      • setDeviceFormatTypeId

        public final void setDeviceFormatTypeId(java.lang.Integer newValue)
        Deprecated. No replacement.
        Reserved for IBM internal use. Sets the device format type ID for this request.
        Specified by:
        setDeviceFormatTypeId in interface CommandContext
        Parameters:
        newValue - java.lang.Integer - device format type id
      • setDeviceType

        public final void setDeviceType(java.lang.Integer newValue)
        Deprecated. No replacement.
        Reserved for IBM internal use. Sets the device format type ID for this request.
        Specified by:
        setDeviceType in interface CommandContext
        Parameters:
        newValue - java.lang.Integer - device format type id
      • setEligibleTradingAgreementIdsAsString

        public void setEligibleTradingAgreementIdsAsString(java.lang.String newValue)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the eligible trading agreement IDs as a string.
        Specified by:
        setEligibleTradingAgreementIdsAsString in interface CommandContext
        Parameters:
        newValue - String - eligible trading agreement Ids

      • setEncCurContr

        public void setEncCurContr(java.lang.String newEncCurContr)
        Deprecated. This method has no replacement because it should not be called.

        Reserved for IBM internal use. Sets the encrypted current contracts.
        Specified by:
        setEncCurContr in interface CommandContext
        Parameters:
        newEncCurContr - java.lang.String
      • setEncElgContr

        public void setEncElgContr(java.lang.String newEncElgContr)
        Deprecated. This method has no replacement because it should not be called.

        Reserved for IBM internal use. Sets the encrypted eligible contracts.
        Specified by:
        setEncElgContr in interface CommandContext
        Parameters:
        newEncElgContr - java.lang.String
      • setEncParOrg

        public void setEncParOrg(java.lang.String newEncParOrg)
        Deprecated. This method has no replacement because it should not be called.

        Reserved for IBM internal use. Sets the encrypted parent organization.
        Specified by:
        setEncParOrg in interface CommandContext
        Parameters:
        newEncParOrg - java.lang.String
      • setEncSesContr

        public void setEncSesContr(java.lang.String newEncSesContr)
        Deprecated. This method has no replacement because it should not be called.

        Reserved for IBM internal use. Sets the encrypted session contract.
        Specified by:
        setEncSesContr in interface CommandContext
        Parameters:
        newEncSesContr - java.lang.String
      • setErrorViewName

        public final void setErrorViewName(java.lang.String value)
        Deprecated. Set the error view name in the response properties instead.
        Reserved for IBM internal use. Sets the error view name.
        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)
        Deprecated. No replacement.
        Reserved for IBM internal use. Sets the expiry date for a cached page.
        Specified by:
        setExpiryDate in interface CommandContext
        Parameters:
        value - TimeStamp
      • setForUserId

        public final void setForUserId(java.lang.Long userId)
        Deprecated. Set the forUserId in the request properties instead.
        Reserved for IBM internal use. Sets the for user ID for this request.
        Specified by:
        setForUserId in interface CommandContext
        Parameters:
        userId - Long - user Id.
      • setLanguage

        public final void setLanguage(java.lang.String value)
        Reserved for IBM internal use. Sets the negotiated language for this command.
        Specified by:
        setLanguage in interface CommandContext
        Parameters:
        value - language java.lang.String - a 2 character String that represents the language
      • setLanguageId

        public final void setLanguageId(java.lang.Integer value)
        Reserved for IBM internal use. Sets the negotiated language ID for this command.
        Specified by:
        setLanguageId in interface CommandContext
        Parameters:
        value - Integer - an Id represents the language
      • setLocale

        public final void setLocale(java.util.Locale newValue)
        Reserved for IBM internal use. Sets the locale for the command.
        Specified by:
        setLocale in interface CommandContext
        Parameters:
        newValue - Locale - this is the locale / preference locale for the user
      • setLocaleVariant

        public final void setLocaleVariant(java.lang.String value)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the locale variant to be used for this request.
        Specified by:
        setLocaleVariant in interface CommandContext
        Parameters:
        value - language java.lang.String
      • setParentOrg

        public final void setParentOrg(java.lang.String newParentOrg)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the parent organization.
        Parameters:
        newParentOrg - java.lang.String
      • getSessionPreferredCurrency

        public final java.lang.String getSessionPreferredCurrency()
                                                           throws ECSystemException
        Deprecated. This method is replaced by com.ibm.commerce.context.globalization.GlobalizationContext#getPreferredCurrency(String)
        Reserved for IBM internal use. This method gets the preferred currency for the user. It is retrieved from the session if one is present. Otherwise it is retrieved from the user object.
        Returns:
        java.lang.String
        Throws:
        ECSystemException
      • setPreferredCurrency

        public final void setPreferredCurrency(java.lang.String value)
        Reserved for IBM internal use. Sets the preferred currency for this user for this command.
        Specified by:
        setPreferredCurrency in interface CommandContext
        Parameters:
        value - The currency code.
      • setSessionPreferredCurrency

        public final void setSessionPreferredCurrency(java.lang.String value)
        Deprecated. This method is replaced by GlobalizationContext.setPreferredCurrency(String)
        Reserved for IBM internal use. Sets the preferred currency for the user, where the input currency is retrieved from the session.
        Parameters:
        value - String - the preferred currency
      • setPreferredLanguage

        public final void setPreferredLanguage(java.lang.Integer value)
        Reserved for IBM internal use. Sets the preferred language for this request.
        Specified by:
        setPreferredLanguage in interface CommandContext
        Parameters:
        value - Integer - a language Id
      • setRedirectionURL

        public final void setRedirectionURL(java.lang.String url)
        Deprecated. Set the url in the response property instead.
        Reserved for IBM internal use. Sets the redirect URL name.
        Specified by:
        setRedirectionURL in interface CommandContext
        Parameters:
        url - String - redirect URL name
      • setRemoteAddr

        public final void setRemoteAddr(java.lang.String newRemoteAddr)
        Deprecated. Retrieve the TransportData object from the AuditContext of the request. Then set the remote address by calling com.ibm.commerce.context.audit.TransportData#setRemoteAddress()
        Reserved for IBM internal use. 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)
        Deprecated. Retrieve the TransportData object from the AuditContext of the request. Then set the remote host by calling com.ibm.commerce.context.audit.TransportData#setRemoteHost()
        Reserved for IBM internal use. Sets the remote host name.
        Specified by:
        setRemoteHost in interface CommandContext
        Parameters:
        newRemoteHost - java.lang.String
      • setRequest

        public void setRequest(java.lang.Object value)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the controller request object associated with this command.
        Specified by:
        setRequest in interface CommandContext
        Parameters:
        value - Object - the request object
      • setRequestProperties

        public final void setRequestProperties(TypedProperty value)
        This method sets the request property object associated with this request.
        Specified by:
        setRequestProperties in interface CommandContext
        Parameters:
        value - A TypedProperty object.
      • setResponse

        public void setResponse(java.lang.Object value)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the response object associated with this command.
        Specified by:
        setResponse in interface CommandContext
        Parameters:
        value - Object - response object.
      • setResponseNecessary

        public void setResponseNecessary(boolean newValue)
        Reserved for IBM internal use. Sets to false if response is not required to be composed for the command. True otherwise.
        Specified by:
        setResponseNecessary in interface CommandContext
        Parameters:
        newValue - boolean
      • setResult

        public final void setResult(boolean newValue)
        Reserved for IBM internal use. Sets the result for this command.
        Specified by:
        setResult in interface CommandContext
        Parameters:
        newValue - boolean
      • setSecure

        public final void setSecure(boolean newValue)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the isSecure value for this command.
        Specified by:
        setSecure in interface CommandContext
        Parameters:
        newValue - boolean
      • setSessionContext

        public final void setSessionContext(com.ibm.commerce.adapter.SessionContext aSessionContext)
        Deprecated. No replacement.
        Reserved for IBM internal use. Sets the session context object associated with this request.
        Specified by:
        setSessionContext in interface CommandContext
        Parameters:
        aSessionContext - SessionContext
      • setSessionData

        public final void setSessionData(com.ibm.commerce.adapter.SessionData value)
        Deprecated. No replacement. Instead of setting the attributes to the SessionData object, should call the equivalent methods from the command context.
        Reserved for IBM internal use. Sets the session data object associated with this request.
        Specified by:
        setSessionData in interface CommandContext
        Parameters:
        value - SessionData
      • setSessionTradingAgreementIdsAsString

        public void setSessionTradingAgreementIdsAsString(java.lang.String newValue)
        Deprecated. This method is replaced by com.ibm.commerce.context.entitlement.EntitlementContext#setSessionTradingAgreementIdsAsString(String)
        Reserved for IBM internal use. Sets the session trading agreement IDs as a string.
        Specified by:
        setSessionTradingAgreementIdsAsString in interface CommandContext
        Parameters:
        newValue - String - trading agreement Ids
      • setStore

        public final void setStore(StoreAccessBean newValue)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the store associated with this command.
        Specified by:
        setStore in interface CommandContext
        Parameters:
        newValue - StoreAccessBean
      • setStoreCommand

        public void setStoreCommand(boolean value)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Returns true if this is a store level command and returns false otherwise.
        Specified by:
        setStoreCommand in interface CommandContext
        Parameters:
        value - boolean
      • setStoreId

        public final void setStoreId(java.lang.Integer newValue)
        Reserved for IBM internal use. Sets the store ID associated with this command.
        Specified by:
        setStoreId in interface CommandContext
        Parameters:
        newValue - java.lang.Integer - the store ID
      • setTimestamp

        public final void setTimestamp(java.sql.Timestamp value)
        Reserved for IBM internal use. Sets the time stamp for the command.
        Specified by:
        setTimestamp in interface CommandContext
        Parameters:
        value - TimeStamp
      • setUniqueSessionTag

        public final void setUniqueSessionTag(java.lang.String value)
                                       throws ECException
        Deprecated. No replacement.
        Reserved for IBM internal use. Sets a tag that is unique for the session.
        Specified by:
        setUniqueSessionTag in interface CommandContext
        Parameters:
        value - - java.lang.String
        Throws:
        ECException
      • setUserId

        public final void setUserId(java.lang.Long newUserReferenceNumber)
        Reserved for IBM internal use. Sets the user ID for this request.
        Specified by:
        setUserId in interface CommandContext
        Parameters:
        newUserReferenceNumber - Long - user Id.
      • setViewCommand

        public final void setViewCommand(java.lang.String view)
        Deprecated. Set the view name in the response properties instead.
        Reserved for IBM internal use. Sets the view name for this command.
        Specified by:
        setViewCommand in interface CommandContext
        Parameters:
        view - String - view name
      • setWebpath

        public void setWebpath(java.lang.String newValue)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the Web path associated with this command.
        Specified by:
        setWebpath in interface CommandContext
        Parameters:
        newValue - String - the webpath
      • userCanExecuteCommand

        public final boolean userCanExecuteCommand(AccCommand command)
                                            throws ECException
        Deprecated. This method is replaced by CommandContextHelper.canUserExecuteCommand(AccCommand)
        Reserved for IBM internal use. Checks whether the user can execute a command.
        Specified by:
        userCanExecuteCommand in interface CommandContext
        Parameters:
        command -
        Returns:
        true - if user can execute command
        Throws:
        ECException
      • clearForUser

        public void clearForUser()
        This method returns clears the for user details.
      • getForStoreId

        public java.lang.Integer getForStoreId()
        This method gets the for store ID.
        Specified by:
        getForStoreId in interface CommandContext
        Returns:
        A forStoreId object.
      • setForStoreId

        public void setForStoreId(java.lang.Integer val)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the for store ID.
        Specified by:
        setForStoreId in interface CommandContext
        Parameters:
        val - The forStoreId
      • getOrgUserInfo

        public CommandContextImpl.UserDependantInfo getOrgUserInfo()
        This method gets the organization user information.
        Returns:
        This method returns a UserDependantInfo object.
      • setOrgUserInfo

        public void setOrgUserInfo(CommandContextImpl.UserDependantInfo orgUserInfo)
        This method sets the organization user information.
        Parameters:
        orgUserInfo - The orgUserInfo object to set.
      • getCurUserInfo

        public CommandContextImpl.UserDependantInfo getCurUserInfo()
        This method gets the current user information.
        Returns:
        This method returns a UserDependantInfo object.
      • setCurUserInfo

        public void setCurUserInfo(CommandContextImpl.UserDependantInfo curUserInfo)
        This method sets the current user information.
        Parameters:
        curUserInfo - The curUserInfo object to set.
      • setForUserInfo

        public void setForUserInfo(CommandContextImpl.UserDependantInfo forUserInfo)
        This method sets the for user information.
        Parameters:
        forUserInfo - The forUserInfo object to set.
      • getCurStoreInfo

        public com.ibm.commerce.command.CommandContextImpl.StoreDependantInfo getCurStoreInfo()
        This method gets the current store information.
        Returns:
        This method returns current store information.
      • setCurStoreInfo

        public void setCurStoreInfo(com.ibm.commerce.command.CommandContextImpl.StoreDependantInfo curStoreInfo)
        This method sets the current store information.
        Parameters:
        curStoreInfo - The current store information to set.
      • getNewStores

        public java.util.ArrayList getNewStores()
        This method gets the new stores.
        Returns:
        This method returns an ArrayList of new stores.
      • setNewStores

        public void setNewStores(java.util.ArrayList newStores)
        This method sets the new stores.
        Parameters:
        newStores - The newStores object to set.
      • getParentStores

        public java.util.ArrayList getParentStores()
        This method gets the parent stores.
        Returns:
        This method returns an ArrayList of parent stores.
      • setParentStores

        public void setParentStores(java.util.ArrayList parentStores)
        This method sets the parent stores.
        Parameters:
        parentStores - The parentStores to set.
      • setStoreInfo

        public void setStoreInfo(com.ibm.commerce.command.CommandContextImpl.InternalStoreInfo storeInfo)
        Deprecated. 
        Reserved for IBM internal use. Sets the internal parent stores list.
        Parameters:
        storeInfo - - the internal store info.
      • changeUser

        public void changeUser(java.lang.Long newValue)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Changes the user and the information associated with user.
        Parameters:
        newValue - java.lang.Long - the userId
      • getCachePage

        public final boolean getCachePage()
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Gets the cache page value. Returns true if the page has to be cached and returns false otherwise.
        Returns:
        boolean - the cache page value
      • setCachePage

        public final void setCachePage(boolean newValue)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the value to indicate whether a page should be cached or not.
        Parameters:
        newValue - boolean
      • getEncoding

        public java.lang.String getEncoding()
        Deprecated. If the CommandContext is an instance of ViewCommandContext (that is, the request is initiated from the web channel), cast it to ViewCommandContext and use getEncoding() method. If it is not, use the default encoding for the languageId associated with the request. It can be retrieved by calling LanguageRegistry.getEncoding(Integer)
        Returns the character encoding.
        Specified by:
        getEncoding in interface CommandContext
        Returns:
        character encoding.
      • setEncoding

        public void setEncoding(java.lang.String encoding)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the character encoding.
        Specified by:
        setEncoding in interface CommandContext
        Parameters:
        encoding - The character encoding to set
      • getTransactionCache

        public com.ibm.commerce.datatype.CustomProperties getTransactionCache()
        This method gets the cache of custom properties. If the cache does not yet exist, this method creates it. This method requires the use of the following naming conventions when adding an object to this cache to avoid naming collisions:
        • aNameSpace - use the fully qualified class name. For example, "com.ibm.commerce.order.commands.OrderDisplayCmdImpl".
        • aName - use a name that is unique within aNameSpace.
        Specified by:
        getTransactionCache in interface CommandContext
        Returns:
        The custom properties. This method will never return null.
      • setTransactionCache

        public com.ibm.commerce.datatype.CustomProperties setTransactionCache(com.ibm.commerce.datatype.CustomProperties aCustomProperties)
        This method sets the cache of custom properties. The cache contents can be cleared by the CommandContext at any time.
        Specified by:
        setTransactionCache in interface CommandContext
        Parameters:
        aCustomProperties -
        Returns:
        The previous cache of custom properties.
      • getActivityToken

        public ActivityToken getActivityToken()
        Returns the activity token associated with this request.
        Specified by:
        getActivityToken in interface CommandContext
        Returns:
        The activity token or null if none specified.
      • setActivityToken

        public void setActivityToken(ActivityToken token)
        Deprecated. This method has no replacement because it should not be called.
        Reserved for IBM internal use. Sets the activity token associated with this request.
        Specified by:
        setActivityToken in interface CommandContext
        Parameters:
        token -
      • getContext

        public Context getContext(java.lang.String strContextName)
        This method returns the context of the given name.
        Specified by:
        getContext in interface CommandContext
        Parameters:
        strContextName - The name of the context to retrieve.
        Returns:
        The context.
      • getCallerId

        public java.lang.Long getCallerId()
        This method gets the original caller ID of this request.
        Specified by:
        getCallerId in interface CommandContext
        Returns:
        Returns the caller id.
      • setActiveOrganizationId

        public void setActiveOrganizationId(java.lang.Long nOrganizationId)
                                     throws ECException
        Deprecated. This method is replaced by com.ibm.commerce.context.entitlement.EntitlementContext#setActiveOrganizationId()
        This method sets the active organization for the current store.
        Specified by:
        setActiveOrganizationId in interface CommandContext
        Parameters:
        nOrganizationId - The member ID of the organization.
        Throws:
        ECException
      • establishStickyUser

        public void establishStickyUser(java.lang.Long nUserId)
                                 throws ECException
        Reserved for IBM internal use. Sets the forUserId to be used in for this request and subsequent requests.
        Specified by:
        establishStickyUser in interface CommandContext
        Parameters:
        nUserId - The userId to be sticky.
        Throws:
        ECException
      • clearStickyUser

        public boolean clearStickyUser()
                                throws ECException
        Reserved for IBM internal use. Clears the current sticky forUserId from the session.
        Specified by:
        clearStickyUser in interface CommandContext
        Returns:
        True if there was a stickyUserId to clear.
        Throws:
        ECException
      • setStickyUserId

        public void setStickyUserId(java.lang.Long nUserId)
        Reserved for IBM internal use. Sets the sticky forUserId.
        Specified by:
        setStickyUserId in interface CommandContext
        Parameters:
        nUserId -
      • getStickyActiveOrganizationId

        public java.lang.Long getStickyActiveOrganizationId()
                                                     throws ECException
        Reserved for IBM internal use. Retrieves the sticky active organization Id for the sticky user.
        Specified by:
        getStickyActiveOrganizationId in interface CommandContext
        Returns:
        The active organization Id.
        Throws:
        ECException
      • setStickyActiveOrganizationId

        public void setStickyActiveOrganizationId(java.lang.Long nActiveOrganizationId)
        Reserved for IBM internal use. Sets the sticky active organization Id for the sticky user.
        Specified by:
        setStickyActiveOrganizationId in interface CommandContext
        Parameters:
        nActiveOrganizationId - The active organization Id.