Interface DataStoreContext
-
public interface DataStoreContext
Access to internals exposed for data store use only.- Since:
- 2.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description ExecutorasyncExecutor()Access the engine's async executor that can be used to schedule tasksPathbaseDirectory()Get the base data directory where the engine will store data and configuration.DataSourcedataSourceForUrl(String url)Deprecated.need to find a better place to put thisSubjectRef<?>deserializeSubjectRef(String type, String identifier)Deserialize a subject reference given a type and identifier.default SubjectRef<?>deserializeSubjectRef(Map.Entry<String,String> pair)Deserialize a subject reference given a type and identifier.PermissionsEngineengine()Get the permissions engine this context is attached to.SubjectRef<?>lazySubjectRef(String type, String identifier)Create a subject ref that will only be resolved once data is queried.FormattedLoggerlogger()A logger for logging any necessary messages.
-
-
-
Method Detail
-
engine
PermissionsEngine engine()
Get the permissions engine this context is attached to.- Returns:
- the engine
-
logger
FormattedLogger logger()
A logger for logging any necessary messages.- Returns:
- the logger
-
baseDirectory
Path baseDirectory()
Get the base data directory where the engine will store data and configuration.- Returns:
- the base data directory
- Since:
- 2.0.0
-
asyncExecutor
Executor asyncExecutor()
Access the engine's async executor that can be used to schedule tasks- Returns:
- the executor
- Since:
- 2.0.0
-
deserializeSubjectRef
default SubjectRef<?> deserializeSubjectRef(Map.Entry<String,String> pair)
Deserialize a subject reference given a type and identifier.- Parameters:
pair- the subject type to identifier pair- Returns:
- a resolved subject ref
-
deserializeSubjectRef
SubjectRef<?> deserializeSubjectRef(String type, String identifier)
Deserialize a subject reference given a type and identifier.- Parameters:
type- the subject typeidentifier- the subject identifier- Returns:
- a resolved subject ref
-
lazySubjectRef
SubjectRef<?> lazySubjectRef(String type, String identifier)
Create a subject ref that will only be resolved once data is queried.- Parameters:
type- the subject typeidentifier- the identifier- Returns:
- a lazy subject reference
-
dataSourceForUrl
@Deprecated DataSource dataSourceForUrl(String url) throws SQLException
Deprecated.need to find a better place to put thisTemporary -- create a pooled SQL datasource for a certain URL.- Parameters:
url- the URL to query- Returns:
- a valid data source
- Throws:
SQLException- if the connection is invalid- Since:
- 2.0.0
-
-