org.jboss.varia.property
Class PropertyEditorManagerService

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.varia.property.PropertyEditorManagerService
All Implemented Interfaces:
MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class PropertyEditorManagerService
extends ServiceMBeanSupport (src)

A service to access java.beans.PropertyEditorManager.


Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
PropertyEditorManagerService()
           
 
Method Summary
 java.beans.PropertyEditor findEditor(java.lang.Class type)
          Locate a value editor for a given target type.
 java.beans.PropertyEditor findEditor(java.lang.String typeName)
          Locate a value editor for a given target type.
 java.lang.String getEditorSearchPath()
          Gets the package names that will be searched for property editors.
protected  ObjectName (src) getObjectName(MBeanServer (src)  server, ObjectName (src)  name)
          Sub-classes should override this method if they only need to set their object name during MBean pre-registration.
 void registerEditor(java.lang.Class type, java.lang.Class editorType)
          Register an editor class to be used to editor values of a given target class.
 void registerEditor(java.lang.String typeName, java.lang.String editorTypeName)
          Register an editor class to be used to editor values of a given target class.
 void setBootstrapEditors(java.lang.String propsString)
          Load property editors based on the given properties string.
 void setEditors(java.util.Properties props)
          Set property editors based on the given properties map.
 void setEditorSearchPath(java.lang.String path)
          Sets the package names that will be searched for property editors.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, startService, stop, stopService
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyEditorManagerService

public PropertyEditorManagerService()
Method Detail

findEditor

public java.beans.PropertyEditor findEditor(java.lang.Class type)
Locate a value editor for a given target type.

Parameters:
type - The class of the object to be edited.
Returns:
An editor for the given type or null if none was found.

findEditor

public java.beans.PropertyEditor findEditor(java.lang.String typeName)
                                     throws java.lang.ClassNotFoundException
Locate a value editor for a given target type.

Parameters:
typeName - The class name of the object to be edited.
Returns:
An editor for the given type or null if none was found.
Throws:
java.lang.ClassNotFoundException

registerEditor

public void registerEditor(java.lang.Class type,
                           java.lang.Class editorType)
Register an editor class to be used to editor values of a given target class.

Parameters:
type - The class of the objetcs to be edited.
editorType - The class of the editor.

registerEditor

public void registerEditor(java.lang.String typeName,
                           java.lang.String editorTypeName)
                    throws java.lang.ClassNotFoundException
Register an editor class to be used to editor values of a given target class.

Parameters:
typeName - The classname of the objetcs to be edited.
editorTypeName - The class of the editor.
Throws:
java.lang.ClassNotFoundException

getEditorSearchPath

public java.lang.String getEditorSearchPath()
Gets the package names that will be searched for property editors.

Returns:
The package names that will be searched for property editors.

setEditorSearchPath

public void setEditorSearchPath(java.lang.String path)
Sets the package names that will be searched for property editors.

Parameters:
path - A comma sperated list of package names.

setBootstrapEditors

public void setBootstrapEditors(java.lang.String propsString)
                         throws java.lang.ClassNotFoundException,
                                java.io.IOException
Load property editors based on the given properties string.

Throws:
java.lang.ClassNotFoundException
java.io.IOException

setEditors

public void setEditors(java.util.Properties props)
                throws java.lang.ClassNotFoundException
Set property editors based on the given properties map.

Parameters:
props - Map of type name to editor type name.
Throws:
java.lang.ClassNotFoundException

getObjectName

protected ObjectName (src)  getObjectName(MBeanServer (src)  server,
                                   ObjectName (src)  name)
                            throws MalformedObjectNameException (src) 
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method if they only need to set their object name during MBean pre-registration.

Overrides:
getObjectName in class ServiceMBeanSupport (src)
Throws:
MalformedObjectNameException (src)