Package lumis.portal.serviceinstance.acl
Interface IServiceInstanceAclManager
-
- All Superinterfaces:
IAclManager
,IConfigKeyChecker
- All Known Implementing Classes:
ServiceInstanceAclManager
@StableMinor(version="15.0", sinceVersion="4.0") public interface IServiceInstanceAclManager extends IAclManager
Public Interface to Service Instance ACL Management- Since:
- 4.0.0
- Version:
- $Revision: 25303 $ $Date: 2022-10-22 22:48:02 -0300 (Sat, 22 Oct 2022) $
-
-
Field Summary
Fields Modifier and Type Field Description static int
PERMISSION_DEFAULT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
add(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction)
Add an Access Control List to the Service Instance.void
checkRequiredPermissions(AccessControlList acl)
Checks if the required permissions were given for someone.boolean
checkServiceInstancePermission(SessionConfig sessionConfig, java.lang.String userId, java.lang.String serviceInstanceId, java.lang.String permissionId, ITransaction transaction)
Checks if an user has a permission on a service instance.boolean
checkServiceInstancePermission(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.String permissionId, ITransaction transaction)
Checks if an user has a permission on a service instance.void
clearCache(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction)
Reloads the ACL associated with the given serviceInstanceId.AccessControlList
get(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction)
Get the Service Instance's Access Control List.ServiceInstancePermissions
getPermissions(SessionConfig sessionConfig, java.lang.String serviceId, ITransaction transaction)
void
update(SessionConfig sessionConfig, java.lang.String serviceInstanceId, AccessControlList acl, ITransaction transaction)
Update the Service Instance's ACL.-
Methods inherited from interface lumis.util.security.acl.IAclManager
add, addOrUpdate, checkPermission, checkPermission, clearCache, delete, deleteAclEntryByPrincipalId, deserialize, exists, removeFromCache, serialize
-
Methods inherited from interface lumis.portal.serialization.operation.IConfigKeyChecker
keyExists
-
-
-
-
Field Detail
-
PERMISSION_DEFAULT
static final int PERMISSION_DEFAULT
- See Also:
- Constant Field Values
-
-
Method Detail
-
add
java.lang.String add(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction) throws ManagerException, PortalException
Add an Access Control List to the Service Instance. To access this method, the user needs the PERMISSION_TYPE_MANAGE_SERVICE_INSTANCE_SECURITY permission in the service instance.- Parameters:
sessionConfig
-serviceInstanceConfig
-transaction
-- Returns:
- String: New ACL Id
- Throws:
ManagerException
PortalException
-
get
AccessControlList get(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Get the Service Instance's Access Control List. To access this method, the user needs the PERMISSION_TYPE_MANAGE_SERVICE_INSTANCE_SECURITY permission in the service instance.- Parameters:
sessionConfig
-serviceInstanceId
-transaction
-- Returns:
- Returns the AccessControlList.
- Throws:
ManagerException
PortalException
-
update
void update(SessionConfig sessionConfig, java.lang.String serviceInstanceId, AccessControlList acl, ITransaction transaction) throws ManagerException, PortalException
Update the Service Instance's ACL. To access this method, the user needs the PERMISSION_TYPE_MANAGE_SERVICE_INSTANCE_SECURITY permission in the service instance.- Parameters:
sessionConfig
-serviceInstanceId
-acl
-transaction
-- Throws:
ManagerException
PortalException
-
clearCache
void clearCache(SessionConfig sessionConfig, java.lang.String serviceInstanceId, ITransaction transaction) throws ManagerException, PortalException
Reloads the ACL associated with the given serviceInstanceId.- Parameters:
sessionConfig
-serviceInstanceId
-acl
-transaction
-- Throws:
ManagerException
PortalException
-
getPermissions
ServiceInstancePermissions getPermissions(SessionConfig sessionConfig, java.lang.String serviceId, ITransaction transaction) throws ManagerException, PortalException
- Parameters:
sessionConfig
-serviceId
-transaction
-- Returns:
- Returns the ServiceInstancePermissions.
- Throws:
ManagerException
PortalException
-
checkRequiredPermissions
void checkRequiredPermissions(AccessControlList acl) throws PortalException
Checks if the required permissions were given for someone. If not an exception is thrown.- Parameters:
acl
- the acl to be checked.- Throws:
PortalException
- if the required permissions were not given.
-
checkServiceInstancePermission
boolean checkServiceInstancePermission(SessionConfig sessionConfig, java.lang.String serviceInstanceId, java.lang.String permissionId, ITransaction transaction) throws PortalException
Checks if an user has a permission on a service instance.This method is a shortcut for
IAclManager.checkPermission(SessionConfig, String, IPermission, ITransaction)
that obtains theIPermission
object from the service instance permissions.- Parameters:
sessionConfig
- the current user session information.serviceInstanceId
- the service instance identifier.permissionId
- the permission identifier. May be either one of the standard permissions or a custom permission defined in the service instance's service.transaction
- the transaction for persistence access.- Returns:
true
if the user has the permission,false
otherwise.- Throws:
PortalObjectNotFoundException
- if the service instance or the permission was not found.PortalException
- See Also:
ServiceInstancePermissions.PERMISSION_ID_MANAGE_SERVICE_INSTANCE_SECURITY
,ServiceInstancePermissions.PERMISSION_ID_MANAGE_SERVICE_INSTANCE
,ServiceInstancePermissions.PERMISSION_ID_EDIT_SERVICE_INSTANCE_CONTENT
,ServiceInstancePermissions.PERMISSION_ID_VIEW_SERVICE_INSTANCE
-
checkServiceInstancePermission
boolean checkServiceInstancePermission(SessionConfig sessionConfig, java.lang.String userId, java.lang.String serviceInstanceId, java.lang.String permissionId, ITransaction transaction) throws PortalException
Checks if an user has a permission on a service instance.This method is a shortcut for
IAclManager.checkPermission(SessionConfig, String, String, IPermission, ITransaction)
that obtains theIPermission
object from the service instance permissions.- Parameters:
sessionConfig
- the current user session information.userId
- the identifier of the user to check for permission.serviceInstanceId
- the service instance identifier.permissionId
- the permission identifier. May be either one of the standard permissions or a custom permission defined in the service instance's service.transaction
- the transaction for persistence access.- Returns:
true
if the user has the permission,false
otherwise.- Throws:
PortalObjectNotFoundException
- if the service instance or the permission was not found.PortalException
- See Also:
ServiceInstancePermissions.PERMISSION_ID_MANAGE_SERVICE_INSTANCE_SECURITY
,ServiceInstancePermissions.PERMISSION_ID_MANAGE_SERVICE_INSTANCE
,ServiceInstancePermissions.PERMISSION_ID_EDIT_SERVICE_INSTANCE_CONTENT
,ServiceInstancePermissions.PERMISSION_ID_VIEW_SERVICE_INSTANCE
-
-