|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.adf.web.ags.data.edit.bean.ResourceBean
public class ResourceBean
Defines all the dependencies for the edit bean, e.g. feature layers, workspaces. The object has an auto-cache mechanism. You can call dispose() method to release the cache.
Constructor Summary | |
---|---|
ResourceBean(AGSLocalMapResource resource)
Deprecated. |
|
ResourceBean(AGSLocalMapResource resource,
String version,
ConfigBean config)
Instantiates an object of ResourceBean from a given resource. |
Method Summary | |
---|---|
void |
clearAllSelection()
Removes the highlight of the selection from the map. |
void |
clearAllVertices(WebGraphics graphic)
Turnoff vertices on map. |
void |
clearSelection(Integer layerID)
Clears the selection on the layer. |
void |
clearVertices(Integer layerID,
WebGraphics graphic)
Turns off vertices. |
void |
discard()
Discards all the changes, and releases the workspace. |
void |
dispose()
Releases all the cached resources. |
protected void |
finalize()
|
void |
fireUnselectedEvent(ActionEventListener eventListener,
WebContext context,
Integer layerID,
boolean removeAll)
Fires a FeatureUnselectedEvent to the given listener. |
ActionContext |
getActionContext(Integer layerID,
WebContext context)
Creates an ActionContext from a WebContext object for the given layer. |
Map<Integer,com.esri.arcgis.carto.IFeatureLayer> |
getAllFeatureLayers()
Gets all feature layers from the IMap. |
com.esri.arcgis.carto.IFeatureLayer |
getFeatureLayer(Integer layerID)
Gets a feature layer by the given layer index.. |
Map<Integer,com.esri.arcgis.carto.IFeatureLayer> |
getFeatureLayers()
Gets valid feature layers from the IMap, only the layers conform the current config will be returned. |
com.esri.arcgisws.LayerDescription |
getLayerDescription(Integer layerID)
Gets the LayerDescription by the given layer index. |
int |
getOID(Integer layerID,
int index)
Gets the selected feature by index. |
AGSLocalMapResource |
getResource()
Gets the map service. |
Attribute[] |
getSelectedAttributes(Integer layerID,
int indexOID,
AttributeFilter filter,
DateFormat dateFormat)
Gets all attributes of the current selected feature. |
int[] |
getSelection(Integer layerID)
Gets the feature selection on the given layer. |
com.esri.arcgis.geodatabase.IFeatureCursor |
getSelectionCusor(Integer layerID)
Gets the feature cursor of the feature selections on the given layer. |
com.esri.arcgis.server.IServerContext |
getServerContext()
Gets the IServerContext associated with the map service. |
EditBean.GeometryType |
getShapeType(Integer layerID)
Gets the geometry type of the layer. |
SnapHandler |
getSnapHandler()
Gets the SnapHandler associated with this map service. |
SnapRulesBean[] |
getSnapRules()
Gets the snap rules. |
SnapRulesBean |
getSnapRules(Integer layerId)
Gets the snap rules for the given layer. |
Map<Integer,LayerDefinition> |
getWebLayerDefinition()
The LayerDefinitions are defined in faces-config.xml. |
EditWorkspace |
getWorkspace(Integer layerID)
Gets the workspace associated with the layer. |
boolean |
hasEdits()
Returns true if there are edits available. |
boolean |
hasRedo()
Returns true if the action can be redo. |
boolean |
hasSelection(Integer layerID)
Returns true if there are features selected on the given layer. |
boolean |
hasUndo()
Return true if the action can be undo. |
boolean |
hasVertices(Integer layerID)
Returns true if the show vertices is enabled on the given layer. |
boolean |
isBeingEdited()
Returns true if it is in the middle of a editing session. |
boolean |
isPooled()
Returns true if the map service is pooled. |
boolean |
isSnapEnabled()
Returns true if snapping is enabled. |
void |
process(WebContext context,
EditAction action,
Integer layerID,
boolean updateSelection,
ActionEventListener editEventListener)
Processes the action. |
void |
redo()
Redo the action |
void |
reset(String newversion,
ConfigBean configBean)
Resets ResourceBean with the given version. |
void |
save()
Saves all the changes and releases the workspace. |
void |
setHighLightColor(com.esri.arcgisws.RgbColor color)
Sets the highlight color on the map service. |
void |
setWebLayerDefinition(Map<Integer,LayerDefinition> webLayerDefinition)
The LayerDefinitions are defined in faces-config.xml. |
void |
showVertices(Integer layerID,
WebGraphics graphic,
WebSimpleMarkerSymbol sms,
WebSpatialReference webref)
Shows vertices on the selected features. |
void |
undo()
Undo the previous action. |
void |
updateSelection(Integer layerID)
Updated the selection feature on the given layer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceBean(AGSLocalMapResource resource, String version, ConfigBean config) throws Exception
resource
- a map service.version
- the working version of the workspace. Set to null for non-versioned editing.
Exception
@Deprecated public ResourceBean(AGSLocalMapResource resource)
resource
- a map service.Method Detail |
---|
public void reset(String newversion, ConfigBean configBean) throws Exception
newversion
- The version to set.
Exception
public void dispose()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public AGSLocalMapResource getResource()
public SnapRulesBean[] getSnapRules()
public SnapRulesBean getSnapRules(Integer layerId)
public boolean isSnapEnabled()
public com.esri.arcgisws.LayerDescription getLayerDescription(Integer layerID) throws Exception
layerID
- the layer index.
Exception
public com.esri.arcgis.carto.IFeatureLayer getFeatureLayer(Integer layerID) throws Exception
layerID
- the layer index.
Exception
public EditBean.GeometryType getShapeType(Integer layerID)
layerID
- the layer index.
public com.esri.arcgis.server.IServerContext getServerContext()
public Map<Integer,com.esri.arcgis.carto.IFeatureLayer> getFeatureLayers() throws Exception
Exception
public Map<Integer,com.esri.arcgis.carto.IFeatureLayer> getAllFeatureLayers() throws Exception
Exception
public void updateSelection(Integer layerID)
layerID
- public void fireUnselectedEvent(ActionEventListener eventListener, WebContext context, Integer layerID, boolean removeAll)
updateSelection(Integer)
.
eventListener
- the event listener.context
- the WebContext.layerID
- the current layer ID.removeAll
- set to sure if all the selected features have been unselected.public boolean hasSelection(Integer layerID)
layerID
- the layer index.public boolean hasVertices(Integer layerID)
layerID
- the layer index.public int getOID(Integer layerID, int index)
layerID
- the layer index.index
- the feature index in the selection.
public int[] getSelection(Integer layerID)
layerID
- layer index.
public ActionContext getActionContext(Integer layerID, WebContext context) throws Exception
layerID
- the layer index.context
- the current WebContext
Exception
public EditWorkspace getWorkspace(Integer layerID) throws Exception
layerID
- the index of the layer.
Exception
public void process(WebContext context, EditAction action, Integer layerID, boolean updateSelection, ActionEventListener editEventListener) throws Exception
context
- the current webcontext.action
- the action to processlayerID
- the target layer index.updateSelection
- set to true is the action will update the feature selection.editEventListener
- the listener to handler the action events.
Exception
public boolean hasEdits()
public boolean isBeingEdited()
public void clearSelection(Integer layerID) throws Exception
layerID
- the layer index.
Exception
public void clearVertices(Integer layerID, WebGraphics graphic)
layerID
- the layer ID.graphic
- the web graphics reference from web context.public void clearAllVertices(WebGraphics graphic)
graphic
- the web graphics.public boolean isPooled()
public com.esri.arcgis.geodatabase.IFeatureCursor getSelectionCusor(Integer layerID) throws Exception
layerID
- the layer index.
Exception
public Attribute[] getSelectedAttributes(Integer layerID, int indexOID, AttributeFilter filter, DateFormat dateFormat) throws Exception
layerID
- the layer index.indexOID
- the index of the selected feature.filter
- the attribute filter.dateFormat
- the date format for date data.
Exception
public void showVertices(Integer layerID, WebGraphics graphic, WebSimpleMarkerSymbol sms, WebSpatialReference webref) throws Exception
layerID
- the layer index.graphic
- web graphics from web contextsms
- vertex symbol
Exception
public void clearAllSelection() throws Exception
Exception
public void save() throws Exception
Exception
public void discard() throws Throwable
Throwable
public boolean hasUndo()
public boolean hasRedo()
public void redo() throws Exception
Exception
public void undo() throws Exception
Exception
public SnapHandler getSnapHandler() throws Exception
Exception
public void setHighLightColor(com.esri.arcgisws.RgbColor color)
color
- the color to set.public Map<Integer,LayerDefinition> getWebLayerDefinition()
public void setWebLayerDefinition(Map<Integer,LayerDefinition> webLayerDefinition)
webLayerDefinition
- The webLayerDefinition to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |