@Override public void update(T attributedType) throws IdentityManagementException { if (attributedType == null) { throw MESSAGES.nullArgument("AttributedType"); } checkIfExists(attributedType); try { doUpdate(attributedType); T storedType = lookupById((Class<T>) attributedType.getClass(), attributedType.getId()); removeAttributes(identityContext, attributedType, storedType); addAttributes(identityContext, attributedType); fireAttributedTypeUpdatedEvent(attributedType); } catch (Exception e) { throw MESSAGES.attributedTypeUpdateFailed(attributedType, e); } }
@Override public void add(T attributedType) throws IdentityManagementException { if (attributedType == null) { throw MESSAGES.nullArgument("AttributedType"); } checkUniqueness(attributedType); try { doAdd(attributedType); addAttributes(identityContext, attributedType); fireAttributedTypeAddedEvent(attributedType); } catch (Exception e) { throw MESSAGES.attributedTypeAddFailed(attributedType, e); } }
@Override public void remove(T attributedType) throws IdentityManagementException { if (attributedType == null) { throw MESSAGES.nullArgument("AttributedType"); } checkIfExists(attributedType); try { T storedType = lookupById((Class<T>) attributedType.getClass(), attributedType.getId()); removeAllAttributes(storedType); doRemove(attributedType); fireAttributedTypeRemovedEvent(attributedType); } catch (Exception e) { throw MESSAGES.attributedTypeRemoveFailed(attributedType, e); } }
@Override protected IdentityContext createIdentityContext(Partition partition, EventBridge eventBridge, IdGenerator idGenerator) { IdentityContext identityContext = super.createIdentityContext(partition, eventBridge, idGenerator); identityContext.setParameter(IDENTITY_MANAGER_CTX_PARAMETER, this); return identityContext; }
@Override protected IdentityContext createIdentityContext(Partition partition, EventBridge eventBridge, IdGenerator idGenerator) { IdentityContext identityContext = super.createIdentityContext(partition, eventBridge, idGenerator); identityContext.setParameter(IDENTITY_MANAGER_CTX_PARAMETER, this); return identityContext; }
@Override public void update(T attributedType) throws IdentityManagementException { if (attributedType == null) { throw MESSAGES.nullArgument("AttributedType"); } checkIfExists(attributedType); try { doUpdate(attributedType); T storedType = lookupById((Class<T>) attributedType.getClass(), attributedType.getId()); removeAttributes(identityContext, attributedType, storedType); addAttributes(identityContext, attributedType); fireAttributedTypeUpdatedEvent(attributedType); } catch (Exception e) { throw MESSAGES.attributedTypeUpdateFailed(attributedType, e); } }
@Override public void remove(T attributedType) throws IdentityManagementException { if (attributedType == null) { throw MESSAGES.nullArgument("AttributedType"); } checkIfExists(attributedType); try { T storedType = lookupById((Class<T>) attributedType.getClass(), attributedType.getId()); removeAllAttributes(storedType); doRemove(attributedType); fireAttributedTypeRemovedEvent(attributedType); } catch (Exception e) { throw MESSAGES.attributedTypeRemoveFailed(attributedType, e); } }
@Override public void add(T attributedType) throws IdentityManagementException { if (attributedType == null) { throw MESSAGES.nullArgument("AttributedType"); } checkUniqueness(attributedType); try { doAdd(attributedType); addAttributes(identityContext, attributedType); fireAttributedTypeAddedEvent(attributedType); } catch (Exception e) { throw MESSAGES.attributedTypeAddFailed(attributedType, e); } }
AbstractAttributedTypeManager(PartitionManagerConfiguration configuration, Partition partition) { this.configuration = configuration; this.identityContext = createIdentityContext(partition, configuration.getEventBridge(), configuration.getIdGenerator()); }
AbstractAttributedTypeManager(PartitionManagerConfiguration configuration, Partition partition) { this.configuration = configuration; this.identityContext = createIdentityContext(partition, configuration.getEventBridge(), configuration.getIdGenerator()); }