All Packages Class Hierarchy This Package Previous Next Index
Interface com.sgi.sysadm.ui.ProductAttributeSetter
- public interface ProductAttributeSetter
An interface for classes that can set Product Attributes.
Product Attributes are pieces of TaskData that are applicable to
many of the Tasks in a particular product. A Task can request that
Product Attributes for its product be loaded by using the
PRODUCT_ATTRIBUTES property. The HostContext will then instantiate
the ProductAttributeSetter that has been specifed with the SETTER
property.
After instantiating the ProductAttributeSetter, HostContext calls
the initializeProductAttributeSetter. HostContext then calls
setProductAttributes. setProductAttributes can
be called multiple times, because it is possible for HostContext to
want to refresh the Product Attributes.
- See Also:
- PRODUCT_ATTRIBUTES, SETTER
-
initializeProductAttributeSetter(HostContext, UIContext)
- Initializes the setter.
-
setProductAttributes(Object, ResultListener)
- Sets the Product Attributes.
initializeProductAttributeSetter
public abstract void initializeProductAttributeSetter(HostContext hostContext,
UIContext uic)
- Initializes the setter. The object need not take any action,
but can perform any setup here. It's also a good idea to save
the parameters passed in here for later use.
- Parameters:
- hostContext - the HostContext to call setProductAttributes() on
- uic - The UIContext to use for showing any UI
setProductAttributes
public abstract void setProductAttributes(Object context,
ResultListener listener)
- Sets the Product Attributes. The object should do whatever is
necessary to obtain the Product Attributes (which may involve
calls to the server, showing UI's, etc). When the Product Attributes
are known, this method should call the
setProductAttribute method on HostContext for each
attribute. When done
setting the Product Attributes, this method must call the
success method of listener to notify HostContext that
it should proceed. If there was some reason that the Product
Attributes could not be set, then this method should call the
failed method of listener with the reason set
appropriately.
While Tasks are one consumer of Product Attributes, any code can
make a request to HostContext that Product Attributes be loaded. It
may be desireable in these cases to control how the attributes
are collected. For that reason, a context object is passed.
This is the same context that is passed to
HostContext's getProductAttribute or
getProductAttributes method. It is up to the
implementor to decide on what context should
represent. If setProductAttributes is called in
response to a Task being loaded by a TaskLoader, then the
context will be null
- Parameters:
- context - An Object that can be used to control the setter.
- listener - The listener to notify when all of the product
Attributes have been set.
- See Also:
- setProductAttribute, getProductAttribute, getProductAttributes
All Packages Class Hierarchy This Package Previous Next Index