Package com.iplanet.services.naming
Class WebtopNamingQuery
- java.lang.Object
 - 
- com.iplanet.services.naming.WebtopNamingQuery
 
 
- 
public class WebtopNamingQuery extends Object
Provides a non-static wrapper around WebtopNaming so this service can be injected into classes using Guice and tested appropriately. 
- 
- 
Constructor Summary
Constructors Constructor Description WebtopNamingQuery() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>getAllServerIDs()StringgetAMServerID()StringgetServerFromID(String server)SessionIDCorrectorgetSessionIDCorrector()StringgetSiteID(String server)Set<String>getSiteNodes(String siteID)booleanisAvailable(URL url)booleanisServer(String serverID)booleanisSite(String siteID) 
 - 
 
- 
- 
Method Detail
- 
getSiteID
public String getSiteID(String server)
- Parameters:
 server- Non null Server ID.- Returns:
 - Null if the server was not part of a Site, or not found in any Site.
 - See Also:
 WebtopNaming.getSiteID(String)
 
- 
getServerFromID
public String getServerFromID(String server) throws ServerEntryNotFoundException
- Parameters:
 server- The ID of the Server as described in the naming table.- Returns:
 - A URL based on the Servers entry in the naming table.
 - Throws:
 ServerEntryNotFoundException- If the server was not found in the naming table.- See Also:
 WebtopNaming.getServerFromID(String)
 
- 
getAMServerID
public String getAMServerID() throws ServerEntryNotFoundException
- Returns:
 - The ID of the current Server.
 - Throws:
 ServerEntryNotFoundException- If there was a problem resolving this ID.- See Also:
 WebtopNaming.getAMServerID()
 
- 
isSite
public boolean isSite(String siteID)
- Parameters:
 siteID- The ID of the Site or Server to test.- Returns:
 - True if the ID belongs to a Site ID. False if not valid or is a Server ID.
 - See Also:
 WebtopNaming.isSite(String)
 
- 
isServer
public boolean isServer(String serverID)
- Parameters:
 serverID- The ID of the Site or Server to test.- Returns:
 - True if the ID belongs to a Server. False if not valid or is a Site ID.
 - See Also:
 WebtopNaming.isServer(String)
 
- 
getSiteNodes
public Set<String> getSiteNodes(String siteID) throws Exception
- Parameters:
 siteID- Non null Site ID.- Returns:
 - The ServerIDs that make up the Site.
 - Throws:
 Exception- If there was a problem determining the Site nodes.- See Also:
 WebtopNaming.getSiteNodes(String)
 
- 
isAvailable
public boolean isAvailable(URL url) throws Exception
- Parameters:
 url- Non null URL to test. This URL must point to an OpenAM Server instance.- Returns:
 - True indicates that the Server is up and responding.
 - Throws:
 Exception- See Also:
 WebtopNaming.SiteMonitor.isAvailable(java.net.URL)
 
- 
getAllServerIDs
public Collection<String> getAllServerIDs() throws Exception
- Returns:
 - all server IDs.
 - Throws:
 Exception- if an error occurs when getting all the server ids- See Also:
 WebtopNaming.getAllServerIDs()
 
- 
getSessionIDCorrector
public SessionIDCorrector getSessionIDCorrector()
 
 - 
 
 -