Esri Geoportal Server
1.0

com.esri.gpt.control.publication
Class UploadMetadataController

java.lang.Object
  extended by com.esri.gpt.framework.jsf.BaseActionListener
      extended by com.esri.gpt.control.publication.UploadMetadataController
All Implemented Interfaces:
EventListener, ActionListener, FacesListener

public class UploadMetadataController
extends BaseActionListener

Handles a metadata file upload action.


Nested Class Summary
static class UploadMetadataController.UploadOptions
          Stores session based upload options for the controller.
 
Field Summary
static String SPECIFICATIONMETHOD_BROWSE
          class variables =========================================================
static String SPECIFICATIONMETHOD_EXPLICIT
           
 
Constructor Summary
UploadMetadataController()
          Default constructor.
 
Method Summary
 boolean getCanPublishAsProxy()
          Gets the flag indicating if the user can publish on behalf of another.
 String getExplicitPath()
          Gets the explicit path of the file to upload.
 UploadMetadataController.UploadOptions getOptions()
          Gets the upload options.
 SelectablePublishers getSelectablePublishers()
          Gets list of selectable publishers.
 String getSpecificationMethod()
          Gets the file specification method.
 String getStyleForBrowseMethod()
          Gets the style attribute for "browse" specificication panel.
 String getStyleForExplicitMethod()
          Gets the style attribute for "explicit" specificication panel.
protected  void onPrepareView(RequestContext context)
          Fired when the getPrepareView() property is accessed.
protected  void processSubAction(ActionEvent event, RequestContext context)
          Handles a metadata file upload action.
 void setExplicitPath(String path)
          Sets the explicit path of the file to upload.
 void setOptions(UploadMetadataController.UploadOptions options)
          Sets the upload options.
 void setSpecificationMethod(String method)
          Sets the file specification method.
 
Methods inherited from class com.esri.gpt.framework.jsf.BaseActionListener
assertLoggedIn, authorizeAction, extractMessageBroker, extractRequestContext, getContextBroker, getKey, getLogger, getNavigationOutcome, getPrepareView, getSecurityRoles, getSecurityRoleSet, handleException, onExecutionPhaseCompleted, onExecutionPhaseStarted, onPrepareViewCompleted, onPrepareViewStarted, processAction, setKey, setNavigationOutcome, setPrepareView, setSecurityRoles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPECIFICATIONMETHOD_BROWSE

public static final String SPECIFICATIONMETHOD_BROWSE
class variables =========================================================

See Also:
Constant Field Values

SPECIFICATIONMETHOD_EXPLICIT

public static final String SPECIFICATIONMETHOD_EXPLICIT
See Also:
Constant Field Values
Constructor Detail

UploadMetadataController

public UploadMetadataController()
Default constructor.

Method Detail

getCanPublishAsProxy

public boolean getCanPublishAsProxy()
Gets the flag indicating if the user can publish on behalf of another.

Returns:
truw id proxy publishing is enabled

getExplicitPath

public String getExplicitPath()
Gets the explicit path of the file to upload.
The explicit path can be a URL or a path recognized on the server.

Returns:
the explicit path

setExplicitPath

public void setExplicitPath(String path)
Sets the explicit path of the file to upload.
The explicit path can be a URL or a path recognized on the server.

Parameters:
path - the explicit path

getOptions

public UploadMetadataController.UploadOptions getOptions()
Gets the upload options.

Returns:
the upload options

setOptions

public void setOptions(UploadMetadataController.UploadOptions options)
Sets the upload options.

Parameters:
options - the upload options

getSelectablePublishers

public SelectablePublishers getSelectablePublishers()
Gets list of selectable publishers.

Returns:
the list of selectable publishers

getSpecificationMethod

public String getSpecificationMethod()
Gets the file specification method.

Returns:
the file specification method

setSpecificationMethod

public void setSpecificationMethod(String method)
Sets the file specification method.

Parameters:
method - the file specification method

getStyleForBrowseMethod

public String getStyleForBrowseMethod()
Gets the style attribute for "browse" specificication panel.

Returns:
the style (display none or block)

getStyleForExplicitMethod

public String getStyleForExplicitMethod()
Gets the style attribute for "explicit" specificication panel.

Returns:
the style (display none or block)

onPrepareView

protected void onPrepareView(RequestContext context)
                      throws Exception
Fired when the getPrepareView() property is accessed.
This event is triggered from the page during the render response phase of the JSF cycle.

Overrides:
onPrepareView in class BaseActionListener
Parameters:
context - the context associated with the active request
Throws:
Exception - if an exception occurs

processSubAction

protected void processSubAction(ActionEvent event,
                                RequestContext context)
                         throws AbortProcessingException,
                                Exception
Handles a metadata file upload action.
This is the default entry point for a sub-class of BaseActionListener.
This BaseActionListener handles the JSF processAction method and invokes the processSubAction method of the sub-class.

Overrides:
processSubAction in class BaseActionListener
Parameters:
event - the associated JSF action event
context - the context associated with the active request
Throws:
AbortProcessingException - if processing should be aborted
Exception - if an exception occurs

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.