com.esri.adf.web.aims.data
Class AIMSMapResource

java.lang.Object
  extended bycom.esri.adf.web.data.GISResource
      extended bycom.esri.adf.web.aims.data.AIMSMapResource
All Implemented Interfaces:
java.io.Serializable, WebContextInitialize, WebLifecycle

public class AIMSMapResource
extends GISResource

This class maintains the ArcIMS Resource information. For example the ArcIMS Server Machine name, Port number, Service name etc. It makes TCP or HTTP connection to the specified ArcIMS Server based on the machine name. If the Machine name start with "http" it makes HTTP connection otherwise TCP. In case of TCP Connection the application port number is required. The user name and the password are required properties if the given service name is authenticated.

Resource can be added using JSF managed bean configuration as shown below,

 <managed-bean>
  <managed-bean-name>aimsResource</managed-bean-name>
  <managed-bean-class>com.esri.adf.web.aims.data.AIMSMapResource</managed-bean-class>
  <managed-bean-scope>none</managed-bean-scope>
  <managed-property>
    <property-name>hostName</property-name>
    <value>http://machinename</value>
  </managed-property>
  <managed-property>
    <property-name>serviceName</property-name>
    <value>ServiceName</value>
  </managed-property>
  <managed-property>
    <property-name>functionalities</property-name>
    <map-entries>
      <map-entry>
        <key>map</key>
        <value>#{aimsMap}</value>
      </map-entry>
      <map-entry>
        <key>overview</key>
        <value>#{aimsOverview}</value>
      </map-entry>
      <map-entry>
        <key>toc</key>
        <value>#{aimsToc}</value>
      </map-entry>
      <map-entry>
        <key>query</key>
        <value>#{aimsQuery}</value>
      </map-entry>
      <map-entry>
        <key>geocode</key>
        <value>#{aimsGeocode}</value>
      </map-entry>
    </map-entries>
  </managed-property>
</managed-bean>

 

See Also:
Serialized Form

Field Summary
static java.lang.String ARCMAP_RESOURCE_TYPE
          The ArcIMS service indicating the type Image Server ArcMap.
protected  com.esri.aims.mtier.io.ConnectionProxy connection
          The ConnectionProxy object associated with this resource.
protected  java.lang.String hostName
          The machine name or the URL string to connect ArcIMS Server.
static java.lang.String IMAGE_RESOURCE_TYPE
          The ArcIMS service indicating the type Image Server.
protected  java.lang.String password
          The password to connect the authenticated service.
protected  boolean passwordEncrypted
          Indicating whether the password is encrpyted or not.
protected  int port
          The Application server port to connect ArcIMS Server.
protected  java.lang.String resourceType
          The type of ArcIMS Service.
protected  java.lang.String serviceName
          The ArcIMS Service name.
protected  java.lang.String userName
          The user name to connect the authenticated service.
 
Fields inherited from class com.esri.adf.web.data.GISResource
alias, context, defaultSpatialReference, functionalities, init
 
Constructor Summary
AIMSMapResource()
           
 
Method Summary
 java.lang.String getAlias()
           Returns a reader friendly name for this resource.
protected  com.esri.aims.mtier.io.ConnectionProxy getConnectionProxy()
          Returns the ConnectionProxy object associated with this resource.
 java.lang.String getHostName()
          Returns the Machine name or URL string of the ArcIMS Server.
 java.lang.String getPassword()
          Returns the password to connect authenticated service.
 int getPort()
          Returns the ArcIMS Application Server port number associated with this resource.
 java.lang.String getResourceType()
          Returns the type of service based on the service name set.
 java.lang.String getServiceName()
          Return the ArcIMS Service that associated with this resource.
 java.lang.String getUserName()
          Returns the user name to connect authenticated service.
 void init(WebContext context)
           This method is called by the WebContext to initialize the resource.
 boolean isPasswordEncrypted()
          Tests whether the given password is encrypted or not.
 void setHostName(java.lang.String hostName)
          Set the machine name or URL string of the ArcIMS Server.
 void setPassword(java.lang.String password)
          Sets the password to connect the authenticate service.
 void setPasswordEncrypted(boolean passwordEncrypted)
          Sets to true if the given password is encrpted.
 void setPort(int port)
          Sets the ArcIMS Application Server port number associated with this resource.
 void setServiceName(java.lang.String serviceName)
          Sets the ArcIMS Service for this resource.
 void setUserName(java.lang.String userName)
          Sets the user name to connect the authenticate service.
 
Methods inherited from class com.esri.adf.web.data.GISResource
activate, addFunctionality, destroy, getDefaultSpatialReference, getFunctionalities, getFunctionality, getWebContext, passivate, setAlias, setFunctionalities
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMAGE_RESOURCE_TYPE

public static final java.lang.String IMAGE_RESOURCE_TYPE
The ArcIMS service indicating the type Image Server.

See Also:
Constant Field Values

ARCMAP_RESOURCE_TYPE

public static final java.lang.String ARCMAP_RESOURCE_TYPE
The ArcIMS service indicating the type Image Server ArcMap.

See Also:
Constant Field Values

connection

protected com.esri.aims.mtier.io.ConnectionProxy connection
The ConnectionProxy object associated with this resource.


hostName

protected java.lang.String hostName
The machine name or the URL string to connect ArcIMS Server.


port

protected int port
The Application server port to connect ArcIMS Server. By default the port number is 5300.


serviceName

protected java.lang.String serviceName
The ArcIMS Service name.


resourceType

protected java.lang.String resourceType
The type of ArcIMS Service.


userName

protected java.lang.String userName
The user name to connect the authenticated service.


password

protected java.lang.String password
The password to connect the authenticated service.


passwordEncrypted

protected boolean passwordEncrypted
Indicating whether the password is encrpyted or not.

Constructor Detail

AIMSMapResource

public AIMSMapResource()
Method Detail

init

public void init(WebContext context)
Description copied from class: GISResource

This method is called by the WebContext to initialize the resource. This is typically called when the context itself is initialized or when users add a new resource to the context by using the WebContext#addResource(GISResource) method. A GISResource is usable only after this method has been called.

This method iterates through all its supported GISFunctionalitys and calls the GISFunctionality.initFunctionality(GISResource) on them all.

Sub-classes that want to do custom initialization should override this method and make the super call first before doing the custom stuff:

 public void init(WebContext context) {
   super.init(context);
   myInit();
 }
 

Specified by:
init in interface WebContextInitialize
Overrides:
init in class GISResource
Parameters:
context - the WebContext that maintains a reference to this resource
See Also:
WebContextInitialize.init(com.esri.adf.web.data.WebContext), GISFunctionality.initFunctionality(GISResource), WebContext.init(WebContext), WebContext#addResource(resourceId, GISResource)

getAlias

public java.lang.String getAlias()
Description copied from class: GISResource

Returns a reader friendly name for this resource.

It is a good practice for users to explicitly set an alias when the resource is created programmatically or declaratively. Resource providers should provide an auto-generated alias anyway in case users don't explicitly set an alias themselves.

Overrides:
getAlias in class GISResource
Returns:
a reader friendly name for this resource

getConnectionProxy

protected com.esri.aims.mtier.io.ConnectionProxy getConnectionProxy()
Returns the ConnectionProxy object associated with this resource.

Returns:
the ConnectionProxy object

getHostName

public java.lang.String getHostName()
Returns the Machine name or URL string of the ArcIMS Server.

Returns:
the host name

getPort

public int getPort()
Returns the ArcIMS Application Server port number associated with this resource. By default the port number is 5300.

Returns:
the port number

getServiceName

public java.lang.String getServiceName()
Return the ArcIMS Service that associated with this resource.

Returns:
the service name associated with this resource

getResourceType

public java.lang.String getResourceType()
Returns the type of service based on the service name set. By default it is AIMSMapResource.IMAGE_RESOURCE_TYPE

Returns:
the service type

getUserName

public java.lang.String getUserName()
Returns the user name to connect authenticated service.

Returns:
the user name

getPassword

public java.lang.String getPassword()
Returns the password to connect authenticated service.

Returns:
the password

isPasswordEncrypted

public boolean isPasswordEncrypted()
Tests whether the given password is encrypted or not. By default the password is not encrypted "false".

Returns:
true if password is encrypted; false otherwise

setHostName

public void setHostName(java.lang.String hostName)
Set the machine name or URL string of the ArcIMS Server. For eg, in case of TCP connection "MACHINENAME", for HTTP connection "http://www.geographynetwork.com"

Parameters:
hostName - the host name

setPort

public void setPort(int port)
Sets the ArcIMS Application Server port number associated with this resource. By default the port number is 5300. This is required if connection is of type TCP.

Parameters:
port - the port number

setServiceName

public void setServiceName(java.lang.String serviceName)
Sets the ArcIMS Service for this resource. The specified service should be of type ImageServer or ImageServerArcMap

Parameters:
serviceName - the ArcIMS service for this resource

setUserName

public void setUserName(java.lang.String userName)
Sets the user name to connect the authenticate service.

Parameters:
userName - the user name

setPassword

public void setPassword(java.lang.String password)
Sets the password to connect the authenticate service.

Parameters:
password - the password to connect the authenticate service

setPasswordEncrypted

public void setPasswordEncrypted(boolean passwordEncrypted)
Sets to true if the given password is encrpted.

Parameters:
passwordEncrypted - true if password is encrpted; false otherwise