com.novell.emframe.dev
Class VetoRename

java.lang.Object
  extended bycom.novell.emframe.dev.Plugin
      extended bycom.novell.emframe.dev.Rename
          extended bycom.novell.emframe.dev.VetoRename

public class VetoRename
extends Rename

Generic Rename that will Veto any rename operation. If your custom Rename decides it needs to Veto the rename, extended the VetoRename class and overwrite the doRename method. Then in your doRename method when you determine you need to Veto the rename, simply call the parent.doRename to Veto the rename. You must also register as an object renamer in your XML descriptor under the <object-rename> element.


Field Summary
protected  java.lang.String m_header
          Header of the message.
protected  java.lang.String m_msg
          Body of rename message to display.
protected  ObjectEntry m_newOE
          ObjectEntry of the new object.
protected  java.lang.String m_objectName
          Full DN of the object to be renamed.
 
Constructor Summary
VetoRename()
           
 
Method Summary
 void doRename(ObjectEntry srcOE, java.lang.String newObjName, TaskContext context)
          Called for this renamer to rename the object.
 ObjectEntry getNewObjectEntry()
          Returns the new ObjectEntry containing the destination object.
 
Methods inherited from class com.novell.emframe.dev.Rename
getObjectName
 
Methods inherited from class com.novell.emframe.dev.Plugin
init, isPluginAvailable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_header

protected java.lang.String m_header
Header of the message.


m_msg

protected java.lang.String m_msg
Body of rename message to display.


m_newOE

protected ObjectEntry m_newOE
ObjectEntry of the new object.


m_objectName

protected java.lang.String m_objectName
Full DN of the object to be renamed.

Constructor Detail

VetoRename

public VetoRename()
Method Detail

doRename

public void doRename(ObjectEntry srcOE,
                     java.lang.String newObjName,
                     TaskContext context)
              throws PluginException
Called for this renamer to rename the object. This method will always throw a PluginException.

Overrides:
doRename in class Rename
Parameters:
srcOE - ObjectEntry containing the original object to be renamed
newObjName - ObjectEntry containing the destination object
context - TaskContext of the plug-in
Throws:
PluginException - if the rename failed or should be Vetoed

getNewObjectEntry

public ObjectEntry getNewObjectEntry()
Returns the new ObjectEntry containing the destination object.

Overrides:
getNewObjectEntry in class Rename
Returns:
ObjectEntry containing the destination object


API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated September 2 2004 0111.