@Override public IdentityContext getIdentityContext() { return createIdentityContext(null, getConfiguration().getEventBridge(), getConfiguration().getIdGenerator()); } }
AbstractAttributedTypeManager(PartitionManagerConfiguration configuration, Partition partition) { this.configuration = configuration; this.identityContext = createIdentityContext(partition, configuration.getEventBridge(), configuration.getIdGenerator()); }
@Override public Collection<IdentityConfiguration> getConfigurations() { return getConfiguration().getConfigurations(); }
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 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(); }
@Override public boolean inheritsPrivileges(IdentityType identity, IdentityType assignee) { if (identity.equals(assignee)) { return true; } PrivilegeChainQuery privilegeChainQuery = getConfiguration().getPrivilegeChainQuery(); return privilegeChainQuery.inheritsPrivileges(this, identity, assignee); }
@Override public PermissionManager createPermissionManager(Partition partition) throws IdentityManagementException { if (partition == null) { throw MESSAGES.nullArgument("Partition"); } Partition storedPartition = getStoredPartition(partition); try { return new ContextualPermissionManager(storedPartition, this); } catch (Exception ex) { throw MESSAGES.partitionCouldNotCreatePermissionManager(storedPartition); } }
private void checkPartitionManagementSupported() throws OperationNotSupportedException { if (!getConfiguration().supportsPartition()) { throw MESSAGES.partitionManagementNoSupported(Partition.class, IdentityOperation.create); } }
@Override public IdentityManager createIdentityManager() throws IdentityManagementException { return createIdentityManager(DEFAULT_REALM); }
@Override public PermissionManager createPermissionManager() { return createPermissionManager(DEFAULT_REALM); }
@Override public RelationshipManager createRelationshipManager() { return new ContextualRelationshipManager(this); }
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 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(); }
@Override public IdentityContext getIdentityContext() { return createIdentityContext(null, getConfiguration().getEventBridge(), getConfiguration().getIdGenerator()); } }
AbstractAttributedTypeManager(PartitionManagerConfiguration configuration, Partition partition) { this.configuration = configuration; this.identityContext = createIdentityContext(partition, configuration.getEventBridge(), configuration.getIdGenerator()); }
@Override public boolean inheritsPrivileges(IdentityType identity, IdentityType assignee) { if (identity.equals(assignee)) { return true; } PrivilegeChainQuery privilegeChainQuery = getConfiguration().getPrivilegeChainQuery(); return privilegeChainQuery.inheritsPrivileges(this, identity, assignee); }
@Override public Collection<IdentityConfiguration> getConfigurations() { return getConfiguration().getConfigurations(); }
@Override public PermissionManager createPermissionManager(Partition partition) throws IdentityManagementException { if (partition == null) { throw MESSAGES.nullArgument("Partition"); } Partition storedPartition = getStoredPartition(partition); try { return new ContextualPermissionManager(storedPartition, this); } catch (Exception ex) { throw MESSAGES.partitionCouldNotCreatePermissionManager(storedPartition); } }
private void checkPartitionManagementSupported() throws OperationNotSupportedException { if (!getConfiguration().supportsPartition()) { throw MESSAGES.partitionManagementNoSupported(Partition.class, IdentityOperation.create); } }
@Override public PermissionManager createPermissionManager() { return createPermissionManager(DEFAULT_REALM); }