public void setDefinition ( PluginDefinition definition ) { if ( this . definition != null ) { if ( this . definition == definition ) { return ; } CWFException . raise ( "Cannot modify plugin definition." ) ; } this . definition = definition ; // Assign any default property values. if ( definition != null ) { for ( PropertyInfo propInfo : definition . getProperties ( ) ) { String dflt = propInfo . getDefault ( ) ; if ( dflt != null ) { try { propInfo . setPropertyValue ( this , dflt ) ; } catch ( Exception e ) { log . error ( "Error setting default value for property " + propInfo . getName ( ) , e ) ; } } } } }
Sets the plugin definition for this element .