|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.googlecode.fascinator.roles.internal.InternalRoles
public class InternalRoles
This plugin implements the Fascinator default internal roles.
Standard configuration table:
| Option | Description | Required | Default |
|---|---|---|---|
| internal/path | File path in wich the roles information is stored | Yes | ${user.home}/.fascinator/roles.properties |
"roles": {
"type": "internal",
"internal": {
"path": "${user.home}/.fascinator/roles.properties"
}
None
| Constructor Summary | |
|---|---|
InternalRoles()
|
|
| Method Summary | |
|---|---|
void |
createRole(String rolename)
Create a role. |
void |
deleteRole(String rolename)
Delete a role. |
String |
getId()
|
String |
getName()
|
PluginDescription |
getPluginDetails()
Gets a PluginDescription object relating to this plugin. |
String[] |
getRoles(String username)
Find and return all roles this user has. |
String[] |
getUsersInRole(String role)
Returns a list of users who have a particular role. |
void |
init(File jsonFile)
|
void |
init(String jsonString)
|
void |
removeRole(String username,
String oldrole)
Remove a role from a user. |
void |
renameRole(String oldrole,
String newrole)
Rename a role. |
String[] |
searchRoles(String search)
Returns a list of roles matching the search. |
void |
setConfig(JsonSimpleConfig config)
|
void |
setRole(String username,
String newrole)
Assign a role to a user. |
void |
shutdown()
|
boolean |
supportsRoleManagement()
Method for testing if the implementing plugin allows the creation, deletion and modification of roles. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InternalRoles()
| Method Detail |
|---|
public String getId()
getId in interface Pluginpublic String getName()
getName in interface Pluginpublic PluginDescription getPluginDetails()
getPluginDetails in interface Plugin
public void init(String jsonString)
throws RolesException
init in interface PluginRolesException
public void init(File jsonFile)
throws RolesException
init in interface PluginRolesException
public void setConfig(JsonSimpleConfig config)
throws IOException
IOException
public void shutdown()
throws RolesException
shutdown in interface PluginRolesExceptionpublic String[] getRoles(String username)
getRoles in interface Rolesusername - The username of the user.
public String[] getUsersInRole(String role)
getUsersInRole in interface Rolesrole - The role to search for.
public boolean supportsRoleManagement()
supportsRoleManagement in interface Roles
public void setRole(String username,
String newrole)
throws RolesException
setRole in interface Rolesusername - The username of the user.newrole - The new role to assign the user.
RolesException - if there was an error during assignment.
public void removeRole(String username,
String oldrole)
throws RolesException
removeRole in interface Rolesusername - The username of the user.oldrole - The role to remove from the user.
RolesException - if there was an error during removal.
public void createRole(String rolename)
throws RolesException
createRole in interface Rolesrolename - The name of the new role.
RolesException - if there was an error creating the role.
public void deleteRole(String rolename)
throws RolesException
deleteRole in interface Rolesrolename - The name of the role to delete.
RolesException - if there was an error during deletion.
public void renameRole(String oldrole,
String newrole)
throws RolesException
renameRole in interface Rolesoldrole - The name role currently has.newrole - The name role is changing to.
RolesException - if there was an error during rename.
public String[] searchRoles(String search)
throws RolesException
searchRoles in interface Rolessearch - The search string to execute.
RolesException - if there was an error searching.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||