1 <if condition="identityDocumentFile != null && identityDocumentFile.size > 0"> 2 <if condition="!identityLocation"> 3 <set field="filename" from="identityDocumentFile.getName()"/> 4 <set field="contentRoot" from="ec.user.getPreference('mantle.content.root') ?: 'dbresource://mantle/content'"/> 5 <set field="identityLocation" value="${contentRoot}/employment/${partyRelationshipId}/identity/${filename}"/> 6 </if> 7 <set field="docRr" from="ec.resource.getLocationReference(identityLocation)"/> 8 <script> 9 fileStream = identityDocumentFile.getInputStream() 10 try { docRr.putStream(fileStream) } finally { fileStream.close() } 11 </script> 12 </if> 13 <if condition="emplAuthzDocumentFile != null && emplAuthzDocumentFile.size > 0"> 14 <if condition="!emplAuthzLocation"> 15 <set field="filename" from="emplAuthzDocumentFile.getName()"/> 16 <set field="contentRoot" from="ec.user.getPreference('mantle.content.root') ?: 'dbresource://mantle/content'"/> 17 <set field="emplAuthzLocation" value="${contentRoot}/employment/${partyRelationshipId}/emplAuthz/${filename}"/> 18 </if> 19 <set field="docRr" from="ec.resource.getLocationReference(emplAuthzLocation)"/> 20 <script> 21 fileStream = emplAuthzDocumentFile.getInputStream() 22 try { docRr.putStream(fileStream) } finally { fileStream.close() } 23 </script> 24 </if>
1 <parameter name="identityDocumentFile" type="org.apache.commons.fileupload.FileItem"/> 2 <parameter name="emplAuthzDocumentFile" type="org.apache.commons.fileupload.FileItem"/>