@Override public void revokePermission(IdentityType assignee, Class<?> resourceclass, String operation) { try { storeSelector.getStoreForPermissionOperation(this.identityContext).revokePermission(this.identityContext, assignee, resourceclass, operation); } catch (Exception ex) { throw MESSAGES.permissionRevokeFailed(assignee, resourceclass, operation, ex); } }
@Override public void revokePermission(IdentityType assignee, Class<?> resourceclass, String operation) { try { storeSelector.getStoreForPermissionOperation(this.identityContext).revokePermission(this.identityContext, assignee, resourceclass, operation); } catch (Exception ex) { throw MESSAGES.permissionRevokeFailed(assignee, resourceclass, operation, ex); } }
@Override public void clearPermissions(Object resource) { try { storeSelector.getStoreForPermissionOperation(this.identityContext).revokeAllPermissions(this.identityContext, resource); } catch (Exception ex) { throw MESSAGES.permissionRevokeAllFailed(resource, ex); } }
@Override public void grantPermission(IdentityType assignee, Object resource, String operation) { try { storeSelector.getStoreForPermissionOperation(this.identityContext).grantPermission(this.identityContext, assignee, resource, operation); } catch (Exception e) { throw MESSAGES.permissionGrantFailed(assignee, resource, operation, e); } }
@Override public void revokePermission(IdentityType assignee, Object resource, String operation) { try { storeSelector.getStoreForPermissionOperation(this.identityContext).revokePermission(this.identityContext, assignee, resource, operation); } catch (Exception ex) { throw MESSAGES.permissionRevokeFailed(assignee, resource, operation, ex); } }
@Override public void revokePermission(IdentityType assignee, Object resource, String operation) { try { storeSelector.getStoreForPermissionOperation(this.identityContext).revokePermission(this.identityContext, assignee, resource, operation); } catch (Exception ex) { throw MESSAGES.permissionRevokeFailed(assignee, resource, operation, ex); } }
@Override public void clearPermissions(Object resource) { try { storeSelector.getStoreForPermissionOperation(this.identityContext).revokeAllPermissions(this.identityContext, resource); } catch (Exception ex) { throw MESSAGES.permissionRevokeAllFailed(resource, ex); } }
@Override public void grantPermission(IdentityType assignee, Object resource, String operation) { try { storeSelector.getStoreForPermissionOperation(this.identityContext).grantPermission(this.identityContext, assignee, resource, operation); } catch (Exception e) { throw MESSAGES.permissionGrantFailed(assignee, resource, operation, e); } }
@Override public List<Permission> listPermissions(Class<?> resourceClass, Serializable identifier, String operation) { return resolveIdentityTypeReferences(storeSelector.getStoreForPermissionOperation(this.identityContext).listPermissions(this.identityContext, resourceClass, identifier, operation)); }
@Override public List<Permission> listPermissions(Class<?> resource, String operation) { return resolveIdentityTypeReferences(storeSelector.getStoreForPermissionOperation(this.identityContext).listPermissions(this.identityContext, (Object) resource, operation)); }
@Override public List<Permission> listPermissions(IdentityType identityType) { return resolveIdentityTypeReferences(storeSelector.getStoreForPermissionOperation(this.identityContext).listPermissions(this.identityContext, identityType)); }
@Override public List<Permission> listPermissions(IdentityType identityType) { return resolveIdentityTypeReferences(storeSelector.getStoreForPermissionOperation(this.identityContext).listPermissions(this.identityContext, identityType)); }
@Override public List<Permission> listPermissions(Class<?> resourceClass, Serializable identifier) { return resolveIdentityTypeReferences(storeSelector.getStoreForPermissionOperation(this.identityContext).listPermissions(this.identityContext, resourceClass, identifier)); }
@Override public List<Permission> listPermissions(Object resource, String operation) { return resolveIdentityTypeReferences(storeSelector.getStoreForPermissionOperation(this.identityContext).listPermissions(this.identityContext, resource, operation)); }
@Override public List<Permission> listPermissions(Class<?> resourceClass, Serializable identifier) { return resolveIdentityTypeReferences(storeSelector.getStoreForPermissionOperation(this.identityContext).listPermissions(this.identityContext, resourceClass, identifier)); }
@Override public List<Permission> listPermissions(Class<?> resourceClass, Serializable identifier, String operation) { return resolveIdentityTypeReferences(storeSelector.getStoreForPermissionOperation(this.identityContext).listPermissions(this.identityContext, resourceClass, identifier, operation)); }
public ContextualIdentityManager(Partition partition, DefaultPartitionManager partitionManager) { super(partitionManager.getConfiguration(), partition); this.partitionManager = partitionManager; IdentityContext identityContext = getIdentityContext(); if (getStoreSelector().getStoreForPermissionOperation(identityContext) != null) { this.permissionManager = this.partitionManager.createPermissionManager(partition); } else { this.permissionManager = null; } this.relationshipManager = this.partitionManager.createRelationshipManager(); }
public ContextualIdentityManager(Partition partition, DefaultPartitionManager partitionManager) { super(partitionManager.getConfiguration(), partition); this.partitionManager = partitionManager; IdentityContext identityContext = getIdentityContext(); if (getStoreSelector().getStoreForPermissionOperation(identityContext) != null) { this.permissionManager = this.partitionManager.createPermissionManager(partition); } else { this.permissionManager = null; } this.relationshipManager = this.partitionManager.createRelationshipManager(); }
public ContextualPermissionManager(Partition partition, DefaultPartitionManager defaultPartitionManager) { this.identityContext = new DefaultIdentityContext(partition, defaultPartitionManager.getEventBridge(), defaultPartitionManager.getIdGenerator(), defaultPartitionManager.getConfiguration().getPermissionHandlerPolicy()); this.storeSelector = defaultPartitionManager.getStoreSelector(); this.partitionManager = defaultPartitionManager; if (this.storeSelector.getStoreForPermissionOperation(identityContext) == null) { throw IDMInternalMessages.MESSAGES.permissionUnsupportedOperation(); } }
public ContextualPermissionManager(Partition partition, DefaultPartitionManager defaultPartitionManager) { this.identityContext = new DefaultIdentityContext(partition, defaultPartitionManager.getEventBridge(), defaultPartitionManager.getIdGenerator(), defaultPartitionManager.getConfiguration().getPermissionHandlerPolicy()); this.storeSelector = defaultPartitionManager.getStoreSelector(); this.partitionManager = defaultPartitionManager; if (this.storeSelector.getStoreForPermissionOperation(identityContext) == null) { throw IDMInternalMessages.MESSAGES.permissionUnsupportedOperation(); } }