public class

IPAEnvironmentWrapper

extends Object
java.lang.Object
   ↳ com.microstrategy.web.ipa.utils.IPAEnvironmentWrapper

Class Overview

The wrapper class of IPAEnvironments It will manipulate the IPAEnvironments.xml file

Summary

Constants
String LATEST_CHANGES
String MEMENTO
Public Methods
synchronized void applyCommand(TopologyChangeSet iTopologyChangeSet, Map<String, AbstractIPAConfigurationElementList> iReturnMap)
Executing the commands from client to update the topology 1.
synchronized void createIPAEnvFile()
/** Create the IPAEnvironments.xml file from IPA configuration objects passed to it (IPAEnvironments).
synchronized IPAEnvironments createIPAEnvironmentsFromXML(String iXML)
synchronized String getEmptyIPAEnvironmentsXML()
return Empty IPAEnviroments.xml String
synchronized IPAEnvironment getEnvironment(String id)
get environment by id@return
AbstractIPAConfigurationElementList getEnvironmentAndServerList(IPAEnvironments iEnv)
synchronized IPAEnvironment getEnvironmentByServerId(String iServerId)
get environment by server id@return
synchronized List<IPAEnvironment> getEnvironmentList()
get all of the environments in the topology
synchronized List<EnvironmentGroups> getGroupsList()
get all of the groups in the topology
synchronized List<IPAServer> getIPAServersInTheSameEnv(String iServerId)
get a list of servers including the web server by server id, which are in the same environment@return
synchronized IPAServer getIServerByName(String iName)
get server by server name and portnumber only for @return
synchronized List<IPAServer> getIServersInTheSameEnv(String iServerId)
get a list of i-servers by server id, which are in the same environment@return
static IPAEnvironmentWrapper getInstance()
static IPAEnvironmentWrapper getInstance(String file)
synchronized AbstractIPAConfigurationElementList getLatestChanges(String iLatestTimeStamp)
Retrieves the elements with newer time stamps
synchronized IPAServer getServerById(String id)
get server by Id@return
synchronized List<IPAServer> getServerList(String iEnvId, String iServerType)
get all of the servers based on the server type in a specific )environment
synchronized List<IPAServer> getServerList(String iServerType)
get all of the servers based on the server type in the topology
synchronized List<IPAServer> getServerList()
get all of the servers in the topology
synchronized String getXML()
synchronized boolean isExisting(String iId)
synchronized IPAEnvironments reloadIPAEnvironmentsFile(String iRealPath)
synchronized boolean reloadIPAEnvironmentsFromXML(String iXML)
synchronized boolean serverExists(String iName, String iPort, String iType)
synchronized void setStatus(IPAServer iServer, String iStatus)
set the server status
synchronized void setTemplateName(IPAServer iServer, String iTemplateName)
update the template name for the server
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String LATEST_CHANGES

Constant Value: "latestchanges"

public static final String MEMENTO

Constant Value: "memento"

Public Methods

public synchronized void applyCommand (TopologyChangeSet iTopologyChangeSet, Map<String, AbstractIPAConfigurationElementList> iReturnMap)

Executing the commands from client to update the topology 1. the topology has already changed by other client In this case, return the last changes 2. otherwise, return the current changes and memento for undo@return

Throws
CommandIsWrongException
FileIsChangedException
Exception
CommandIsWrongException

public synchronized void createIPAEnvFile ()

/** Create the IPAEnvironments.xml file from IPA configuration objects passed to it (IPAEnvironments).

public synchronized IPAEnvironments createIPAEnvironmentsFromXML (String iXML)

public synchronized String getEmptyIPAEnvironmentsXML ()

return Empty IPAEnviroments.xml String

public synchronized IPAEnvironment getEnvironment (String id)

get environment by id@return

public AbstractIPAConfigurationElementList getEnvironmentAndServerList (IPAEnvironments iEnv)

public synchronized IPAEnvironment getEnvironmentByServerId (String iServerId)

get environment by server id@return

public synchronized List<IPAEnvironment> getEnvironmentList ()

get all of the environments in the topology

public synchronized List<EnvironmentGroups> getGroupsList ()

get all of the groups in the topology

public synchronized List<IPAServer> getIPAServersInTheSameEnv (String iServerId)

get a list of servers including the web server by server id, which are in the same environment@return

public synchronized IPAServer getIServerByName (String iName)

get server by server name and portnumber only for @return

public synchronized List<IPAServer> getIServersInTheSameEnv (String iServerId)

get a list of i-servers by server id, which are in the same environment@return

public static IPAEnvironmentWrapper getInstance ()

Returns
  • The singleton instance

public static IPAEnvironmentWrapper getInstance (String file)

public synchronized AbstractIPAConfigurationElementList getLatestChanges (String iLatestTimeStamp)

Retrieves the elements with newer time stamps

Parameters
iLatestTimeStamp The time stamp for last changes
Returns

public synchronized IPAServer getServerById (String id)

get server by Id@return

public synchronized List<IPAServer> getServerList (String iEnvId, String iServerType)

get all of the servers based on the server type in a specific )environment

public synchronized List<IPAServer> getServerList (String iServerType)

get all of the servers based on the server type in the topology

public synchronized List<IPAServer> getServerList ()

get all of the servers in the topology

public synchronized String getXML ()

Returns
  • the xml string of whole environments

public synchronized boolean isExisting (String iId)

public synchronized IPAEnvironments reloadIPAEnvironmentsFile (String iRealPath)

public synchronized boolean reloadIPAEnvironmentsFromXML (String iXML)

public synchronized boolean serverExists (String iName, String iPort, String iType)

public synchronized void setStatus (IPAServer iServer, String iStatus)

set the server status

public synchronized void setTemplateName (IPAServer iServer, String iTemplateName)

update the template name for the server