|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.adf.web.data.GISResource
com.esri.adf.web.aims.data.AIMSMapResource
public class AIMSMapResource
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> lt;/managed-bean>
Field Summary | |
---|---|
static 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 String |
hostName
The machine name or the URL string to connect ArcIMS Server. |
static String |
IMAGE_RESOURCE_TYPE
The ArcIMS service indicating the type Image Server. |
protected 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 String |
resourceType
The type of ArcIMS Service. |
protected String |
serviceName
The ArcIMS Service name. |
protected String |
userName
The user name to connect the authenticated service. |
Fields inherited from class com.esri.adf.web.data.GISResource |
---|
alias, context, defaultSpatialReference, functionalities, hasFailedFunctionalities, init |
Constructor Summary | |
---|---|
AIMSMapResource()
|
Method Summary | |
---|---|
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. |
String |
getHostName()
Returns the Machine name or URL string of the ArcIMS Server. |
String |
getImageFormat(String format)
Convenient method to return the ArcIMS Service specific map image format from the available list of the Service supported formats. |
String |
getPassword()
Returns the password to connect authenticated service. |
int |
getPort()
Returns the ArcIMS Application Server port number associated with this resource. |
String |
getResourceType()
Returns the type of service based on the service name set. |
String |
getServiceName()
Return the ArcIMS Service that associated with this resource. |
String |
getUserName()
Returns the user name to connect authenticated service. |
void |
init(WebContext webContext)
This method is called by the WebContext to initialize the resource. |
boolean |
isPasswordEncrypted()
Tests whether the given password is encrypted or not. |
void |
setHostName(String hostName)
Set the machine name or URL string of the ArcIMS Server. |
void |
setPassword(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(String serviceName)
Sets the ArcIMS Service for this resource. |
void |
setUserName(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 |
---|
public static final String IMAGE_RESOURCE_TYPE
public static final String ARCMAP_RESOURCE_TYPE
protected com.esri.aims.mtier.io.ConnectionProxy connection
ConnectionProxy
object associated with this resource.
protected String hostName
protected int port
protected String serviceName
protected String resourceType
protected String userName
protected String password
protected boolean passwordEncrypted
Constructor Detail |
---|
public AIMSMapResource()
Method Detail |
---|
public void init(WebContext webContext)
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(String, GISResource)
method. A GISResource
is usable
only after this method has been called.
This method iterates through all its supported GISFunctionality
s 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(); }
init
in interface WebContextInitialize
init
in class GISResource
webContext
- the WebContext
that maintains a reference to this resourceWebContextInitialize.init(com.esri.adf.web.data.WebContext)
,
GISFunctionality.initFunctionality(GISResource)
,
WebContext.init(WebContext)
,
WebContext.addResource(String, GISResource)
public String getAlias()
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.
getAlias
in class GISResource
protected com.esri.aims.mtier.io.ConnectionProxy getConnectionProxy()
ConnectionProxy
object associated with this resource.
ConnectionProxy
objectpublic String getHostName()
public int getPort()
public String getServiceName()
public String getResourceType()
IMAGE_RESOURCE_TYPE
public String getUserName()
public String getPassword()
public boolean isPasswordEncrypted()
public void setHostName(String hostName)
hostName
- the host namepublic void setPort(int port)
port
- the port numberpublic void setServiceName(String serviceName)
serviceName
- the ArcIMS service for this resourcepublic void setUserName(String userName)
userName
- the user namepublic void setPassword(String password)
password
- the password to connect the authenticate servicepublic void setPasswordEncrypted(boolean passwordEncrypted)
passwordEncrypted
- true if password is encrpted; false otherwisepublic String getImageFormat(String format)
format
- the user defined format
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |