public boolean isCredentialSupported(IdentityObjectType identityObjectType, IdentityObjectCredentialType credentialType) { return resolveIdentityStore(identityObjectType).getSupportedFeatures().isCredentialSupported(identityObjectType, credentialType); }
public boolean isIdentityObjectTypeSupported(IdentityObjectType identityObjectType) { return resolveIdentityStore(identityObjectType).getSupportedFeatures().isIdentityObjectTypeSupported(identityObjectType); }
public boolean isRelationshipTypeSupported(IdentityObjectType fromType, IdentityObjectType toType, IdentityObjectRelationshipType relationshipType) throws IdentityException { IdentityStore fromStore = resolveIdentityStore(fromType); IdentityStore toStore = resolveIdentityStore(toType); if (fromStore == toStore) { return fromStore.getSupportedFeatures().isRelationshipTypeSupported(fromType, toType, relationshipType); } else { return defaultIdentityStore.getSupportedFeatures().isRelationshipTypeSupported(fromType, toType, relationshipType); } }
public Set<String> getSupportedIdentityObjectTypes() { Set<String> supportedIOTs = new HashSet<String>(); for (IdentityStore identityStore : getIdentityStoreMappings().values()) { supportedIOTs.addAll(identityStore.getSupportedFeatures().getSupportedIdentityObjectTypes()); } supportedIOTs.addAll(defaultIdentityStore.getSupportedFeatures().getSupportedRelationshipTypes()); return supportedIOTs; }
public boolean isRoleNameSearchCriteriaTypeSupported(IdentityObjectSearchCriteriaType constraint) { // If there is any IdentityStore that supports named relationships... for (IdentityStore identityStore : getIdentityStoreMappings().values()) { if (identityStore.getSupportedFeatures().isNamedRelationshipsSupported() && identityStore.getSupportedFeatures().isRoleNameSearchCriteriaTypeSupported(constraint)) { return true; } } return defaultIdentityStore.getSupportedFeatures().isNamedRelationshipsSupported() && defaultIdentityStore.getSupportedFeatures().isRoleNameSearchCriteriaTypeSupported(constraint); }
public Set<IdentityObjectRelationship> resolveRelationships(IdentityStoreInvocationContext ctx, IdentityObject identity, IdentityObjectRelationshipType relationshipType, boolean parent, boolean named, String name) throws IdentityException { Set<IdentityObjectRelationship> relationships = new HashSet<IdentityObjectRelationship>(); // For any IdentityStore that supports named relationships... for (IdentityStore identityStore : configuredIdentityStores) { if (!identityStore.getSupportedFeatures().getSupportedRelationshipTypes().contains(relationshipType.getName())) { continue; } if (!named || (named && identityStore.getSupportedFeatures().isNamedRelationshipsSupported())) { IdentityStoreInvocationContext storeCtx = resolveInvocationContext(identityStore, ctx); relationships.addAll(identityStore.resolveRelationships(storeCtx, identity, relationshipType, parent, named, name)); } } return relationships; }
public boolean isNamedRelationshipsSupported() { // If there is any IdentityStore that supports named relationships... for (IdentityStore identityStore : getIdentityStoreMappings().values()) { if (identityStore.getSupportedFeatures().isNamedRelationshipsSupported()) { return true; } } return defaultIdentityStore.getSupportedFeatures().isNamedRelationshipsSupported(); }
public boolean isIdentityObjectAddRemoveSupported(IdentityObjectType objectType) { return resolveIdentityStore(objectType).getSupportedFeatures().isIdentityObjectAddRemoveSupported(objectType); }
public boolean isRelationshipNameAddRemoveSupported() { // If there is any IdentityStore that supports named relationships... for (IdentityStore identityStore : getIdentityStoreMappings().values()) { if (identityStore.getSupportedFeatures().isRelationshipNameAddRemoveSupported()) { return true; } } return defaultIdentityStore.getSupportedFeatures().isRelationshipNameAddRemoveSupported(); }
public boolean isRelationshipPropertiesSupported() { // If there is any IdentityStore that supports relationship properties... for (IdentityStore identityStore : getIdentityStoreMappings().values()) { if (identityStore.getSupportedFeatures().isRelationshipPropertiesSupported()) { return true; } } return defaultIdentityStore.getSupportedFeatures().isRelationshipPropertiesSupported(); }
public Set<String> getSupportedRelationshipTypes() { Set<String> supportedRelTypes = new HashSet<String>(); for (IdentityStore identityStore : getIdentityStoreMappings().values()) { supportedRelTypes.addAll(identityStore.getSupportedFeatures().getSupportedRelationshipTypes()); } supportedRelTypes.addAll(defaultIdentityStore.getSupportedFeatures().getSupportedRelationshipTypes()); return supportedRelTypes; }
public boolean isRoleTypeSearchCriteriumTypeSupported(IdentitySearchCriteriumType constraintType) { IdentityObjectSearchCriteriaType constraint = IdentityObjectSearchCriteriaType.valueOf(constraintType.name()); if (constraint != null) { return getSessionContext().getIdentityStoreRepository().getSupportedFeatures(). isRoleNameSearchCriteriaTypeSupported(constraint); } else { return false; } } };
public Set<String> getRelationshipNames(IdentityStoreInvocationContext ctx, IdentityObjectSearchCriteria criteria) throws IdentityException, OperationNotSupportedException { Set<String> results = new HashSet<String>(); // For any IdentityStore that supports named relationships... for (IdentityStore identityStore : configuredIdentityStores) { if (identityStore.getSupportedFeatures().isNamedRelationshipsSupported()) { IdentityStoreInvocationContext storeCtx = resolveInvocationContext(identityStore, ctx); results.addAll(identityStore.getRelationshipNames(storeCtx, criteria)); } } return results; }
public JBossCacheIdentityStoreWrapper(IdentityStore identityStore, IdentityStoreCacheProvider cacheSupport) throws IdentityException { super(identityStore, cacheSupport); this.identityStore = identityStore; cacheSupport.initResidentNodes(identityStore.getSupportedFeatures().getSupportedIdentityObjectTypes(), identityStore.getSupportedFeatures().getSupportedRelationshipTypes()); log.fine("------------------------------------------------------"); log.fine("JBossCacheIdentityStoreWrapper created ....." + "(IdentityStore: " + identityStore.getId() + ")"); log.fine("------------------------------------------------------"); }
public boolean isUsersAddRemoveSupported() { IdentityObjectType objectType = getSessionContext().getIdentityObjectTypeMapper().getIdentityObjectType(); return getSessionContext().getIdentityStoreRepository().getSupportedFeatures(). isIdentityObjectAddRemoveSupported(objectType); }
public boolean isRoleTypeAddRemoveSupported() { return getSessionContext().getIdentityStoreRepository().getSupportedFeatures().isRelationshipNameAddRemoveSupported(); }
public boolean hasPassword(User user) throws IdentityException { checkNotNullArgument(user, "User"); return getRepository().getSupportedFeatures().isCredentialSupported(createIdentityObject(user).getIdentityType(), PasswordCredential.TYPE); }
public Map<String, String> getRelationshipNameProperties(IdentityStoreInvocationContext ctx, String name) throws IdentityException, OperationNotSupportedException { Map<String, String> results = new HashMap<String, String>(); // For any IdentityStore that supports named relationships... for (IdentityStore identityStore : configuredIdentityStores) { if (identityStore.getSupportedFeatures().isNamedRelationshipsSupported()) { IdentityStoreInvocationContext storeCtx = resolveInvocationContext(identityStore, ctx); Map<String, String> props = identityStore.getRelationshipNameProperties(storeCtx, name); if (props != null && props.keySet().size() > 0) { results.putAll(props); } } } return results; }
HibernateIdentityObjectRelationshipType type = getHibernateIdentityObjectRelationshipType(ctx, relationshipType); if (!getSupportedFeatures().isRelationshipTypeSupported(fromIO.getIdentityType(), toIO.getIdentityType(), relationshipType))
private void checkIOType(IdentityObjectType iot) throws IdentityException { if (iot == null) { throw new IllegalArgumentException("IdentityObjectType is null"); } if (!getSupportedFeatures().isIdentityObjectTypeSupported(iot)) { if (!isAllowNotDefinedIdentityObjectTypes()) { throw new IdentityException("IdentityType not supported by this IdentityStore implementation: " + iot); } } }