@SuppressWarnings("unchecked") public Collection<SSOUser> getUsers(JetspeedPrincipal principal, Long remoteSecurityDomain) throws SecurityException { return (Collection<SSOUser>)_getSSOUsersForPrincipal(principal,remoteSecurityDomain); }
public Collection<String> getUserNames(String nameFilter, Long domainId) throws SecurityException { return (List<String>) domainPrincipalAccess.getPrincipalNames(nameFilter, getPrincipalType(), domainId); }
@SuppressWarnings("unchecked") public Collection<SSOUser> getUsers(String nameFilter, Long domainId) throws SecurityException { return (List<SSOUser>) getPrincipals(nameFilter, domainId); }
public void removeUser(String userName, Long domainId) throws SecurityException { JetspeedPrincipal user; user = getUser(userName, domainId); super.removePrincipal(user); }
public Collection<SSOUser> getUsers(JetspeedPrincipal principal) throws SecurityException { Collection<SecurityDomain> allDomains = domainAccess.getDomainsOwnedBy(principal.getDomainId()); Collection<SSOUser> users = new ArrayList<SSOUser>(); for (SecurityDomain domain : allDomains){ users.addAll(getUsers(principal,domain.getDomainId())); } return users; }
public SSOUser addUser(String name, Long domainId, JetspeedPrincipal ownerPrincipal) throws SecurityException { SSOUser user = newUser(name, domainId); Set<JetspeedPrincipalAssociationReference> reqAssociations = new HashSet<JetspeedPrincipalAssociationReference>(); reqAssociations.add(new JetspeedPrincipalAssociationReference(JetspeedPrincipalAssociationReference.Type.TO, ownerPrincipal, IsOwnedByPrincipalAssociationHandler.ASSOCIATION_NAME)); super.addPrincipal(user, reqAssociations); // by default add a relation to the owner super.addAssociation(user, ownerPrincipal, IsRemoteIdentityForPrincipalAssociationHandler.ASSOCIATION_NAME); return user; }
protected List<? extends JetspeedPrincipal> getPrincipals(String nameFilter, Long domainId) { return domainPrincipalAccess.getPrincipals(nameFilter, getPrincipalType(), domainId); }
public boolean userExists(String userName, Long domainId) { return domainPrincipalAccess.principalExists(userName, getPrincipalType(), domainId); }
public SSOUser getUser(String userName, Long domainId) throws SecurityException { SSOUser user = (SSOUser)domainPrincipalAccess.getPrincipal(userName, getPrincipalType(), domainId); if (null == user) { throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.SSO_USER, userName)); } return user; }
public Collection<JetspeedPrincipal> getPortalPrincipals(SSOUser remoteUser, Long portalPrincipalDomain) { Collection<JetspeedPrincipal> principalsFound = new ArrayList<JetspeedPrincipal>(); List<JetspeedPrincipalAssociationType> assTypes = super.getAssociationTypes(); for (JetspeedPrincipalAssociationType type : assTypes) { if (type.getAssociationName().equals(IsRemoteIdentityForPrincipalAssociationHandler.ASSOCIATION_NAME)){ Collection<JetspeedPrincipal> principalsForThisType = domainPrincipalAccess.getAssociatedFrom(remoteUser.getName(), getPrincipalType(), type.getToPrincipalType(), IsRemoteIdentityForPrincipalAssociationHandler.ASSOCIATION_NAME, remoteUser.getDomainId(), portalPrincipalDomain); principalsFound.addAll(principalsForThisType); } } return principalsFound; }
private Collection<? extends JetspeedPrincipal> _getSSOUsersForPrincipal(JetspeedPrincipal principal, Long remoteSecurityDomain) throws SecurityException { return domainPrincipalAccess.getAssociatedTo(principal.getName(), getPrincipalType(), principal.getType(), IsRemoteIdentityForPrincipalAssociationHandler.ASSOCIATION_NAME, remoteSecurityDomain, principal.getDomainId()); }