Esri Geoportal Server
1.0

com.esri.gpt.control.publication
Class EditMetadataController

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

public class EditMetadataController
extends BaseActionListener

Controller for the online metadata editor.


Constructor Summary
EditMetadataController()
          Default constructor.
 
Method Summary
 List<SelectItem> getCreateSchemaItems()
          Gets the list of schema's that can be created with the editor.
 String getCreateSchemaKey()
          Gets the schema key selected from the create metadata page.
 HarvestContext getHarvestContext()
           
 String getNewUuid()
          Creates a new UUID.
 String getNow()
          Returns the current data in yyyy-MM-dd format.
 String getOnBehalfOf()
          Gets the key of publisher this document is being created on behalf of.
 String getOpenDocumentStatus()
          Gets the open document status.
 String getOpenDocumentUuid()
          Gets the UUID of the document currently open within the editor.
 String getOpenSchemaKey()
          Gets the key of the schema currently open within the editor.
 String getOperation()
          Gets 'add' operation type.
 HtmlPanelGroup getSectionsPanelGroup()
          Gets the bound HtmlPanelGroup for the sections panel.
 SelectablePublishers getSelectablePublishers()
          Gets the list of selectable publishers.
 UserAttributeMap getUserProfile()
          Gets the active user's profile.
protected  void onPrepareView(RequestContext context)
          Fired when the getPrepareView() property is accessed.
protected  void processSubAction(ActionEvent event, RequestContext context)
          Handles events from the metadata editor.
 void setCreateSchemaKey(String key)
          Sets the schema key selected from the create metadata page.
 void setHarvestContext(HarvestContext harvestContext)
           
 void setOnBehalfOf(String key)
          Sets the key of publisher this document is being created on behalf of.
 void setOpenDocumentStatus(String status)
          Sets the open document status.
 void setOpenDocumentUuid(String uuid)
          Sets the UUID of the document currently open within the editor.
 void setOpenSchemaKey(String key)
          Sets the key of the schema currently open within the editor.
 void setOperation(String addOperation)
          Sets 'add' operation type.
 void setSectionsPanelGroup(HtmlPanelGroup htmlPanelGroup)
          Sets the bound HtmlPanelGroup for the sections panel.
 
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
 

Constructor Detail

EditMetadataController

public EditMetadataController()
Default constructor.

Method Detail

getCreateSchemaItems

public List<SelectItem> getCreateSchemaItems()
Gets the list of schema's that can be created with the editor.

Returns:
the list of schema's

getCreateSchemaKey

public String getCreateSchemaKey()
Gets the schema key selected from the create metadata page.

Returns:
the key associated with the schema to create

setCreateSchemaKey

public void setCreateSchemaKey(String key)
Sets the schema key selected from the create metadata page.

Parameters:
key - the key associated with the schema to create

getNewUuid

public String getNewUuid()
Creates a new UUID.

This method is typically used when binding a default parameter value from the schema definition XML. Example:
<<input type="text" defaultValue="#{EditMetadataController.newUuid}"/>

Returns:
then new UUID

getNow

public String getNow()
Returns the current data in yyyy-MM-dd format.

This method is typically used when binding a default parameter value from the schema definition XML. Example:
<<input type="text" defaultValue="#{EditMetadataController.now}"/>

Returns:
then new UUID

getOnBehalfOf

public String getOnBehalfOf()
Gets the key of publisher this document is being created on behalf of.

Returns:
the publisher key

setOnBehalfOf

public void setOnBehalfOf(String key)
Sets the key of publisher this document is being created on behalf of.

Parameters:
key - the publisher key

getOpenDocumentStatus

public String getOpenDocumentStatus()
Gets the open document status.
This value is empty for documents being created.

Returns:
the current document status (trimmed, never null)

setOpenDocumentStatus

public void setOpenDocumentStatus(String status)
Sets the open document status.
This value is empty for documents being created.

Parameters:
status - the currently open document status

getOpenDocumentUuid

public String getOpenDocumentUuid()
Gets the UUID of the document currently open within the editor.
This value is empty for documents being created.

Returns:
the currently open document UUID

setOpenDocumentUuid

public void setOpenDocumentUuid(String uuid)
Sets the UUID of the document currently open within the editor.
This value is empty for documents being created.

Parameters:
uuid - the currently open document UUID

getOpenSchemaKey

public String getOpenSchemaKey()
Gets the key of the schema currently open within the editor.

Returns:
the currently open schema key

setOpenSchemaKey

public void setOpenSchemaKey(String key)
Sets the key of the schema currently open within the editor.

Parameters:
key - the currently open schema key

getSectionsPanelGroup

public HtmlPanelGroup getSectionsPanelGroup()
Gets the bound HtmlPanelGroup for the sections panel.
This object is used during the Faces component binding process.

Returns:
the bound HtmlPanelGroup

setSectionsPanelGroup

public void setSectionsPanelGroup(HtmlPanelGroup htmlPanelGroup)
Sets the bound HtmlPanelGroup for the sections panel.
This object is used during the Faces component binding process.

Parameters:
htmlPanelGroup - the bound HtmlPanelGroup

getSelectablePublishers

public SelectablePublishers getSelectablePublishers()
Gets the list of selectable publishers.

Returns:
the list of selectable publishers

getOperation

public String getOperation()
Gets 'add' operation type.

Returns:
add operation type

setOperation

public void setOperation(String addOperation)
Sets 'add' operation type.

Parameters:
addOperation - add operation type

getUserProfile

public UserAttributeMap getUserProfile()
Gets the active user's profile.

Returns:
the user profile

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 events from the metadata editor.
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

getHarvestContext

public HarvestContext getHarvestContext()
Returns:
the _harvestContext

setHarvestContext

public void setHarvestContext(HarvestContext harvestContext)
Parameters:
harvestContext - the _harvestContext to set

Esri Geoportal Server
1.0

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