public interface ISecurityCoreService extends ICoreService
Modifier and Type | Field and Description |
---|---|
static String |
FILE_EXTENSION_ACCESS |
static String |
FILE_EXTENSION_ROLES |
Modifier and Type | Method and Description |
---|---|
AccessDefinition |
createAccessDefinition(String location,
String uri,
String method,
String role,
String description)
Creates the access definition.
|
RoleDefinition |
createRole(String name,
String location,
String description)
Creates the role.
|
boolean |
existsAccessDefinition(String uri,
String method,
String role)
Exists access definition.
|
boolean |
existsRole(String name)
Exists role.
|
AccessDefinition |
getAccessDefinition(long id)
Gets the access definition.
|
AccessDefinition |
getAccessDefinition(String uri,
String method,
String role)
Gets the access definition.
|
List<AccessDefinition> |
getAccessDefinitions()
Gets the access definitions.
|
List<AccessDefinition> |
getAccessDefinitionsByUri(String uri)
Gets the access definitions by uri.
|
List<AccessDefinition> |
getAccessDefinitionsByUriAndMethod(String uri,
String method)
Gets the access definitions by uri and method.
|
RoleDefinition |
getRole(String name)
Gets the role.
|
List<RoleDefinition> |
getRoles()
Gets the roles.
|
boolean |
isAccessAllowed(String uri,
String method,
String role)
Checks if is access allowed.
|
List<AccessDefinition> |
parseAccessDefinitions(byte[] json)
Parses the access definitions.
|
List<AccessDefinition> |
parseAccessDefinitions(String json)
Parses the access definitions.
|
RoleDefinition[] |
parseRoles(byte[] json)
Parses the roles.
|
RoleDefinition[] |
parseRoles(String json)
Parses the roles.
|
void |
removeAccessDefinition(long id)
Removes the access definition.
|
void |
removeRole(String name)
Removes the role.
|
String |
serializeAccessDefinitions(List<AccessDefinition> accessDefinitions)
Serialize access definitions.
|
String |
serializeRoles(RoleDefinition[] roles)
Serialize roles.
|
void |
updateAccessDefinition(long id,
String location,
String uri,
String method,
String role,
String description)
Update access definition.
|
void |
updateRole(String name,
String location,
String description)
Update role.
|
static final String FILE_EXTENSION_ACCESS
static final String FILE_EXTENSION_ROLES
RoleDefinition createRole(String name, String location, String description) throws AccessException
name
- the namelocation
- the locationdescription
- the descriptionAccessException
- the access exceptionRoleDefinition getRole(String name) throws AccessException
name
- the nameAccessException
- the access exceptionboolean existsRole(String name) throws AccessException
name
- the nameAccessException
- the access exceptionvoid removeRole(String name) throws AccessException
name
- the nameAccessException
- the access exceptionvoid updateRole(String name, String location, String description) throws AccessException
name
- the namelocation
- the locationdescription
- the descriptionAccessException
- the access exceptionList<RoleDefinition> getRoles() throws AccessException
AccessException
- the access exceptionAccessDefinition createAccessDefinition(String location, String uri, String method, String role, String description) throws AccessException
location
- the locationuri
- the urimethod
- the methodrole
- the roledescription
- the descriptionAccessException
- the access exceptionAccessDefinition getAccessDefinition(long id) throws AccessException
id
- the idAccessException
- the access exceptionAccessDefinition getAccessDefinition(String uri, String method, String role) throws AccessException
uri
- the urimethod
- the methodrole
- the roleAccessException
- the access exceptionboolean existsAccessDefinition(String uri, String method, String role) throws AccessException
uri
- the urimethod
- the methodrole
- the roleAccessException
- the access exceptionvoid removeAccessDefinition(long id) throws AccessException
id
- the idAccessException
- the access exceptionvoid updateAccessDefinition(long id, String location, String uri, String method, String role, String description) throws AccessException
id
- the idlocation
- the locationuri
- the urimethod
- the methodrole
- the roledescription
- the descriptionAccessException
- the access exceptionList<AccessDefinition> getAccessDefinitions() throws AccessException
AccessException
- the access exceptionList<AccessDefinition> getAccessDefinitionsByUri(String uri) throws AccessException
uri
- the uriAccessException
- the access exceptionList<AccessDefinition> getAccessDefinitionsByUriAndMethod(String uri, String method) throws AccessException
uri
- the urimethod
- the methodAccessException
- the access exceptionboolean isAccessAllowed(String uri, String method, String role) throws AccessException
uri
- the urimethod
- the methodrole
- the roleAccessException
- the access exceptionRoleDefinition[] parseRoles(String json)
json
- the jsonRoleDefinition[] parseRoles(byte[] json)
json
- the jsonString serializeRoles(RoleDefinition[] roles)
roles
- the rolesList<AccessDefinition> parseAccessDefinitions(String json)
json
- the jsonList<AccessDefinition> parseAccessDefinitions(byte[] json)
json
- the jsonString serializeAccessDefinitions(List<AccessDefinition> accessDefinitions)
accessDefinitions
- the access definitionsCopyright © 2010–2017 Eclipse Foundation. All rights reserved.