-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added logs per row and when creating siard
- Loading branch information
1 parent
a0b18eb
commit 13f6a5b
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,11 +16,14 @@ | |
import com.databasepreservation.common.server.storage.ContentPayload; | ||
import com.databasepreservation.common.server.storage.fs.FSPathContentPayload; | ||
import org.roda.core.data.exceptions.GenericException; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
/** | ||
* @author Gabriel Barros <[email protected]> | ||
*/ | ||
public class Browser { | ||
private static final Logger LOGGER = LoggerFactory.getLogger(Browser.class); | ||
public static void createFile(InputStream uploadedInputStream, String fileName, Path path) | ||
throws AlreadyExistsException, GenericException { | ||
try{ | ||
|
@@ -30,6 +33,7 @@ public static void createFile(InputStream uploadedInputStream, String fileName, | |
ContentPayload payload = new FSPathContentPayload(file); | ||
|
||
payload.writeToPath(path); | ||
LOGGER.info("Created file {} in {}", fileName, path); | ||
} catch (FileAlreadyExistsException e){ | ||
System.out.println("File exist on path: " + Paths.get(path.toString(), fileName)); | ||
throw new AlreadyExistsException(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -241,4 +241,4 @@ public void createRowsCollection() { | |
} | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters