Class PBrandBeanImpl

java.lang.Object
com.portal.bas.PControllerImpl
com.portal.app.comp.PBrandBeanImpl
All Implemented Interfaces:
PBrandBean, PControllerBean, Serializable, Remote, Unreferenced

public class PBrandBeanImpl extends PControllerImpl implements PBrandBean
The Brand Bean controller class.
Version:
%version: 4 % %date_modified: Thu Aug 02 11:52:12 2001 %
Author:
raghuv
See Also:
  • Constructor Details

  • Method Details

    • getBrands

      public TreeModel getBrands() throws RemoteException
      Returns the Brand hierarchy in a swing TreeModel. The root node may be dummy only serving the purpose of parenting the loose brands. Use isDummy() on the root node to determine if it is just a dummy root node.
      Specified by:
      getBrands in interface PBrandBean
      Returns:
      TreeModel
      Throws:
      RemoteException
      RemoteException - invalid input: '<'>
    • retrieveBrands

      public void retrieveBrands() throws RemoteException
      Retrieves the Brand hierarchy from the database. This causes an opcode call be made to infranet to retrieve the brand hierarchy and update the component data. Unlike getBrands(), this forces a call to back end to get the updated brand hierarchy instead of returning one from the cache.
      Specified by:
      retrieveBrands in interface PBrandBean
      Throws:
      RemoteException
      RemoteException - invalid input: '<'>
    • isDummyRoot

      public boolean isDummyRoot() throws RemoteException
      Returns true if the root node of the tree model is a dummy root node only serving the purpose of parenting loose brands and account groups. (In such a case root node is invisible in the tree displayed)
      Specified by:
      isDummyRoot in interface PBrandBean
      Throws:
      RemoteException
    • getActiveBrand

      public PScopeEntryPoint getActiveBrand() throws RemoteException
      Returns the active brand as a PScopeEntryPoint Object
      Specified by:
      getActiveBrand in interface PBrandBean
      Returns:
      PScopeEntryPoint
      Throws:
      RemoteException
      RemoteException - invalid input: '<'>
    • lookupBrandFromPoid

      public PScopeEntryPoint lookupBrandFromPoid(PModelHandle brandPoid) throws RemoteException
      Used to lookup the brand that is associated with the given brand poid. The brand poid should be available as a PScopeEntryPoint in the Context.
      Specified by:
      lookupBrandFromPoid in interface PBrandBean
      Parameters:
      brandPoid - A PModelHandle object representing a Brand poid object.
      Returns:
      PScopeEntryPoint representing brand.
      Throws:
      RemoteException
    • setActiveBrand

      public boolean setActiveBrand(PScopeEntryPoint newActiveBrand) throws RemoteException
      Sets the given brand as the new active brand in the infranet system.
      Specified by:
      setActiveBrand in interface PBrandBean
      Parameters:
      PScopeEntryPoint - A Brand info object containing the brand to which the credentials/scope should be set to
      Returns:
      Returns true if active brand was set successfully, else returns false.
      Throws:
      RemoteException
      RemoteException - invalid input: '<'>
    • getModelField

      public Object getModelField(PModelHandle mh, PFieldSpecification spec)
      Get a specific field from the data model. Will get all the fields specified by a compound specification
      Parameters:
      mh - A ModelHandle get get a field from
      spec - A field specification
      Returns:
      The value of the specified field
    • isBrandingEnabled

      public boolean isBrandingEnabled() throws RemoteException
      Check if branding is enabled.
      Specified by:
      isBrandingEnabled in interface PBrandBean
      Returns:
      true if Branding is enabled, false otherwise.
      Throws:
      RemoteException
      RemoteException - invalid input: '<'>
    • update

      public void update(int reason, Object data) throws RemoteException
      Update. Called by various internal methods when the data has changed enough to need to change the client display. Must be overridden by specific controller subclass.
      Specified by:
      update in class PControllerImpl
      Parameters:
      reason - The reason for the update. One of: (@link PComponentControllerInfo.UPDATE_NEW_MODEL) (@link PComponentControllerInfo.UPDATE_PROPERTY) (@link PComponentControllerInfo.UPDATE_MODEL_CHANGE) (@link PComponentControllerInfo.UPDATE_CLIENT)
      data - Data associated with update.
      Throws:
      RemoteException
    • getSelectionDataFor

      public Object getSelectionDataFor(String dataItem, int index) throws RemoteException
      Given the name of a display data item, and an optional index, return the information needed for Selection event to be useful. This usually means model data
      Specified by:
      getSelectionDataFor in interface PControllerBean
      Parameters:
      dataItem - The name of a data item. Must match the name of an item changed via sending a ViewDataChangeEvent
      index - Optional index into an array data item
      Returns:
      Usually a modle handle or array of modle handles
      Throws:
      RemoteException - thrown for errors