public class ServiceInstanceAclManager extends AclManager implements IServiceInstanceAclManager
aclCache, checkRequiredPermissionsInternalFlag
PERMISSION_DEFAULT
Constructor and Description |
---|
ServiceInstanceAclManager() |
Modifier and Type | Method and Description |
---|---|
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,
String serviceInstanceId,
String permissionId,
ITransaction transaction)
Checks if an user has a permission on a service instance.
|
boolean |
checkServiceInstancePermission(SessionConfig sessionConfig,
String userId,
String serviceInstanceId,
String permissionId,
ITransaction transaction)
Checks if an user has a permission on a service instance.
|
void |
clearCache(SessionConfig sessionConfig,
String serviceInstanceId,
ITransaction transaction)
Reloads the ACL associated with the given serviceInstanceId.
|
AccessControlList |
get(SessionConfig sessionConfig,
String serviceInstanceId,
ITransaction transaction)
Get the Service Instance's Access Control List.
|
protected AccessControlList |
getAclInternal(SessionConfig sessionConfig,
String serviceInstanceId,
ITransaction transaction) |
ServiceInstancePermissions |
getPermissions(SessionConfig sessionConfig,
String serviceId,
ITransaction transaction) |
protected int |
getRequiredPermissions() |
void |
update(SessionConfig sessionConfig,
String serviceInstanceId,
AccessControlList acl,
ITransaction transaction)
Update the Service Instance's ACL.
|
add, add, addOrUpdate, checkPermission, checkPermission, checkRequiredPermissionsInternal, cleanupInvalidData, clearCache, delete, deleteAclEntryByPrincipalId, deserialize, exists, keyExists, removeFromCache, serialize, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, addOrUpdate, checkPermission, checkPermission, clearCache, delete, deleteAclEntryByPrincipalId, deserialize, exists, removeFromCache, serialize
keyExists
public String add(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction) throws ManagerException, PortalException
IServiceInstanceAclManager
add
in interface IServiceInstanceAclManager
ManagerException
PortalException
public AccessControlList get(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws ManagerException, PortalException
IServiceInstanceAclManager
get
in interface IServiceInstanceAclManager
get
in class AclManager
ManagerException
PortalException
public void update(SessionConfig sessionConfig, String serviceInstanceId, AccessControlList acl, ITransaction transaction) throws ManagerException, PortalException
IServiceInstanceAclManager
update
in interface IServiceInstanceAclManager
ManagerException
PortalException
public void clearCache(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws ManagerException, PortalException
IServiceInstanceAclManager
clearCache
in interface IServiceInstanceAclManager
ManagerException
PortalException
public ServiceInstancePermissions getPermissions(SessionConfig sessionConfig, String serviceId, ITransaction transaction) throws ManagerException, PortalException
getPermissions
in interface IServiceInstanceAclManager
ManagerException
PortalException
protected AccessControlList getAclInternal(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws ManagerException, PortalException
getAclInternal
in class AclManager
ManagerException
PortalException
protected int getRequiredPermissions() throws PortalException
getRequiredPermissions
in class AclManager
PortalException
public void checkRequiredPermissions(AccessControlList acl) throws PortalException
IServiceInstanceAclManager
checkRequiredPermissions
in interface IServiceInstanceAclManager
acl
- the acl to be checked.PortalException
- if the required permissions were not given.public boolean checkServiceInstancePermission(SessionConfig sessionConfig, String serviceInstanceId, String permissionId, ITransaction transaction) throws PortalException
IServiceInstanceAclManager
This method is a shortcut for IAclManager.checkPermission(SessionConfig, String, IPermission, ITransaction)
that
obtains the IPermission
object from the service instance permissions.
checkServiceInstancePermission
in interface IServiceInstanceAclManager
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.true
if the user has the permission, false
otherwise.PortalObjectNotFoundException
- if the service instance or the permission was not found.PortalException
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
public boolean checkServiceInstancePermission(SessionConfig sessionConfig, String userId, String serviceInstanceId, String permissionId, ITransaction transaction) throws PortalException
IServiceInstanceAclManager
This method is a shortcut for IAclManager.checkPermission(SessionConfig, String, String, IPermission, ITransaction)
that obtains the IPermission
object from the service instance permissions.
checkServiceInstancePermission
in interface IServiceInstanceAclManager
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.true
if the user has the permission, false
otherwise.PortalObjectNotFoundException
- if the service instance or the permission was not found.PortalException
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
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.