| .. | .. |
|---|
| 6 | 6 | import java.net.URL; |
|---|
| 7 | 7 | |
|---|
| 8 | 8 | import org.apache.commons.io.FileUtils; |
|---|
| 9 | +import org.apache.logging.log4j.util.Strings; |
|---|
| 9 | 10 | import org.slf4j.Logger; |
|---|
| 10 | 11 | import org.slf4j.LoggerFactory; |
|---|
| 11 | 12 | import org.springframework.beans.factory.annotation.Autowired; |
|---|
| .. | .. |
|---|
| 29 | 30 | uriBuilder.path("/downloadFile"); |
|---|
| 30 | 31 | uriBuilder.queryParam("fileName", regDocument.getFileName()); |
|---|
| 31 | 32 | uriBuilder.queryParam("id", regDocument.getDocumentId()); |
|---|
| 33 | + if ( Strings.isEmpty(regDocument.getSecretKey()) == false ) { |
|---|
| 34 | + uriBuilder.queryParam("secretKey", regDocument.getSecretKey()); |
|---|
| 35 | + } |
|---|
| 32 | 36 | return uriBuilder.build().toURL(); |
|---|
| 33 | 37 | } |
|---|
| 34 | 38 | |
|---|