public class DerbyAccessControl extends Object implements AccessControl
This plugin is a Fascinator access control plugin using Derby database
Standard configuration table:
| Option | Description | Required | Default |
|---|---|---|---|
| derbyHome | Path in which derby database will be created and used | Yes | ${fascinator.home}/database |
"accesscontrol": {
"type" : "derby",
"derby" : {
"derbyHome" : "${fascinator.home}/database"
}
}
None
| Constructor and Description |
|---|
DerbyAccessControl() |
| Modifier and Type | Method and Description |
|---|---|
void |
applySchema(AccessControlSchema newSecurity)
Apply/store a new security implementation.
|
AccessControlSchema |
getEmptySchema()
Return an empty security schema for the portal to investigate and/or
populate.
|
String |
getId()
Gets an identifier for this type of plugin.
|
String |
getName()
Gets a name for this plugin.
|
PluginDescription |
getPluginDetails()
Gets a PluginDescription object relating to this plugin.
|
List<String> |
getPossibilities(String field)
Retrieve a list of possible field values for a given field if the plugin
supports this feature.
|
List<String> |
getRoles(String recordId)
A basic wrapper for getSchemas() to return just the roles of the schemas.
|
List<AccessControlSchema> |
getSchemas(String recordId)
Get a list of schemas that have been applied to a record.
|
List<String> |
getUsers(String recordId) |
void |
init(File jsonFile)
Initializes the plugin using the specified JSON configuration
|
void |
init(String jsonString)
Initializes the plugin using the specified JSON String
|
void |
removeSchema(AccessControlSchema oldSecurity)
Remove a security implementation.
|
void |
shutdown()
Shuts down the plugin
|
public String getId()
public String getName()
public PluginDescription getPluginDetails()
getPluginDetails in interface Pluginpublic void init(String jsonString) throws AccessControlException
init in interface PluginjsonString - JSON configuration stringPluginException - if there was an error in initializationAccessControlExceptionpublic void init(File jsonFile) throws AccessControlException
init in interface PluginjsonFile - JSON configuration fileAccessControlException - if there was an error in initializationpublic void shutdown()
throws AccessControlException
shutdown in interface PluginAccessControlException - if there was an error during shutdownpublic AccessControlSchema getEmptySchema()
getEmptySchema in interface AccessControlpublic List<AccessControlSchema> getSchemas(String recordId) throws AccessControlException
getSchemas in interface AccessControlrecordId - The record to retrieve information about.AccessControlException - if there was an error during retrieval.public void applySchema(AccessControlSchema newSecurity) throws AccessControlException
applySchema in interface AccessControlnewSecurity - The new schema to apply.AccessControlException - if storage of the schema fails.public void removeSchema(AccessControlSchema oldSecurity) throws AccessControlException
removeSchema in interface AccessControloldSecurity - The schema to remove.AccessControlException - if removal of the schema fails.public List<String> getUsers(String recordId) throws AccessControlException
getUsers in interface AccessControlAccessControlExceptionpublic List<String> getRoles(String recordId) throws AccessControlException
getRoles in interface AccessControlrecordId - The record to retrieve roles for.AccessControlException - if there was an error during retrieval.public List<String> getPossibilities(String field) throws AccessControlException
getPossibilities in interface AccessControlfield - The field name.AccessControlException - if the field doesn't exist or there was an error during
retrievalCopyright © 2009-2013. All Rights Reserved.