-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from nenadjakic/feature/delete_tasks_ex_handler…
…_refactoring_improvements Feature/delete tasks ex handler refactoring improvements
- Loading branch information
Showing
22 changed files
with
301 additions
and
119 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
src/main/kotlin/com/github/nenadjakic/ocr/studio/config/MessageConst.kt
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.github.nenadjakic.ocr.studio.config | ||
|
||
import com.github.nenadjakic.ocr.studio.entity.Status | ||
|
||
enum class MessageConst(val description: String) { | ||
ILLEGAL_STATUS("Cannot remove file for task, because status is different than ${Status.CREATED}."), | ||
MISSING_DOCUMENT("Cannot find task with specified id."); | ||
} |
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
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
7 changes: 4 additions & 3 deletions
7
src/main/kotlin/com/github/nenadjakic/ocr/studio/entity/Document.kt
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
package com.github.nenadjakic.ocr.studio.entity | ||
|
||
class Document { | ||
lateinit var originalFileName: String | ||
lateinit var randomizedFileName: String | ||
class Document( | ||
val originalFileName: String, | ||
val randomizedFileName: String | ||
) { | ||
var type: String? = null | ||
var outDocument: OutDocument? = null | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/kotlin/com/github/nenadjakic/ocr/studio/entity/DocumentMutableList.kt
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.github.nenadjakic.ocr.studio.entity | ||
|
||
class DocumentMutableList : ArrayList<Document>() { | ||
var mergedDocumentName: String? = null | ||
} |
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
14 changes: 4 additions & 10 deletions
14
src/main/kotlin/com/github/nenadjakic/ocr/studio/entity/OcrProgress.kt
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 |
---|---|---|
@@ -1,13 +1,7 @@ | ||
package com.github.nenadjakic.ocr.studio.entity | ||
|
||
class OcrProgress() { | ||
constructor(status: Status, progress: String, description: String?) : this() { | ||
this.status = status | ||
this.progress = progress | ||
this.description = description | ||
} | ||
|
||
var status: Status = Status.CREATED | ||
var progress: String = "N/A" | ||
class OcrProgress( | ||
var status: Status = Status.CREATED, | ||
var progress: String = "N/A", | ||
var description: String? = null | ||
} | ||
) |
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
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
6 changes: 5 additions & 1 deletion
6
src/main/kotlin/com/github/nenadjakic/ocr/studio/exception/OcrException.kt
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
package com.github.nenadjakic.ocr.studio.exception | ||
|
||
class OcrException(message: String) : Exception(message) | ||
open class OcrException(message: String) : Exception(message) | ||
|
||
class IllegalStateOcrException(message: String): OcrException(message) | ||
|
||
class MissingDocumentOcrException(message: String) : OcrException(message) |
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
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
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
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
3 changes: 0 additions & 3 deletions
3
src/main/kotlin/com/github/nenadjakic/ocr/studio/extension/MultipartFileExtension.kt
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.