Package com.portal.app.comp
Class PBrandBeanImpl
java.lang.Object
com.portal.bas.PControllerImpl
com.portal.app.comp.PBrandBeanImpl
- All Implemented Interfaces:
PBrandBean
,PControllerBean
,Serializable
,Remote
,Unreferenced
The Brand Bean controller class.
- Version:
- %version: 4 % %date_modified: Thu Aug 02 11:52:12 2001 %
- Author:
- raghuv
- See Also:
-
Field Summary
Fields inherited from class com.portal.bas.PControllerImpl
mFList, mRemoteListeners, UPDATE_CLIENT, UPDATE_MODEL_CHANGE, UPDATE_NEW_MODEL, UPDATE_PROPERTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the active brand as a PScopeEntryPoint ObjectReturns the Brand hierarchy in a swing TreeModel.getModelField
(PModelHandle mh, PFieldSpecification spec) Get a specific field from the data model.getSelectionDataFor
(String dataItem, int index) Given the name of a display data item, and an optional index, return the information needed for Selection event to be useful.boolean
Check if branding is enabled.boolean
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.lookupBrandFromPoid
(PModelHandle brandPoid) Used to lookup the brand that is associated with the given brand poid.void
Retrieves the Brand hierarchy from the database.boolean
setActiveBrand
(PScopeEntryPoint newActiveBrand) Sets the given brand as the new active brand in the infranet system.void
Update.Methods inherited from class com.portal.bas.PControllerImpl
addRemoteListener, closeSecContext, createClientException, distributeEventToListeners, fireModelChangeEvent, getAppController, getArrayRange, getContext, getField, getField, getField, getFieldWithRestriction, getFieldWithRestriction, getFieldWithRestriction, getModel, getRemoteListenerHandle, getSecContext, handleDistributeToListener, isLight, register, releaseContext, releaseRemoteListener, removeRemoteListener, setField, setField, setModel, unreferenced
-
Constructor Details
-
PBrandBeanImpl
- Throws:
RemoteException
-
-
Method Details
-
getBrands
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 interfacePBrandBean
- Returns:
- TreeModel
- Throws:
RemoteException
RemoteException
- invalid input: '<'>
-
retrieveBrands
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 interfacePBrandBean
- Throws:
RemoteException
RemoteException
- invalid input: '<'>
-
isDummyRoot
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 interfacePBrandBean
- Throws:
RemoteException
-
getActiveBrand
Returns the active brand as a PScopeEntryPoint Object- Specified by:
getActiveBrand
in interfacePBrandBean
- Returns:
- PScopeEntryPoint
- Throws:
RemoteException
RemoteException
- invalid input: '<'>
-
lookupBrandFromPoid
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 interfacePBrandBean
- Parameters:
brandPoid
- A PModelHandle object representing a Brand poid object.- Returns:
- PScopeEntryPoint representing brand.
- Throws:
RemoteException
-
setActiveBrand
Sets the given brand as the new active brand in the infranet system.- Specified by:
setActiveBrand
in interfacePBrandBean
- 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
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 fromspec
- A field specification- Returns:
- The value of the specified field
-
isBrandingEnabled
Check if branding is enabled.- Specified by:
isBrandingEnabled
in interfacePBrandBean
- Returns:
- true if Branding is enabled, false otherwise.
- Throws:
RemoteException
RemoteException
- invalid input: '<'>
-
update
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 classPControllerImpl
- 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
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 interfacePControllerBean
- Parameters:
dataItem
- The name of a data item. Must match the name of an item changed via sending a ViewDataChangeEventindex
- Optional index into an array data item- Returns:
- Usually a modle handle or array of modle handles
- Throws:
RemoteException
- thrown for errors
-