private List < ValueData > parseValues ( ) throws RepositoryException { List < ValueData > values = new ArrayList < ValueData > ( propertyInfo . getValuesSize ( ) ) ; List < String > stringValues = new ArrayList < String > ( ) ; for ( int k = 0 ; k < propertyInfo . getValuesSize ( ) ; k ++ ) { if ( propertyInfo . getType ( ) == PropertyType . BINARY ) { try { InputStream vStream = propertyInfo . getValues ( ) . get ( k ) . getInputStream ( ) ; TransientValueData binaryValue = new TransientValueData ( k , vStream , null , valueFactory . getSpoolConfig ( ) ) ; // Call to spool file into tmp binaryValue . getAsStream ( ) . close ( ) ; vStream . close ( ) ; propertyInfo . getValues ( ) . get ( k ) . remove ( ) ; values . add ( binaryValue ) ; } catch ( IOException e ) { throw new RepositoryException ( e ) ; } } else { String val = new String ( propertyInfo . getValues ( ) . get ( k ) . toString ( ) ) ; stringValues . add ( val ) ; values . add ( ( ( BaseValue ) valueFactory . createValue ( val , propertyInfo . getType ( ) ) ) . getInternalData ( ) ) ; } } if ( propertyInfo . getType ( ) == ExtendedPropertyType . PERMISSION ) { ImportNodeData currentNodeInfo = ( ImportNodeData ) getParent ( ) ; currentNodeInfo . setExoPrivileges ( stringValues ) ; } else if ( Constants . EXO_OWNER . equals ( propertyInfo . getName ( ) ) ) { ImportNodeData currentNodeInfo = ( ImportNodeData ) getParent ( ) ; currentNodeInfo . setExoOwner ( stringValues . get ( 0 ) ) ; } return values ; }
Returns the list of ValueData for current property