public synchronized void addIdentity(Identity id) { if(identities == null) identities = new HashSet<Identity>(); if( id != null ) { Identity identity = getIdentity( id.getClass() ); if( identity == CredentialIdentityFactory.NULL_IDENTITY ) removeIdentity( identity ); } identities.add(id); }
public synchronized void addIdentity(Identity id) { if(identities == null) identities = new HashSet<Identity>(); if( id != null ) { Identity identity = getIdentity( id.getClass() ); if( identity == CredentialIdentityFactory.NULL_IDENTITY ) removeIdentity( identity ); } identities.add(id); }
public synchronized void addIdentity(Identity id) { if(identities == null) identities = new HashSet<Identity>(); if( id != null ) { Identity identity = getIdentity( id.getClass() ); if( identity == CredentialIdentityFactory.NULL_IDENTITY ) removeIdentity( identity ); } identities.add(id); }
/** * Clear Identities of a particular type * @param clazz */ public void clearIdentities(Class<?> clazz) { Set<Identity> ids = this.securityContext.getSubjectInfo().getIdentities(); if(ids != null) { Iterator<Identity> iter = ids.iterator(); while(iter.hasNext()) { Identity id = iter.next(); if(clazz.isAssignableFrom(id.getClass())) this.securityContext.getSubjectInfo().removeIdentity(id); } } }
/** * Clear Identities of a particular type * @param clazz */ public void clearIdentities(Class<?> clazz) { Set<Identity> ids = this.securityContext.getSubjectInfo().getIdentities(); if(ids != null) { Iterator<Identity> iter = ids.iterator(); while(iter.hasNext()) { Identity id = iter.next(); if(clazz.isAssignableFrom(id.getClass())) this.securityContext.getSubjectInfo().removeIdentity(id); } } }
/** * Clear Identities of a particular type * @param clazz */ public void clearIdentities(Class<?> clazz) { Set<Identity> ids = this.securityContext.getSubjectInfo().getIdentities(); if(ids != null) { Iterator<Identity> iter = ids.iterator(); while(iter.hasNext()) { Identity id = iter.next(); if(clazz.isAssignableFrom(id.getClass())) this.securityContext.getSubjectInfo().removeIdentity(id); } } }