public void removeRelationships(IdentityStoreInvocationContext invocationCtx, IdentityObject identity1, IdentityObject identity2, boolean named) throws IdentityException { identityStore.removeRelationships(invocationCtx, identity1, identity2, named); cacheSupport.invalidateIdentityObjectRelationshipNameSearches(getCacheNS(invocationCtx)); cacheSupport.invalidateIdentityObjectRelationshipSearches(getCacheNS(invocationCtx)); cacheSupport.invalidateIdentityObjectSearches(getCacheNS(invocationCtx)); cacheSupport.invalidateRelationshipProperties(getCacheNS(invocationCtx)); }
public String removeRelationshipName(IdentityStoreInvocationContext ctx, String name) throws IdentityException, OperationNotSupportedException { cacheSupport.invalidateIdentityObjectRelationshipNameSearches(getCacheNS(ctx)); cacheSupport.invalidateIdentityObjectRelationshipSearches(getCacheNS(ctx)); cacheSupport.invalidateIdentityObjectSearches(getCacheNS(ctx)); cacheSupport.invalidateRelationshipNameProperties(getCacheNS(ctx), name); return identityStore.removeRelationshipName(ctx, name); }
public String createRelationshipName(IdentityStoreInvocationContext ctx, String name) throws IdentityException, OperationNotSupportedException { cacheSupport.invalidateIdentityObjectRelationshipNameSearches(getCacheNS(ctx)); cacheSupport.invalidateIdentityObjectRelationshipSearches(getCacheNS(ctx)); cacheSupport.invalidateIdentityObjectSearches(getCacheNS(ctx)); return identityStore.createRelationshipName(ctx, name); }
public Map<String, IdentityObjectAttribute> getAttributes(IdentityStoreInvocationContext invocationContext, IdentityObject identity) throws IdentityException { Map<String, IdentityObjectAttribute> results = cacheSupport.getIdentityObjectAttributes(getCacheNS(invocationContext), identity); if (results != null) { return results; } results = attributeStore.getAttributes(invocationContext, identity); cacheSupport.putIdentityObjectAttributes(getCacheNS(invocationContext), identity, results); return results; }
public IdentityObject createIdentityObject(IdentityStoreInvocationContext invocationCtx, String name, IdentityObjectType identityObjectType) throws IdentityException { IdentityObject io = identityStore.createIdentityObject(invocationCtx, name, identityObjectType); if (io != null) { cacheSupport.invalidateIdentityObjectRelationshipNameSearches(getCacheNS(invocationCtx)); cacheSupport.invalidateIdentityObjectRelationshipSearches(getCacheNS(invocationCtx)); cacheSupport.invalidateIdentityObjectSearches(getCacheNS(invocationCtx)); cacheSupport.invalidateIdentityObjectCount(getCacheNS(invocationCtx), identityObjectType.getName()); } return io; }
public void updateAttributes(IdentityStoreInvocationContext invocationCtx, IdentityObject identity, IdentityObjectAttribute[] attributes) throws IdentityException { attributeStore.updateAttributes(invocationCtx, identity, attributes); cacheSupport.invalidateIdentityObjectAttriubtes(getCacheNS(invocationCtx), identity); cacheSupport.putIdentityObjectAttributes(getCacheNS(invocationCtx), identity, attributeStore.getAttributes(invocationCtx, identity)); }
public void setRelationshipNameProperties(IdentityStoreInvocationContext ctx, String name, Map<String, String> properties) throws IdentityException, OperationNotSupportedException { identityStore.setRelationshipNameProperties(ctx, name, properties); cacheSupport.invalidateRelationshipNameProperties(getCacheNS(ctx), name); cacheSupport.putProperties(getCacheNS(ctx), name, getRelationshipNameProperties(ctx, name)); }
public void setRelationshipProperties(IdentityStoreInvocationContext ctx, IdentityObjectRelationship relationship, Map<String, String> properties) throws IdentityException, OperationNotSupportedException { identityStore.setRelationshipProperties(ctx, relationship, properties); cacheSupport.invalidateRelationshipProperties(getCacheNS(ctx), relationship); cacheSupport.putProperties(getCacheNS(ctx), relationship, getRelationshipProperties(ctx, relationship)); }
public Map<String, String> getRelationshipNameProperties(IdentityStoreInvocationContext ctx, String name) throws IdentityException, OperationNotSupportedException { Map<String, String> properties = cacheSupport.getProperties(getCacheNS(ctx), name); if (properties != null) { return properties; } properties = identityStore.getRelationshipNameProperties(ctx, name); cacheSupport.putProperties(getCacheNS(ctx), name, properties); return properties; }
void invalidateCache() { if (getCache() != null) { getCache().invalidate(getNamespace()); } }
public int getIdentityObjectsCount(IdentityStoreInvocationContext invocationCtx, IdentityObjectType identityType) throws IdentityException { int count = cacheSupport.getIdentityObjectCount(getCacheNS(invocationCtx), identityType.getName()); if (count != -1) { return count; } count = identityStore.getIdentityObjectsCount(invocationCtx, identityType); cacheSupport.putIdentityObjectCount(getCacheNS(invocationCtx), identityType.getName(), count); return count; }
public Set<String> getRelationshipNames(IdentityStoreInvocationContext ctx, IdentityObjectSearchCriteria criteria) throws IdentityException, OperationNotSupportedException { IdentityObjectRelationshipNameSearchImpl search = new IdentityObjectRelationshipNameSearchImpl(); search.setIdentityObjectSearchCriteria(criteria); Set<String> results = cacheSupport.getIdentityObjectRelationshipNameSearch(getCacheNS(ctx), search); if (results != null) { return results; } results = identityStore.getRelationshipNames(ctx, criteria); cacheSupport.putIdentityObjectRelationshipNameSearch(getCacheNS(ctx), search, results); return results; }
protected String getCacheNS(IdentityStoreInvocationContext ctx) { if (cacheScope != null && cacheScope.equals("realm")) { return cacheSupport.getNamespace(attributeStore.getId(), ctx.getRealmId()); } if (cacheScope != null && cacheScope.equals("session")) { return cacheSupport.getNamespace(attributeStore.getId(), ctx.getRealmId(), ctx.getSessionId()); } return cacheSupport.getNamespace(attributeStore.getId()); }
public void removeRelationship(IdentityStoreInvocationContext invocationCxt, IdentityObject fromIdentity, IdentityObject toIdentity, IdentityObjectRelationshipType relationshipType, String relationshipName) throws IdentityException { identityStore.removeRelationship(invocationCxt, fromIdentity, toIdentity, relationshipType, relationshipName); cacheSupport.invalidateIdentityObjectRelationshipNameSearches(getCacheNS(invocationCxt)); cacheSupport.invalidateIdentityObjectRelationshipSearches(getCacheNS(invocationCxt)); cacheSupport.invalidateIdentityObjectSearches(getCacheNS(invocationCxt)); IdentityObjectRelationship relationship = new SimpleIdentityObjectRelationship(fromIdentity, toIdentity, relationshipName, relationshipType); cacheSupport.invalidateRelationshipProperties(getCacheNS(invocationCxt), relationship); }
public void removeAttributes(IdentityStoreInvocationContext invocationCtx, IdentityObject identity, String[] attributeNames) throws IdentityException { attributeStore.removeAttributes(invocationCtx, identity, attributeNames); cacheSupport.invalidateIdentityObjectAttriubtes(getCacheNS(invocationCtx), identity); cacheSupport.putIdentityObjectAttributes(getCacheNS(invocationCtx), identity, attributeStore.getAttributes(invocationCtx, identity)); }
public IdentityObjectRelationship createRelationship(IdentityStoreInvocationContext invocationCxt, IdentityObject fromIdentity, IdentityObject toIdentity, IdentityObjectRelationshipType relationshipType, String relationshipName, boolean createNames) throws IdentityException { cacheSupport.invalidateIdentityObjectRelationshipNameSearches(getCacheNS(invocationCxt)); cacheSupport.invalidateIdentityObjectRelationshipSearches(getCacheNS(invocationCxt)); cacheSupport.invalidateIdentityObjectSearches(getCacheNS(invocationCxt)); return identityStore.createRelationship(invocationCxt, fromIdentity, toIdentity, relationshipType, relationshipName, createNames); }
public void removeRelationshipNameProperties(IdentityStoreInvocationContext ctx, String name, Set<String> properties) throws IdentityException, OperationNotSupportedException { identityStore.removeRelationshipNameProperties(ctx, name, properties); cacheSupport.invalidateRelationshipNameProperties(getCacheNS(ctx), name); cacheSupport.putProperties(getCacheNS(ctx), name, getRelationshipNameProperties(ctx, name)); }
public void removeRelationshipProperties(IdentityStoreInvocationContext ctx, IdentityObjectRelationship relationship, Set<String> properties) throws IdentityException, OperationNotSupportedException { identityStore.removeRelationshipProperties(ctx, relationship, properties); cacheSupport.invalidateRelationshipProperties(getCacheNS(ctx), relationship); cacheSupport.putProperties(getCacheNS(ctx), relationship, getRelationshipProperties(ctx, relationship)); }
public Map<String, String> getRelationshipProperties(IdentityStoreInvocationContext ctx, IdentityObjectRelationship relationship) throws IdentityException, OperationNotSupportedException { Map<String, String> properties = cacheSupport.getProperties(getCacheNS(ctx), relationship); if (properties != null) { return properties; } properties = identityStore.getRelationshipProperties(ctx, relationship); cacheSupport.putProperties(getCacheNS(ctx), relationship, properties); return properties; }
public void addAttributes(IdentityStoreInvocationContext invocationCtx, IdentityObject identity, IdentityObjectAttribute[] attributes) throws IdentityException { attributeStore.addAttributes(invocationCtx, identity, attributes); cacheSupport.invalidateIdentityObjectAttriubtes(getCacheNS(invocationCtx), identity); cacheSupport.putIdentityObjectAttributes(getCacheNS(invocationCtx), identity, attributeStore.getAttributes(invocationCtx, identity)); }