-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
pipinet
committed
Dec 18, 2023
1 parent
7cdf744
commit f032606
Showing
25 changed files
with
165 additions
and
134 deletions.
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
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
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
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,23 @@ | ||
# This document is intended to establish the ranges for message IDs in the various sub-projects. | ||
|
||
# Range = owner | ||
000001-000999 = cdi | ||
001000-001999 = q-api | ||
002000-002999 = storage-api | ||
003000-003999 = feature-flags | ||
004000-004999 = | ||
005000-005999 = | ||
006000-006999 = | ||
007000-007999 = | ||
008000-008999 = | ||
009000-009999 = | ||
010000-010999 = | ||
011000-011999 = | ||
012000-012999 = | ||
013000-013999 = | ||
014000-014999 = | ||
015000-015999 = | ||
016000-016999 = | ||
017000-017999 = | ||
018000-018999 = | ||
019000-019999 = |
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,27 @@ | ||
package com.qwlabs.q; | ||
|
||
import com.qwlabs.exceptions.BadRequestException; | ||
import com.qwlabs.exceptions.CodeException; | ||
import jakarta.inject.Inject; | ||
import org.jboss.logging.annotations.Message; | ||
import org.jboss.logging.annotations.MessageBundle; | ||
|
||
import static org.jboss.logging.Messages.getBundle; | ||
|
||
|
||
@SuppressWarnings("checkstyle:MagicNumber") | ||
@MessageBundle(projectCode = "DORA") | ||
public interface Messages { | ||
int BASE = 1000; | ||
@Inject | ||
Messages INSTANCE = getBundle(Messages.class); | ||
|
||
@Message(id = BASE, value = "Invalid dialect: {0}", format = Message.Format.MESSAGE_FORMAT) | ||
CodeException invalidDialect(String dialect); | ||
|
||
@Message(id = BASE + 1, value = "Invalid query: {0}", format = Message.Format.MESSAGE_FORMAT) | ||
BadRequestException invalidQuery(String query); | ||
|
||
@Message(id = BASE + 2, value = "Q Engine not found", format = Message.Format.MESSAGE_FORMAT) | ||
CodeException engineNotFound(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package com.qwlabs.q.cdi; | ||
|
||
import com.qwlabs.cdi.SafeCDI; | ||
import com.qwlabs.q.Messages; | ||
import com.qwlabs.q.QEngine; | ||
import com.qwlabs.q.QMessages; | ||
|
||
import jakarta.enterprise.inject.Instance; | ||
|
||
public interface QEngineAware { | ||
default QEngine engine() { | ||
return SafeCDI.select(QEngine.class) | ||
.map(Instance::get) | ||
.orElseThrow(QMessages.INSTANCE::engineNotFound); | ||
.orElseThrow(Messages.INSTANCE::engineNotFound); | ||
} | ||
} |
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
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.