Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dwh-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AKTIN
dwh-api
Commits
d35accb8
Commit
d35accb8
authored
Apr 14, 2016
by
rwm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
preferences interface added
parent
67596605
Pipeline
#426
skipped
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
113 additions
and
0 deletions
+113
-0
src/main/java/org/aktin/dwh/PreferenceKeys.java
src/main/java/org/aktin/dwh/PreferenceKeys.java
+40
-0
src/main/java/org/aktin/prefs/Preference.java
src/main/java/org/aktin/prefs/Preference.java
+45
-0
src/main/java/org/aktin/prefs/Preferences.java
src/main/java/org/aktin/prefs/Preferences.java
+28
-0
No files found.
src/main/java/org/aktin/dwh/PreferenceKeys.java
0 → 100644
View file @
d35accb8
package
org.aktin.dwh
;
/**
* Preferences keys for the data warehouse
*
* @author R.W.Majeed
*
*/
public
class
PreferenceKeys
{
public
static
final
String
TLS_KEYSTORE_PATH
=
"tls.keystore.path"
;
/*
local.name (W) local name for this site/clinic,
local.contact.name (W)
local.contact.email (W)
i2b2.project (R) i2b2 project id "Demo"
i2b2.crc.ds (R) i2b2 jndi datasource "java:/QueryToolDemoDS"
i2b2.lastimport (R) timestamp of last import
smtp.server (W)
smtp.port (W)
smtp.user (W)
smtp.password (WO)
smtp.auth (W) [plain|ssl|...]
query.notification.email (W) list of email addresses to receive notifications for queries
query.result.dir (R)
exchange.lastcontact (R) timestamp of last contact to broker via direct connection or received email timestamp
exchange.method (W) https|email
exchange.https.interval (W) interval in hours between polling connections to broker
exchange.https.broker (W) server name of the AKTIN broker
exchange.https.pool (W) server name of AKTIN pool
exchange.inbox.address (W) email address to receive queries
exchange.inbox.interval (W) interval in hours between checking for new emails
exchange.inbox.server (W) server configuration to check for query emails
exchange.inbox.port (W)
exchange.inbox.protocol (W) [imap|pop3]
exchange.inbox.user (W)
exchange.inbox.password (WO) */
}
src/main/java/org/aktin/prefs/Preference.java
0 → 100644
View file @
d35accb8
package
org.aktin.prefs
;
/**
* All preferences can be read/written by the API (system).
* Some preferences might be readable/writable publicly
* e.g. by an authenticated user.
*
* @author R.W.Majeed
*
* @param <T> value type
*/
public
interface
Preference
<
T
>
{
Preferences
getPreferences
();
/**
* Get the preference value data type
* @return data type for the value
*/
Class
<
T
>
getType
();
/**
* Get the preference value
* @return value
*/
T
getValue
();
/**
* Get the preference name / key
* @return key name
*/
String
getKey
();
boolean
isPublicWritable
();
boolean
isPublicReadable
();
/**
* Perform a public update by user
* @param user user name
* @param value value
*/
public
void
setValue
(
String
user
,
T
value
);
/**
* Set the value by the system user
* @param value value
*/
public
void
setValue
(
T
value
);
}
src/main/java/org/aktin/prefs/Preferences.java
0 → 100644
View file @
d35accb8
package
org.aktin.prefs
;
import
java.io.IOException
;
/**
* API for AKTIN preferences.
* <p>
* To access preferences, use a CDI injection
* in your class (e.g with {@code javax.inject.Inject}
* annotation.
*
* @author R.W.Majeed
*
*/
public
interface
Preferences
{
public
String
getString
(
String
key
);
public
Integer
getInteger
(
String
key
);
public
void
putString
(
String
key
,
String
value
);
public
void
putInteger
(
String
key
,
Integer
value
);
public
Preference
<?>
get
(
String
key
);
/**
* Write the changed preferences to the underlying
* storage (e.g. database)
* @throws IOException flush error
*/
public
void
flush
()
throws
IOException
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment