@ Command ( name = "QueryWizardDevProperty" , inTypeDesc = "Class name" , outTypeDesc = "Device property list (name - description and default value)" ) public String [ ] queryDevProp ( final String className ) { xlogger . entry ( ) ; final List < String > names = new ArrayList < String > ( ) ; for ( final DeviceClassBuilder deviceClass : classList ) { if ( deviceClass . getClassName ( ) . equalsIgnoreCase ( className ) ) { final List < DeviceImpl > devices = deviceClass . getDeviceImplList ( ) ; if ( devices . size ( ) > 0 ) { final DeviceImpl dev = devices . get ( 0 ) ; final List < DevicePropertyImpl > props = dev . getDevicePropertyList ( ) ; for ( final DevicePropertyImpl prop : props ) { names . add ( prop . getName ( ) ) ; names . add ( prop . getDescription ( ) ) ; // default value if ( prop . getDefaultValue ( ) . length == 0 ) { names . add ( "" ) ; } else { names . add ( prop . getDefaultValue ( ) [ 0 ] ) ; } } } break ; } } xlogger . exit ( names ) ; return names . toArray ( new String [ names . size ( ) ] ) ; }
Get device properties