com.iplanet.am.console.base.model
Class AMConsoleListenerAdapter

java.lang.Object
  |
  +--com.iplanet.am.console.base.model.AMConsoleListenerAdapter
All Implemented Interfaces:
AMConsoleListener

public class AMConsoleListenerAdapter
extends java.lang.Object
implements AMConsoleListener

AMConsoleListenerAdapter provides defaults implementation of methods in AMConsoleListener handlers.


Fields inherited from interface com.iplanet.am.console.base.model.AMConsoleListener
MODE_CREATION, MODE_GLOBAL_SERVICE, MODE_MODIFICATION
 
Constructor Summary
AMConsoleListenerAdapter()
           
 
Method Summary
 void onAfterCreateObject(AMModel model, AMObject object)
          This method is called after object is created.
 void onAfterDeleteObject(AMModel model, int objectType, java.lang.String locationDN)
          This method is called after an object is deleted.
 void onAfterUpdateDefaultServiceValues(AMModel model, java.lang.String name)
          This method is called after updating default attributes of a service.
 void onAfterUpdateValues(AMModel model, int objectType, AMObject object)
          This method is called after attributes of object is update.
 void onBeforeCreateObject(AMModel model, int objectType, AMObject container, java.lang.String name, java.util.Map attributeValues)
          This method is called before creating an object.
 void onBeforeDeleteObject(AMModel model, int objectType, java.lang.String locationDN)
          This method is called before deleting an object.
 boolean onBeforeDisplayModuleTab(AMModel model, java.lang.String moduleName)
          This method is called before displaying a module tab in the header view.
 void onBeforeUpdateDefaultServiceValues(AMModel model, java.lang.String name, java.util.Map attributeValues)
          This method is called before updating default attributes of a service.
 void onBeforeUpdateValues(AMModel model, int objectType, AMObject object, java.util.Map attributeValues)
          This method is called before updating attribute of an object.
 void onRetrieveAttributeValues(AMModel model, AMObject object, int action, int objectType, java.lang.String serviceName, SchemaType schemaType, java.util.Map attributeValues)
          This method is called after we have retrieve the values of attributes to be displayed in the creation/profile view.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AMConsoleListenerAdapter

public AMConsoleListenerAdapter()
Method Detail

onBeforeDisplayModuleTab

public boolean onBeforeDisplayModuleTab(AMModel model,
                                        java.lang.String moduleName)
This method is called before displaying a module tab in the header view. It allows you to programmatically hide the tab.
Specified by:
onBeforeDisplayModuleTab in interface AMConsoleListener
Parameters:
model - implementation class initiates this event.
moduleName - name of module.
Returns:
true to display this tab, false otherwises.

onBeforeCreateObject

public void onBeforeCreateObject(AMModel model,
                                 int objectType,
                                 AMObject container,
                                 java.lang.String name,
                                 java.util.Map attributeValues)
                          throws AMConsoleException
This method is called before creating an object. AttributeValues maps attribute name (String) to its values. Alter this map to have different values for the new object
Specified by:
onBeforeCreateObject in interface AMConsoleListener
Parameters:
model - implementation class initiates this event
objectType - type of object. (see com.iplanet.am.sdk.AMObject)
container - where object is to be created.
name - of new object.
attributeValues - maps name of attribute (String) to its values (Set).
Throws:
AMConsoleException - to stop the creation of object.

onAfterCreateObject

public void onAfterCreateObject(AMModel model,
                                AMObject object)
This method is called after object is created. This allows you to perform any operation on the object after it is created.
Specified by:
onAfterCreateObject in interface AMConsoleListener
Parameters:
model - implementation class initiates this event.
object - newly created object.

onBeforeDeleteObject

public void onBeforeDeleteObject(AMModel model,
                                 int objectType,
                                 java.lang.String locationDN)
                          throws AMConsoleException
This method is called before deleting an object. This allows you to block deletion of the object.
Specified by:
onBeforeDeleteObject in interface AMConsoleListener
Parameters:
model - implementation class initiates this event.
objectType - type of object. (see com.iplanet.am.sdk.AMObject)
locationDN - distinguished name of object to be deleted.
Throws:
AMConsoleException - not delete the object.

onAfterDeleteObject

public void onAfterDeleteObject(AMModel model,
                                int objectType,
                                java.lang.String locationDN)
This method is called after an object is deleted. This allows to perform any operation after an object is deleted.
Specified by:
onAfterDeleteObject in interface AMConsoleListener
Parameters:
model - implementation class initiates this event.
objectType - type of object. (see com.iplanet.am.sdk.AMObject)
locationDN - distinguished name of deleted object.

onBeforeUpdateValues

public void onBeforeUpdateValues(AMModel model,
                                 int objectType,
                                 AMObject object,
                                 java.util.Map attributeValues)
                          throws AMConsoleException
This method is called before updating attribute of an object. AttributeValues maps attribute name (String) to its values. This allows you to do validation of attribute values and to alter them accordingly or throw an exception to block the modification.
Specified by:
onBeforeUpdateValues in interface AMConsoleListener
Parameters:
model - implementation class initiates this event.
objectType - type of object. (see com.iplanet.am.sdk.AMObject)
object - of which attributes are to be updated.
attributeValues - maps name of attribute (String) to its values (Set)
Throws:
AMConsoleException - to stop modification of attributes.

onAfterUpdateValues

public void onAfterUpdateValues(AMModel model,
                                int objectType,
                                AMObject object)
This method is called after attributes of object is update. This allows you to perform any operations after object attributes are altered.
Specified by:
onAfterUpdateValues in interface AMConsoleListener
Parameters:
model - implementation class initiates this event.
objectType - - type of object. (see com.iplanet.am.sdk.AMObject)
object - updated object.

onBeforeUpdateDefaultServiceValues

public void onBeforeUpdateDefaultServiceValues(AMModel model,
                                               java.lang.String name,
                                               java.util.Map attributeValues)
                                        throws AMConsoleException
This method is called before updating default attributes of a service. AttributeValues maps attribute name (String) to its values.
Specified by:
onBeforeUpdateDefaultServiceValues in interface AMConsoleListener
Parameters:
model - implementation class initiates this event.
name - of service.
attributeValues - maps name of attribute (String) to its values (Set)
Throws:
AMConsoleException - will prevent updating of attributes.

onAfterUpdateDefaultServiceValues

public void onAfterUpdateDefaultServiceValues(AMModel model,
                                              java.lang.String name)
This method is called after updating default attributes of a service. AttributeValues maps attribute name (String) to its values.
Specified by:
onAfterUpdateDefaultServiceValues in interface AMConsoleListener
Parameters:
model - implementation class initiates this event.
name - of service.

onRetrieveAttributeValues

public void onRetrieveAttributeValues(AMModel model,
                                      AMObject object,
                                      int action,
                                      int objectType,
                                      java.lang.String serviceName,
                                      SchemaType schemaType,
                                      java.util.Map attributeValues)
This method is called after we have retrieve the values of attributes to be displayed in the creation/profile view. attributeValues maps name of attribute (String) to its values (Set). Alter this map to changes the values of attributes.
Specified by:
onRetrieveAttributeValues in interface AMConsoleListener
Parameters:
model - implementation class initiates this event.
object - of which attribute is retrieved. object is null when action equals MODE_CREATION, or retrieve value for global service.
action - either MODE_CREATION or MODE_MODIFICATION.
objectType - type of object. (see com.iplanet.am.sdk.AMObject)
serviceName - name of service.
schemaType - type of schema.
attributeValues - maps name of attribute (String) to its values (Set)