Package com.fluig.sdk.service
Interface SecurityService
-
- All Superinterfaces:
BaseAPIService
public interface SecurityService extends BaseAPIService
Fornece acesso aos serviços de segurança.- Since:
- 1.5
- Author:
- vanei
-
-
Field Summary
Fields Modifier and Type Field Description static StringJNDI_NAMEstatic StringJNDI_REMOTE_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidchangeUserPassword(String login, String currentPassword, String newPassword, String confirmNewPassword)Change user passwordBooleancreateOrUpdateTenantData(String key, String value)Cria um bjeto chave/valor no tenantDatavoidcreatePermissions(String resourceCode, List<PermissionVO> permissions)Cria as permissões para um determinado recursovoiddeletePermissions(String resourceCode, List<PermissionVO> permissions)Deleta as permissões para um determinado recursoGroupVOfindGroupByTenantIdAndCode(Long tenantId, String code)Retorna o grupo por code e tenantList<TenantVO>findTenants()Retorna a lista de tentants.TenantVOgetCurrentTenant()Get the current tenantTenantVOgetCurrentTenantById(Long tenantId)Get the current tenantLonggetCurrentTenantId()Retorna o tenantId logadoList<PermissionVO>getPermissionsByResourceCode(String resourceCode)Lista as permissões do recurso informadoStringgetTimeZoneLocalUser(long companyId, String userCode)BooleanhasPermission(String resource, String permiss)Verifica se o usuário logado possui certa permissão no recurso dado.List<PermissionAssetVO>listResourcesByCategory(String category, String filter, int offset, int limit)Lista os recursos da categoria informadaList<AdminUserVO>listTenantAdmins(Long tenantId)Retorna os admins de um tenant-
Methods inherited from interface com.fluig.sdk.service.BaseAPIService
expand, generateOrderParam
-
-
-
-
Field Detail
-
JNDI_NAME
static final String JNDI_NAME
- See Also:
- Constant Field Values
-
JNDI_REMOTE_NAME
static final String JNDI_REMOTE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
hasPermission
Boolean hasPermission(String resource, String permiss) throws com.fluig.sdk.api.common.SDKException
Verifica se o usuário logado possui certa permissão no recurso dado.- Parameters:
resource- Código do recurso.permiss- Código da permissão.- Returns:
- true se o usuário tiver persmissão, false caso contrário.
- Throws:
com.fluig.sdk.api.common.SDKException- Since:
- 1.5
-
listResourcesByCategory
List<PermissionAssetVO> listResourcesByCategory(String category, String filter, int offset, int limit) throws com.fluig.sdk.api.common.SDKException
Lista os recursos da categoria informada- Parameters:
category- - Categoria do recursofilter- - filtro para pesquisaoffset- - offset da pesquisalimit- - limite da pesquisa- Returns:
- Lista com os recursos.
- Throws:
com.fluig.sdk.api.common.SDKException
-
getPermissionsByResourceCode
List<PermissionVO> getPermissionsByResourceCode(String resourceCode) throws com.fluig.sdk.api.common.SDKException
Lista as permissões do recurso informado- Parameters:
resourceCode- - Código do recurso- Returns:
- Lista com as permissões
- Throws:
com.fluig.sdk.api.common.SDKException
-
createPermissions
void createPermissions(String resourceCode, List<PermissionVO> permissions) throws com.fluig.sdk.api.common.SDKException
Cria as permissões para um determinado recurso- Parameters:
resourceCode- - Código do recursopermissions- - lista de permissões a serem criadas para o recurso- Throws:
com.fluig.sdk.api.common.SDKException
-
deletePermissions
void deletePermissions(String resourceCode, List<PermissionVO> permissions) throws com.fluig.sdk.api.common.SDKException
Deleta as permissões para um determinado recurso- Parameters:
resourceCode- - Código do recursopermissions- - lista de permissões a serem criadas para o recurso- Throws:
com.fluig.sdk.api.common.SDKException
-
findTenants
List<TenantVO> findTenants() throws com.fluig.sdk.api.common.SDKException
Retorna a lista de tentants.- Throws:
com.fluig.sdk.api.common.SDKException
-
getCurrentTenantId
Long getCurrentTenantId() throws com.fluig.sdk.api.common.SDKException
Retorna o tenantId logado- Returns:
- current tenantId
- Throws:
com.fluig.sdk.api.common.SDKException
-
findGroupByTenantIdAndCode
GroupVO findGroupByTenantIdAndCode(Long tenantId, String code) throws com.fluig.sdk.api.common.SDKException
Retorna o grupo por code e tenant- Parameters:
tenantId-code-- Returns:
- Throws:
com.fluig.sdk.api.common.SDKException
-
createOrUpdateTenantData
Boolean createOrUpdateTenantData(String key, String value) throws com.fluig.sdk.api.common.SDKException
Cria um bjeto chave/valor no tenantData- Parameters:
key-value-- Returns:
- If tenant data was updated
- Throws:
com.fluig.sdk.api.common.SDKException
-
listTenantAdmins
List<AdminUserVO> listTenantAdmins(Long tenantId) throws com.fluig.sdk.api.common.SDKException
Retorna os admins de um tenant- Parameters:
tenantId-- Returns:
- List of tenant admin
- Throws:
com.fluig.sdk.api.common.SDKException
-
changeUserPassword
void changeUserPassword(String login, String currentPassword, String newPassword, String confirmNewPassword) throws com.fluig.sdk.api.common.SDKException
Change user password- Parameters:
login-currentPassword-newPassword-- Throws:
com.fluig.sdk.api.common.SDKException
-
getCurrentTenant
TenantVO getCurrentTenant() throws com.fluig.sdk.api.common.SDKException
Get the current tenant- Returns:
- Tenant data
- Throws:
com.fluig.sdk.api.common.SDKException
-
getCurrentTenantById
TenantVO getCurrentTenantById(Long tenantId) throws com.fluig.sdk.api.common.SDKException
Get the current tenant- Returns:
- Tenant data
- Throws:
com.fluig.sdk.api.common.SDKException
-
-