com.esri.arcgis.server
Class ServerObjectManager

java.lang.Object
  extended by com.esri.arcgis.server.ServerObjectManager
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, IPermissionsManager, IServerObjectManager, IServerObjectManager2, IServerObjectManager3, IServerObjectManager4, Serializable

public class ServerObjectManager
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IServerObjectManager, IServerObjectManager2, IServerObjectManager3, IServerObjectManager4, IPermissionsManager

The ServerObjectManager object which creates ServerContext, ServerObjectConfigurationInfo and ServerObjectTypeInfo objects.

Remarks

The ServerObjectManager object provides access to information about the GIS server to non-administrators, and creates ServerContexts for use by applications. Any application that runs as a user account in the agsusers user group on the ArcGIS server can use the IGISServerConnection interface to connect to the ArcGIS server and to get a reference to the ServerObjectManager.

A ServerContext is a reserved space within the server dedicated to a set of running objects. GIS server objects also live in a server context. When developing applications with ArcGIS for Server, all ArcObjects that your application creates and uses live within a server context.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

See Also:
ServerObjectManager, ServerObjectType, IAGSServerConnectionAdmin, AGSServerConnectionName, IEnumServerObjectType, IEnumServerDirectory, AGSServerConnection, IServerConnection, ServerObjectTypeInfo, IEnumServerObjectTypeInfo, IAGSServerObject, ServerDirectoryInfo, ServerObjectConfiguration, ServerContext, ServerObjectConfigurationStatus, IAGSServerObjectName, ServerConnection, IAGSServerConnectionName, IAGSEnumServerObjectName, ServerObject, IServerObjectConfigurationInfo, IServerObjectAdmin, AGSServerConnectionFactory, IAGSServerConnectionFactory, IEnumServerObjectConfigurationInfo, IGISServerConnection, IAGSServerConnection, IServerContext, ServerDirectory, ServerObjectConfigurationInfo, IEnumServerMachine, ServerMachine, IServerObjectConfiguration, IServerObjectManager, IServerObjectTypeInfo, IServerMachine, IServerObject, IServerObjectType, GISServerConnection, AGSServerObjectName, ServerObjectAdmin, IEnumServerObjectConfiguration, Serialized Form

Constructor Summary
ServerObjectManager(Object obj)
          Construct a ServerObjectManager using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean checkForDescendentsWithDifferentPermissions(String principal, String resource, String operation)
          Checks whether the specified principal has different permissions among the descendents of the specified parent resource/operation combination.
 boolean checkPermission(String principal, String resource, String operation)
          Checks whether the specified principal has permission to perform the given operation on the indicated resource.
 IServerContext createServerContext(String configName, String typeName)
          Gets a reference to a server context.
 IServiceCatalog2 createServiceCatalog()
          Gets the ServiceCatalog for the services running on the server.
 boolean equals(Object o)
          Compare this object with another
 IServerObjectConfigurationInfo getConfigurationInfo(String name, String typeName)
          Gets the ServerObjectConfigurationInfo for the specified Name and TypeName.
 IEnumServerObjectConfigurationInfo getConfigurationInfos()
          An enumerator over all the GIS server's ServerObjectConfigurationInfos.
 IEnumServerObjectConfigurationInfo getConfigurationInfosEx(String folderName)
          An enumerator over all the ArcGIS server's ServerObjectExtensionInfos in a given folder.
 IEnumServerObjectConfigurationInfo getConfigurationInfosEx2(String folderName, int stat)
          An enumerator over the ArcGIS server's ServerObjectExtensionInfos in a given folder.
 IServerObjectConfigurationStatus getConfigurationStatus(String name, String typeName)
          Get the configuration status for a server object configuration with the specified Name and TypeName.
 IEnumServerObjectExtensionTypeInfo getExtensionTypeInfos(String sOTypeName)
          An enumerator over all the ArcGIS server's ServerObjectExtensionTypeInfos.
 IPropertySet getFolderInfo(String folderName)
          Properties associated with a server configuration folder.
 IEnumBSTR getFolders(String folderName)
          An array of folder names in the server configuration folder.
 IEnumBSTR getPrincipalsWithPermissionOnResource(String resource, String operation)
          Enumerates all principals having permission to perform the specified operation on the given resource.
 IEnumServerDirectoryInfo getServerDirectoryInfos()
          An enumerator over all the GIS server's ServerDirectoryInfos.
 IPropertySet getSystemInfo()
          The properties of the underlying system hardware and software.
 IEnumServerObjectTypeInfo getTypeInfos()
          An enumerator over all the GIS server's ServerObjectTypeInfos.
 int hashCode()
          the hashcode for this object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

ServerObjectManager

public ServerObjectManager(Object obj)
                    throws IOException
Construct a ServerObjectManager using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to ServerObjectManager.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
ServerObjectManager o = (ServerObjectManager)obj; // will not work

ServerObjectManager o = new ServerObjectManager(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems ServerObjectManager theServerObjectManager = (ServerObjectManager) obj;
Method Detail

equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

createServerContext

public IServerContext createServerContext(String configName,
                                          String typeName)
                                   throws IOException,
                                          AutomationException
Gets a reference to a server context. The server context can be based on a specified server object configuration, or can be an empty server context if no server object configuration is specified.

Remarks

The CreateServerContext method on IServerObjectManager is used to get a reference to a context on the server. A context is a process managed by the server within which a server object runs. You can use CreateServerContext to create a context based on a server object configuration, or you can create empty contexts soley for the purpose of creating ArcObjects on the fly within the server.

When using CreateServerContext to create a context based on a server object configuration, if the server object configuration is pooled, you may get a reference to a context that is already created and running in the server. When you have completed using that context, it is important to released it explicitly by calling the ReleaseContext method on IServerContext to return it to the pool. When using CreateServerContext to create a context based on a non-pooled server object configuration, or when creating an empty context, a new context is created on the server. You still need to call ReleaseContext when you are finished using it, and the context is destroyed on the server.

As of 9.3 some of the possible values for typeName are:

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
createServerContext in interface IServerObjectManager
Parameters:
configName - The configName (in)
typeName - The typeName (in)
Returns:
A reference to a com.esri.arcgis.server.IServerContext
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConfigurationInfo

public IServerObjectConfigurationInfo getConfigurationInfo(String name,
                                                           String typeName)
                                                    throws IOException,
                                                           AutomationException
Gets the ServerObjectConfigurationInfo for the specified Name and TypeName.

Remarks

Returns the server configuration with the specified Name and Type as a ServerObjectConfigurationInfo object. The Info object provides information about the server object configuration required to make use of them in an application. This method will only return a ServerObjectConfigurationInfo for configurations which are started. If you call this method and specify a configuration which is not started, it will return an error.

Additional information about started server object configurations, and configurations that are not started can be accessed using the IServerObjectAdmin interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getConfigurationInfo in interface IServerObjectManager
Parameters:
name - The name (in)
typeName - The typeName (in)
Returns:
A reference to a com.esri.arcgis.server.IServerObjectConfigurationInfo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConfigurationInfos

public IEnumServerObjectConfigurationInfo getConfigurationInfos()
                                                         throws IOException,
                                                                AutomationException
An enumerator over all the GIS server's ServerObjectConfigurationInfos.

Remarks

GetConfigurationInfos returns an enumeration (IEnumServerObjectConfigurationInfo) of IServerObjectConfigurationInfo for configurations of any esriConfigurationStatus from all folders.

These Info objects provide information about the server object configurations and types that are required to make use of them in an application. Additional information about server object configurations can be accessed using the IServerObjectAdmin interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getConfigurationInfos in interface IServerObjectManager
Returns:
A reference to a com.esri.arcgis.server.IEnumServerObjectConfigurationInfo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTypeInfos

public IEnumServerObjectTypeInfo getTypeInfos()
                                       throws IOException,
                                              AutomationException
An enumerator over all the GIS server's ServerObjectTypeInfos.

Remarks

Returns and enumeration of server object types in the server as ServerObjectTypeInfo objects. These Info objects provide information about the server object types required to make use of them in an application. Additional information about server object types in the server can be accessed using the IServerObjectAdmin interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTypeInfos in interface IServerObjectManager
Returns:
A reference to a com.esri.arcgis.server.IEnumServerObjectTypeInfo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getServerDirectoryInfos

public IEnumServerDirectoryInfo getServerDirectoryInfos()
                                                 throws IOException,
                                                        AutomationException
An enumerator over all the GIS server's ServerDirectoryInfos.

Remarks

Returns an enumeration of server directories configured in the server as ServerDirectoryInfo objects. These Info objects provide information about the server directories required to make use of them in an application. Additional information about server directories configured in the server can be accessed using the IServerObjectAdmin interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getServerDirectoryInfos in interface IServerObjectManager
Returns:
A reference to a com.esri.arcgis.server.IEnumServerDirectoryInfo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSystemInfo

public IPropertySet getSystemInfo()
                           throws IOException,
                                  AutomationException
The properties of the underlying system hardware and software.

Description

The SystemInfo property returns a PropertySet containing properties indicating the operating system name and messaeg version of the GIS server.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getSystemInfo in interface IServerObjectManager2
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtensionTypeInfos

public IEnumServerObjectExtensionTypeInfo getExtensionTypeInfos(String sOTypeName)
                                                         throws IOException,
                                                                AutomationException
An enumerator over all the ArcGIS server's ServerObjectExtensionTypeInfos.

Remarks

Retrieves an enumeration of IServerObjectTypeInfos from the ArcGIS Server system configuration (Server.cfg). The IServerObjectTypeInfo interface provides the name and description of a server object type.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getExtensionTypeInfos in interface IServerObjectManager2
Parameters:
sOTypeName - The sOTypeName (in)
Returns:
A reference to a com.esri.arcgis.server.IEnumServerObjectExtensionTypeInfo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConfigurationInfosEx

public IEnumServerObjectConfigurationInfo getConfigurationInfosEx(String folderName)
                                                           throws IOException,
                                                                  AutomationException
An enumerator over all the ArcGIS server's ServerObjectExtensionInfos in a given folder.

Remarks

GetConfigurationInfosEx returns an enumeration (IEnumServerObjectConfigurationInfo) of IServerObjectConfigurationInfo for configurations of any esriConfigurationStatus from the folder specified.

Some folderNames have special significance:

folderName == “” means “root”.

folderName == “NULL” means “all folders and root”

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getConfigurationInfosEx in interface IServerObjectManager2
Parameters:
folderName - The folderName (in)
Returns:
A reference to a com.esri.arcgis.server.IEnumServerObjectConfigurationInfo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFolders

public IEnumBSTR getFolders(String folderName)
                     throws IOException,
                            AutomationException
An array of folder names in the server configuration folder.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getFolders in interface IServerObjectManager2
Parameters:
folderName - The folderName (in)
Returns:
A reference to a com.esri.arcgis.system.IEnumBSTR
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFolderInfo

public IPropertySet getFolderInfo(String folderName)
                           throws IOException,
                                  AutomationException
Properties associated with a server configuration folder.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getFolderInfo in interface IServerObjectManager2
Parameters:
folderName - The folderName (in)
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConfigurationStatus

public IServerObjectConfigurationStatus getConfigurationStatus(String name,
                                                               String typeName)
                                                        throws IOException,
                                                               AutomationException
Get the configuration status for a server object configuration with the specified Name and TypeName.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getConfigurationStatus in interface IServerObjectManager2
Parameters:
name - The name (in)
typeName - The typeName (in)
Returns:
A reference to a com.esri.arcgis.server.IServerObjectConfigurationStatus
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConfigurationInfosEx2

public IEnumServerObjectConfigurationInfo getConfigurationInfosEx2(String folderName,
                                                                   int stat)
                                                            throws IOException,
                                                                   AutomationException
An enumerator over the ArcGIS server's ServerObjectExtensionInfos in a given folder.

Remarks

GetConfigurationInfosEx2 returns an enumeration (IEnumServerObjectConfigurationInfo) of IServerObjectConfigurationInfo for configurations of a specific esriConfigurationStatus from the folder specified.

Some folderNames have special significance:

folderName == “” means “root”.

folderName == “NULL” means “all folders and root”

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getConfigurationInfosEx2 in interface IServerObjectManager3
Parameters:
folderName - The folderName (in)
stat - A com.esri.arcgis.server.esriConfigurationStatus constant (in)
Returns:
A reference to a com.esri.arcgis.server.IEnumServerObjectConfigurationInfo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createServiceCatalog

public IServiceCatalog2 createServiceCatalog()
                                      throws IOException,
                                             AutomationException
Gets the ServiceCatalog for the services running on the server.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
createServiceCatalog in interface IServerObjectManager4
Returns:
A reference to a com.esri.arcgis.server.IServiceCatalog2
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

checkPermission

public boolean checkPermission(String principal,
                               String resource,
                               String operation)
                        throws IOException,
                               AutomationException
Checks whether the specified principal has permission to perform the given operation on the indicated resource.

Remarks

Use the CheckPermissions method to query the server object manager for whether the given roles have permissions to perform all operations on an indicated resource.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
checkPermission in interface IPermissionsManager
Parameters:
principal - The principal (in)
resource - The resource (in)
operation - The operation (in)
Returns:
The pbRes
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPrincipalsWithPermissionOnResource

public IEnumBSTR getPrincipalsWithPermissionOnResource(String resource,
                                                       String operation)
                                                throws IOException,
                                                       AutomationException
Enumerates all principals having permission to perform the specified operation on the given resource.

Remarks

Use the GetPrincipalsWithPermissionsOnResource method to query the server object manager for the roles that have permissions for all operations on the indicated resource.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getPrincipalsWithPermissionOnResource in interface IPermissionsManager
Parameters:
resource - The resource (in)
operation - The operation (in)
Returns:
A reference to a com.esri.arcgis.system.IEnumBSTR
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

checkForDescendentsWithDifferentPermissions

public boolean checkForDescendentsWithDifferentPermissions(String principal,
                                                           String resource,
                                                           String operation)
                                                    throws IOException,
                                                           AutomationException
Checks whether the specified principal has different permissions among the descendents of the specified parent resource/operation combination.

Remarks

Use the CheckForDescendentsWithDifferentPermissions method to query the server object manager as to whether the indicated resource has children that have permissions with different permissions.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
checkForDescendentsWithDifferentPermissions in interface IPermissionsManager
Parameters:
principal - The principal (in)
resource - The resource (in)
operation - The operation (in)
Returns:
The pbRes
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.