|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.beans.FeatureDescriptor
atg.beans.SerializableFeatureDescriptor
atg.beans.DynamicPropertyDescriptor
atg.repository.RepositoryPropertyDescriptor
atg.commerce.inventory.InventoryAvailabilityPropertyDescriptor
public class InventoryAvailabilityPropertyDescriptor
In the most general case, this property descriptor can take a RepositoryItem and extract out of it
a list of RepositoryItems. It will then iterate through this list of RepositoryItems to check their Inventory
Status. It will return all the RepositoryItems whose inventory status is equal to the configured
inventoryStatus
. It is flexible enough to use any inventory manager to query for
availability status, can extract a list of RepositoryItems from any property and check for any inventory
status.
In the out of the box state, this implementation will look for a list of Sku items and check each sku to see if it has a status of InventoryManager.AVAILABILITY_STATUS_IN_STOCK. For those that are available it will return this list. One example of this usage would be if a list of alternate skus was defined for a sku item. This could be a list of upsell items or replacement skus. This property descriptor would allow only those skus that are currently available.
Properties that can be configured via the attribute tags in the GSA template
RepositoryPropertyDescriptor
,
InventoryManager
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
Fields inherited from class atg.repository.RepositoryPropertyDescriptor |
---|
EMPTY_LIST, EMPTY_MAP, EMPTY_SET, FOREIGN_REPOSITORY_NAME, FOREIGN_REPOSITORY_PATH, mCollectionOrMap |
Fields inherited from class atg.beans.DynamicPropertyDescriptor |
---|
PORTABLE_VALUE_KEY |
Fields inherited from class atg.beans.SerializableFeatureDescriptor |
---|
BUNDLE_ATTRIBUTE_NAME, LOCALE_ATTRIBUTE_NAME |
Constructor Summary | |
---|---|
InventoryAvailabilityPropertyDescriptor()
Constructs a new InventoryAvailabilityPropertyDescriptor |
|
InventoryAvailabilityPropertyDescriptor(java.lang.String pPropertyName)
Constructs a new InventoryAvailabilityPropertyDescriptor property descriptor with the given name |
|
InventoryAvailabilityPropertyDescriptor(java.lang.String pPropertyName,
java.lang.Class pPropertyType,
java.lang.String pShortDescription)
Constructs a new InventoryAvailabilityPropertyDescriptor property descriptor with the given name, property type and short description. |
Method Summary | |
---|---|
InventoryManager |
getInventoryManager()
Return the InventoryManager that is used to query for the availability of a particular item. |
int |
getInventoryStatus()
Get the inventory status that is being checked for |
java.lang.String |
getItemListIdentifier()
Get the the property of a RepositoryItem that contains a list of RepositoryItems that will be checked for availability. |
java.lang.Object |
getPropertyValue(RepositoryItemImpl pItem,
java.lang.Object pValue)
From the parameter pItem, obtain a list of RepositoryItems. |
java.lang.String |
getTypeName()
Returns the type of property descriptor that this class defines. |
boolean |
isQueryable()
Return the property queryable |
boolean |
isWritable()
Return the property writable |
void |
setInventoryManager(InventoryManager pInventoryManager)
Set the InventoryManger that is going to be used to query the availability of a item. |
void |
setInventoryStatus(int pInventoryStatus)
Set the inventory status that is going to be checked for. |
void |
setItemListIdentifier(java.lang.String pItemListIdentifier)
Set the property that contains a list of RepositoryItems that will be checked for availability. |
void |
setValue(java.lang.String pAttributeName,
java.lang.Object pValue)
Looks for an attribute named either inventoryManagerPath or
itemListIdentifier and set the property. |
Methods inherited from class atg.beans.SerializableFeatureDescriptor |
---|
copyFeatureDescriptor, getDisplayName, getDisplayNameResource, getDisplaySortString, getShortDescription, getShortDescriptionResource, getSortString, setDisplayNameResource, setShortDescriptionResource |
Methods inherited from class java.beans.FeatureDescriptor |
---|
attributeNames, getName, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public InventoryAvailabilityPropertyDescriptor()
public InventoryAvailabilityPropertyDescriptor(java.lang.String pPropertyName)
pPropertyName
- the name of the propertypublic InventoryAvailabilityPropertyDescriptor(java.lang.String pPropertyName, java.lang.Class pPropertyType, java.lang.String pShortDescription)
pPropertyName
- the property namepPropertyType
- the property typepShortDescription
- the property short descriptionMethod Detail |
---|
public InventoryManager getInventoryManager()
public void setInventoryManager(InventoryManager pInventoryManager)
pInventoryManager
- the inventory managerpublic java.lang.String getItemListIdentifier()
public void setItemListIdentifier(java.lang.String pItemListIdentifier)
pItemListIdentifier
- the property that contains a list of RepositoryItemspublic void setInventoryStatus(int pInventoryStatus)
pInventoryStatus
- should be one of the four Inventory Status types from the InventoryManager classpublic int getInventoryStatus()
public java.lang.Object getPropertyValue(RepositoryItemImpl pItem, java.lang.Object pValue)
mItemListIdentifier
. Take this list and filter out the items
whose inventoryStatus does not match that of mInventoryStatus
. Return
the resulting items.
getPropertyValue
in class RepositoryPropertyDescriptor
pItem
- RepositoryItem representing an object that contains a list of RepositoryItemspValue
- not used
public java.lang.String getTypeName()
getTypeName
in class RepositoryPropertyDescriptor
public void setValue(java.lang.String pAttributeName, java.lang.Object pValue)
inventoryManagerPath
or
itemListIdentifier
and set the property.
setValue
in class RepositoryPropertyDescriptor
pAttributeName
- the name of the attribute to be setpValue
- the value of the attribute that should be setpublic boolean isQueryable()
isQueryable
in class RepositoryPropertyDescriptor
public boolean isWritable()
isWritable
in class DynamicPropertyDescriptor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |