org.apache.jetspeed.sso
Interface SSOSiteManager

All Known Subinterfaces:
SSOManager

public interface SSOSiteManager

Version:
$Id: SSOSiteManager.java 734954 2009-01-16 10:07:13Z ddam $
Author:
Dennis Dam

Method Summary
 SSOSite addSite(SSOSite site)
          Adds the site to the persistent store.
 SSOSite getSiteById(int id)
          Retrieves a site by matching ID
 SSOSite getSiteByName(java.lang.String siteName)
          Retrieves a site by matching the name of the site.
 SSOSite getSiteByUrl(java.lang.String siteUrl)
          Retrieves a site by matching the URL.
 java.util.Collection<SSOSite> getSites(java.lang.String filter)
          Retrieves sites, given a filter.
 java.util.Collection<SSOSite> getSitesForPrincipal(JetspeedPrincipal principal)
          Retrieves all sites directly related to this single principal.
 java.util.Collection<SSOSite> getSitesForSubject(javax.security.auth.Subject subject)
          Retrieves all SSO sites related to the given Subject.
 SSOSite newSite(java.lang.String name, java.lang.String url)
          Creates a new TRANSIENT site object.
 void removeSite(SSOSite site)
          Removes a SSO site
 void updateSite(SSOSite site)
          Updates an existing SSO site
 

Method Detail

newSite

SSOSite newSite(java.lang.String name,
                java.lang.String url)
                throws SSOException
Creates a new TRANSIENT site object. The site is not added to the persistent store yet. It just creates a new Site object. Use the addSite(site) method to make the site persistent.

Parameters:
name - the name of the new site
url - the url of the new site
Returns:
a new SSO site object
Throws:
SSOException

addSite

SSOSite addSite(SSOSite site)
                throws SSOException
Adds the site to the persistent store.

Parameters:
site - the transient site to be added (created with newSite())
Returns:
the persistent site that was added
Throws:
SSOException

removeSite

void removeSite(SSOSite site)
                throws SSOException
Removes a SSO site

Parameters:
site - the site to be removed
Throws:
SSOException

updateSite

void updateSite(SSOSite site)
                throws SSOException
Updates an existing SSO site

Parameters:
site - the site to be updated
Throws:
SSOException

getSitesForSubject

java.util.Collection<SSOSite> getSitesForSubject(javax.security.auth.Subject subject)
                                                 throws SSOException
Retrieves all SSO sites related to the given Subject. A Subject can contain multiple Portal principals, each of which can be related with one or more SSO users.

Parameters:
subject -
Returns:
the collection of sites related to this subject
Throws:
SSOException

getSitesForPrincipal

java.util.Collection<SSOSite> getSitesForPrincipal(JetspeedPrincipal principal)
                                                   throws SSOException
Retrieves all sites directly related to this single principal. Indirect relations are not returned! Use getSitesForSubject() if you want to get all sites which belong to one user.

Parameters:
principal -
Returns:
Throws:
SSOException

getSites

java.util.Collection<SSOSite> getSites(java.lang.String filter)
Retrieves sites, given a filter. The filter is matched as a substring of the name or the url of the site.

Parameters:
filter - a string that should match part of the name or url of sites returned
Returns:
a collection of sites which match the filter

getSiteById

SSOSite getSiteById(int id)
Retrieves a site by matching ID

Parameters:
id - the id of a site
Returns:
the site with the given ID

getSiteByUrl

SSOSite getSiteByUrl(java.lang.String siteUrl)
Retrieves a site by matching the URL. The url has to be an exact match.

Parameters:
siteUrl - the url of a site
Returns:
the site with the given URL

getSiteByName

SSOSite getSiteByName(java.lang.String siteName)
Retrieves a site by matching the name of the site. The name should be an exact match.

Parameters:
siteName - the name of a site
Returns:
the site with the given name


Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.