com.iplanet.am.console.base.model
Interface AMConsoleListener

All Known Implementing Classes:
AMConsoleListenerAdapter

public interface AMConsoleListener

AMConsoleListener defines a set of Console model event handlers.

Registration of this listener can be done through Administration Console by adding the class name to the Console Event Listener list.

Listener shall receive the following events.

The above mentioned Access Manager object refers to Organization, Container, Group, Group Container, User, People Container, Role, and Service Template.


Field Summary
static int MODE_CREATION
          Creation Mode
static int MODE_GLOBAL_SERVICE
          Global Service Modification Mode
static int MODE_MODIFICATION
          Modification Mode
 
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 updated.
 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.
 

Field Detail

MODE_CREATION

public static final int MODE_CREATION
Creation Mode

See Also:
Constant Field Values

MODE_MODIFICATION

public static final int MODE_MODIFICATION
Modification Mode

See Also:
Constant Field Values

MODE_GLOBAL_SERVICE

public static final int MODE_GLOBAL_SERVICE
Global Service Modification Mode

See Also:
Constant Field Values
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.

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

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.

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.

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 - to 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.

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.

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 updated. This allows you to perform any operations after object attributes are altered.

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.

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

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.

Parameters:
model - implementation class initiates this event.
object - of which attribute values are retrieved. object is null if action equals MODE_CREATION, or retrieve value for global service.
action - either MODE_CREATION, MODE_MODIFICATION or MODEL_GLOBAL_SERVICE
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)


Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.