atg.epub.servlet
Class RepositoryAssetFormHandler

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.droplet.EmptyFormHandler
              extended by atg.droplet.GenericFormHandler
                  extended by atg.repository.servlet.RepositoryFormHandler
                      extended by atg.epub.servlet.RepositoryAssetFormHandler
All Implemented Interfaces:
DropletFormHandler, atg.epub.servlet.AssetFormHandler, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, RepositoryFormConstants, RepositoryFormData, java.util.EventListener

public class RepositoryAssetFormHandler
extends RepositoryFormHandler
implements atg.epub.servlet.AssetFormHandler

RepositoryAssetFormHandler (Moved from EPubAssetFormHandler, file upload functionality removed) Subclass of atg.repository.servlet.RepositoryFormHandler for creating, saving, deleting assets and projects in publishing.

useRequestLocale When set to true, form handler exception messages are retrieved using the locale of the current request.


Field Summary
static java.lang.String CLASS_VERSION
           
protected static java.lang.String MSG_UNABLE_TO_ADD_ITEM_TO_PROPERTY
           
protected static java.lang.String MSG_UNABLE_TO_GET_UPDATEABLE_ITEM
           
protected static java.lang.String MSG_UPDATEABLE_CONTENT_ITEM_ERROR
           
protected static java.lang.String MSG_UPDATEABLE_ITEM_CONFIG_ERROR
           
protected static java.lang.String UPDATE_KEY
           
 
Fields inherited from class atg.repository.servlet.RepositoryFormHandler
STATUS_ERROR_REDIRECT, STATUS_ERROR_STAY, STATUS_SUCCESS
 
Fields inherited from class atg.droplet.GenericFormHandler
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.repository.servlet.RepositoryFormConstants
NULL_SENTINEL, REPOSITORY_ID_PROPERTY_NAME, RESOURCE_BUNDLE_NAME, UPDATE_APPEND, UPDATE_PREPEND, UPDATE_REMOVE, UPDATE_REPLACE
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
RepositoryAssetFormHandler()
           
 
Method Summary
 void afterGet(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Override this method to set form handler's attributes into the context
 void beforeGet(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called when a form is rendered that references this bean.
 boolean beforeSet(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called before any setX methods on this form are set when a form that modifies properties of this form handler is submitted.
protected  MutableRepositoryItem createTransientItem()
          Creates a new, empty repository item, does not add new item persistently to the repository.
 java.lang.String getActionType()
           
 java.lang.String getActionURL()
           
 java.lang.Object getAssetEditor()
          This form handler edits its own assets
 atg.epub.servlet.AssetInfo getAssetInfo()
           
protected  atg.epub.servlet.AssetInfo getAssetInfoFromRequest(DynamoHttpServletRequest pRequest)
           
 java.lang.String getAssetInfoPath()
           
 java.lang.String getAssetURI()
          Get the asset URI.
 java.util.Map getAttributes()
          Get the attributes set in the form's mapping
 java.lang.String getComponentPath()
           
 int getContextOp()
           
 UploadedFile getDataFromUploadedFile(boolean pFileRequired, UploadedFile pUploadedFile, int pMaxMegabytes, java.lang.String pFileSizePropertyName, java.lang.String pMimeTypePropertyName, java.lang.String pFileDataPropertyName, java.lang.String pFilenamePropertyName, java.lang.String pParentFolderPropertyName, atg.repository.content.ContentPropertyItemDescriptor pContentDescriptor, java.lang.String pPathPropertyName, java.lang.String pLastModifiedPropertyName, atg.epub.util.FileValidator pValidator)
           
 java.lang.String getDisplayName()
           
 java.lang.String getEncodedPathAndItemType()
           
 java.lang.String getId()
           
 java.lang.String[] getIllegalIdCharacters()
           
 java.lang.Object getItem()
           
 java.lang.String getItemDisplayName()
           
 java.lang.String getItemType()
           
 RepositoryItem getRepositoryItem()
          Returns the repository item (if any) to edit from this form handler This is retrieved based on the repository, itemDescriptorName, and repositoryId properties;
protected  javax.transaction.TransactionManager getTransactionManager()
          Returns the transaction manager for the repository that we are using
 MutableRepositoryItem getTransientRepositoryItem()
          Get the transient item.
 java.lang.String getView()
          Return the index to the current asset view as a string.
protected  RepositoryItemDescriptor getWrappedItemDescriptor()
           
 boolean handleChangeView(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called when user changes view or current item.
 boolean handleContextChange(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
           
 boolean handleCreateTransient(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
           
 boolean handleDelete(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Deletes the item specified by the repositoryId property from the repository.
 boolean handleSubmitAction(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          A handler method that delegates to other handler methods base on the value of the 'actionType' property.
 boolean handleSubmitAction(javax.portlet.PortletRequest pRequest, javax.portlet.PortletResponse pResponse)
           
 boolean handleUpdate(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Takes the current set of property values set as members of the value property and, if there were no errors in submitting the form, modifies the item described by the repositoryId property with these values.
 boolean isEditMode()
           
 boolean isTransient()
          Return true if form handler is working with transient item
 boolean isUseAssetUri()
           
 boolean isUseRequestLocale()
          Return the useRequestLocale property.
protected  void loadContext(atg.epub.servlet.AssetFormContext pContext)
          Load context information
protected  void nonClearingSetRepositoryId(java.lang.String pId)
          Don't clear values no matter what clearValueOnSet says
 java.util.HashMap parseSessionVariables(java.lang.String pAttributes)
           
 void processException(java.lang.Exception pException, java.lang.String pMsgId, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Add a user error message to the form exceptions, and then display the exception in the logs
 void processException(java.lang.Exception pException, java.lang.String pMsgId, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.Object pParam)
          Add a user error message to the form exceptions, and then display the exception in the logs
protected  void saveContext(atg.epub.servlet.AssetFormContext pContext)
          Save current context to pContext
protected  RepositoryItem saveTransientItem(MutableRepositoryItem pItem)
          Save a transient repository item, return the persistent result or null
 void setActionType(java.lang.String pActionType)
          Set the action type for the submit method
 void setActionURL(java.lang.String pURL)
          Set the action URL for all possible actions to prevent redirection
 void setAssetInfo(atg.epub.servlet.AssetInfo pAssetInfo)
          Set the AssetInfo for this form handler.
 void setAssetInfoPath(java.lang.String pPath)
          This method is called on form submits to set the assetInfo via that component's nucleus path
 void setAssetURI(java.lang.String pAssetURI)
          Set the asset URI.
 void setAttributes(java.util.Map pAttributes)
           
 void setComponentPath(java.lang.String pPath)
           
 void setContextOp(int pContextOp)
           
 void setDisplayName(java.lang.String pDisplayName)
           
 void setEditMode(boolean pEditMode)
           
 void setEncodedPathAndItemType(java.lang.String pValue)
          Set the repository path and item descriptor name as one encoded value.
 void setIllegalIdCharacters(java.lang.String[] pIllegalIdCharacters)
           
 void setItem(java.lang.Object pItem)
           
 void setItemType(java.lang.String pType)
          Set the item descriptor name
 void setRepositoryId(java.lang.String pId)
          Sets the repository id of the item to be manipulated.
 void setSessionVariables(javax.servlet.http.HttpSession pSession, java.util.Map pSessionVarMap)
           
 void setTransientItem(java.lang.Object pItem)
           
 void setUseRequestLocale(boolean pUseRequestLocale)
          Set the useRequestLocale property.
 void setView(java.lang.String pView)
          Set the current asset view
protected  void updateAssetInfo()
          Set this form handler as the current form handler in the asset info object.
protected  void updateAssetInfo(DynamoHttpServletRequest pRequest)
           
 void updateContextInformation(atg.epub.servlet.AssetFormContext pContext)
          Called before context push.
protected  boolean updateItemProperties()
          Update
 
Methods inherited from class atg.repository.servlet.RepositoryFormHandler
checkFormError, checkFormSuccess, checkForRequiredProperties, deleteItem, getCheckForReadOnlyProperties, getCheckForRequiredProperties, getContentItemDescriptor, getContentNameProperty, getContentPathProperty, getCreateErrorURL, getCreateSuccessURL, getDeleteErrorURL, getDeleteSuccessURL, getEditMapsAsLists, getErrorHandler, getExtractDefaultValuesFromItem, getFolderIdProperty, getItemDescriptor, getItemDescriptorName, getItemProperty, getLogger, getMapKeyValueSeparator, getRemoveReferencesToDeletedItems, getRepository, getRepositoryId, getRepositoryItemEditor, getRepositoryPathName, getRequireIdOnCreate, getSpecifiedIdPropertyValue, getTransactionDemarcation, getTrimProperties, getUpdateErrorURL, getUpdateSuccessURL, getValue, getValueProperty, handleCreate, isClearValueOnSet, isCreateTransientItems, isRequireMapKeys, isSortRepositoryItemSets, isTrimProperty, isUpdateItemsInCollection, postCreateItem, postDeleteItem, postUpdateItem, postUpdateItemProperties, preCreateItem, preDeleteItem, preUpdateItem, setCheckForReadOnlyProperties, setCheckForRequiredProperties, setClearValueOnSet, setContentNameProperty, setContentPathProperty, setCreateErrorURL, setCreateSuccessURL, setCreateTransientItems, setDeleteErrorURL, setDeleteSuccessURL, setEditMapsAsLists, setExtractDefaultValuesFromItem, setFolderIdProperty, setItemDescriptorName, setMapKeyValueSeparator, setRemoveReferencesToDeletedItems, setRepository, setRepositoryItemEditor, setRepositoryPathName, setRequireIdOnCreate, setRequireMapKeys, setSortRepositoryItemSets, setTrimProperties, setUpdateErrorURL, setUpdateItemsInCollection, setUpdateSuccessURL, setValueProperty, testPropertyAttribute, updateChildItemProperty, updateContentItemValues, updateItem, updateItemProperties, updateListProperty, updateMapProperty
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, afterSet, checkFormRedirect, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION

MSG_UNABLE_TO_ADD_ITEM_TO_PROPERTY

protected static final java.lang.String MSG_UNABLE_TO_ADD_ITEM_TO_PROPERTY
See Also:
Constant Field Values

MSG_UNABLE_TO_GET_UPDATEABLE_ITEM

protected static final java.lang.String MSG_UNABLE_TO_GET_UPDATEABLE_ITEM
See Also:
Constant Field Values

MSG_UPDATEABLE_ITEM_CONFIG_ERROR

protected static final java.lang.String MSG_UPDATEABLE_ITEM_CONFIG_ERROR
See Also:
Constant Field Values

MSG_UPDATEABLE_CONTENT_ITEM_ERROR

protected static final java.lang.String MSG_UPDATEABLE_CONTENT_ITEM_ERROR
See Also:
Constant Field Values

UPDATE_KEY

protected static final java.lang.String UPDATE_KEY
See Also:
Constant Field Values
Constructor Detail

RepositoryAssetFormHandler

public RepositoryAssetFormHandler()
Method Detail

beforeSet

public boolean beforeSet(DynamoHttpServletRequest pRequest,
                         DynamoHttpServletResponse pResponse)
                  throws DropletFormException
Description copied from class: GenericFormHandler
Called before any setX methods on this form are set when a form that modifies properties of this form handler is submitted.

Specified by:
beforeSet in interface DropletFormHandler
Overrides:
beforeSet in class GenericFormHandler
Returns:
true if form processing should continue, false if it should be aborted
Throws:
DropletFormException

beforeGet

public void beforeGet(DynamoHttpServletRequest pRequest,
                      DynamoHttpServletResponse pResponse)
Description copied from class: EmptyFormHandler
Called when a form is rendered that references this bean. This call is made before the service method of the page is invoked. If form data is processed during the same request, it will be called after all form data has been processed.

If multiple form handlers exist for the same form, they are called in an order based on the priority of the input tag that references the form.

Specified by:
beforeGet in interface DropletFormHandler
Overrides:
beforeGet in class EmptyFormHandler

setAssetInfoPath

public void setAssetInfoPath(java.lang.String pPath)
                      throws javax.servlet.ServletException,
                             java.io.IOException
This method is called on form submits to set the assetInfo via that component's nucleus path

Specified by:
setAssetInfoPath in interface atg.epub.servlet.AssetFormHandler
Parameters:
pPath - the assetInfo's nucleus component path
Throws:
javax.servlet.ServletException
java.io.IOException

getAssetInfoPath

public java.lang.String getAssetInfoPath()
Specified by:
getAssetInfoPath in interface atg.epub.servlet.AssetFormHandler

isUseAssetUri

public boolean isUseAssetUri()

getIllegalIdCharacters

public java.lang.String[] getIllegalIdCharacters()

setIllegalIdCharacters

public void setIllegalIdCharacters(java.lang.String[] pIllegalIdCharacters)

setAssetInfo

public void setAssetInfo(atg.epub.servlet.AssetInfo pAssetInfo)
                  throws javax.servlet.ServletException,
                         java.io.IOException
Set the AssetInfo for this form handler. Causes form handler to save information to current context before switching to new

Specified by:
setAssetInfo in interface atg.epub.servlet.AssetFormHandler
Parameters:
pAssetInfo - the asset info
Throws:
javax.servlet.ServletException
java.io.IOException

setEditMode

public void setEditMode(boolean pEditMode)
Specified by:
setEditMode in interface atg.epub.servlet.AssetFormHandler

isEditMode

public boolean isEditMode()
Specified by:
isEditMode in interface atg.epub.servlet.AssetFormHandler

getAssetInfo

public atg.epub.servlet.AssetInfo getAssetInfo()
Specified by:
getAssetInfo in interface atg.epub.servlet.AssetFormHandler

getContextOp

public int getContextOp()
Specified by:
getContextOp in interface atg.epub.servlet.AssetFormHandler

setContextOp

public void setContextOp(int pContextOp)
                  throws javax.servlet.ServletException,
                         java.io.IOException
Specified by:
setContextOp in interface atg.epub.servlet.AssetFormHandler
Throws:
javax.servlet.ServletException
java.io.IOException

setEncodedPathAndItemType

public void setEncodedPathAndItemType(java.lang.String pValue)
Set the repository path and item descriptor name as one encoded value. Used in form handlers where the user picks the type of item they want to create from a single choice box.

Specified by:
setEncodedPathAndItemType in interface atg.epub.servlet.AssetFormHandler
Parameters:
pValue - the encoded value

getEncodedPathAndItemType

public java.lang.String getEncodedPathAndItemType()
Specified by:
getEncodedPathAndItemType in interface atg.epub.servlet.AssetFormHandler

setDisplayName

public void setDisplayName(java.lang.String pDisplayName)

getDisplayName

public java.lang.String getDisplayName()

getId

public java.lang.String getId()
Specified by:
getId in interface atg.epub.servlet.AssetFormHandler

getItemDisplayName

public java.lang.String getItemDisplayName()
Specified by:
getItemDisplayName in interface atg.epub.servlet.AssetFormHandler

getAttributes

public java.util.Map getAttributes()
Get the attributes set in the form's mapping

Specified by:
getAttributes in interface atg.epub.servlet.AssetFormHandler
Returns:
the attributes

setAttributes

public void setAttributes(java.util.Map pAttributes)
Specified by:
setAttributes in interface atg.epub.servlet.AssetFormHandler

setView

public void setView(java.lang.String pView)
Set the current asset view

Specified by:
setView in interface atg.epub.servlet.AssetFormHandler
Parameters:
pView - the view

getView

public java.lang.String getView()
Return the index to the current asset view as a string. The viewmaping functionality supports multiple views of an asset, this value is set and read by pages to keep track of the index of the current asset view.

Specified by:
getView in interface atg.epub.servlet.AssetFormHandler
Returns:
the current asset view, default to 0

setActionType

public void setActionType(java.lang.String pActionType)
Set the action type for the submit method

Specified by:
setActionType in interface atg.epub.servlet.AssetFormHandler
Parameters:
pActionType - the action type name

getActionType

public java.lang.String getActionType()
Specified by:
getActionType in interface atg.epub.servlet.AssetFormHandler

getAssetEditor

public java.lang.Object getAssetEditor()
This form handler edits its own assets

Specified by:
getAssetEditor in interface atg.epub.servlet.AssetFormHandler

setAssetURI

public void setAssetURI(java.lang.String pAssetURI)
Set the asset URI. Note that this form handler does not modify this value.

Specified by:
setAssetURI in interface atg.epub.servlet.AssetFormHandler
Parameters:
pAssetURI - the asset's URI

getAssetURI

public java.lang.String getAssetURI()
Get the asset URI. Note that this form handler does not modify this value.

Specified by:
getAssetURI in interface atg.epub.servlet.AssetFormHandler
Returns:
the asset URI or null

setComponentPath

public void setComponentPath(java.lang.String pPath)
Specified by:
setComponentPath in interface atg.epub.servlet.AssetFormHandler

getComponentPath

public java.lang.String getComponentPath()
Specified by:
getComponentPath in interface atg.epub.servlet.AssetFormHandler

setItemType

public void setItemType(java.lang.String pType)
Set the item descriptor name

Specified by:
setItemType in interface atg.epub.servlet.AssetFormHandler

getItemType

public java.lang.String getItemType()
Specified by:
getItemType in interface atg.epub.servlet.AssetFormHandler

isTransient

public boolean isTransient()
Return true if form handler is working with transient item

Specified by:
isTransient in interface atg.epub.servlet.AssetFormHandler

setTransientItem

public void setTransientItem(java.lang.Object pItem)
Specified by:
setTransientItem in interface atg.epub.servlet.AssetFormHandler

setItem

public void setItem(java.lang.Object pItem)
Specified by:
setItem in interface atg.epub.servlet.AssetFormHandler

getItem

public java.lang.Object getItem()
Specified by:
getItem in interface atg.epub.servlet.AssetFormHandler
Returns:
the current item

getRepositoryItem

public RepositoryItem getRepositoryItem()
Description copied from class: RepositoryFormHandler
Returns the repository item (if any) to edit from this form handler This is retrieved based on the repository, itemDescriptorName, and repositoryId properties;

Specified by:
getRepositoryItem in interface RepositoryFormData
Overrides:
getRepositoryItem in class RepositoryFormHandler
Returns:
the repository item or null

getAssetInfoFromRequest

protected atg.epub.servlet.AssetInfo getAssetInfoFromRequest(DynamoHttpServletRequest pRequest)

updateAssetInfo

protected void updateAssetInfo(DynamoHttpServletRequest pRequest)
                        throws javax.servlet.ServletException,
                               java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

afterGet

public void afterGet(DynamoHttpServletRequest pRequest,
                     DynamoHttpServletResponse pResponse)
Override this method to set form handler's attributes into the context

Specified by:
afterGet in interface DropletFormHandler
Overrides:
afterGet in class EmptyFormHandler
Parameters:
pRequest - the request
pResponse - the response

saveContext

protected void saveContext(atg.epub.servlet.AssetFormContext pContext)
Save current context to pContext

Parameters:
pContext - the context to save to

loadContext

protected void loadContext(atg.epub.servlet.AssetFormContext pContext)
Load context information

Parameters:
pContext - the context to load

updateContextInformation

public void updateContextInformation(atg.epub.servlet.AssetFormContext pContext)
                              throws javax.servlet.ServletException,
                                     java.io.IOException
Called before context push. Save all information necessary to restore current form handler state

Specified by:
updateContextInformation in interface atg.epub.servlet.AssetFormHandler
Throws:
javax.servlet.ServletException
java.io.IOException

updateAssetInfo

protected void updateAssetInfo()
                        throws javax.servlet.ServletException,
                               java.io.IOException
Set this form handler as the current form handler in the asset info object.

Parameters:
pRequest - the dynamo request
Throws:
javax.servlet.ServletException
java.io.IOException

parseSessionVariables

public java.util.HashMap parseSessionVariables(java.lang.String pAttributes)

setSessionVariables

public void setSessionVariables(javax.servlet.http.HttpSession pSession,
                                java.util.Map pSessionVarMap)

getTransientRepositoryItem

public MutableRepositoryItem getTransientRepositoryItem()
Get the transient item. This is null if the item/form isn't in the create state.

Returns:
the new, transient repository item or null

isUseRequestLocale

public boolean isUseRequestLocale()
Return the useRequestLocale property.


setUseRequestLocale

public void setUseRequestLocale(boolean pUseRequestLocale)
Set the useRequestLocale property.

Parameters:
pUseRequestLocale -

nonClearingSetRepositoryId

protected void nonClearingSetRepositoryId(java.lang.String pId)
Don't clear values no matter what clearValueOnSet says

Parameters:
pId - the ID to set

handleSubmitAction

public boolean handleSubmitAction(javax.portlet.PortletRequest pRequest,
                                  javax.portlet.PortletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
Specified by:
handleSubmitAction in interface atg.epub.servlet.AssetFormHandler
Throws:
javax.servlet.ServletException
java.io.IOException

handleSubmitAction

public boolean handleSubmitAction(DynamoHttpServletRequest pRequest,
                                  DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
A handler method that delegates to other handler methods base on the value of the 'actionType' property.

Specified by:
handleSubmitAction in interface atg.epub.servlet.AssetFormHandler
Throws:
javax.servlet.ServletException
java.io.IOException

createTransientItem

protected MutableRepositoryItem createTransientItem()
                                             throws javax.servlet.ServletException,
                                                    java.io.IOException
Creates a new, empty repository item, does not add new item persistently to the repository. If any errors occur in the process, form errors will be added.

Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

saveTransientItem

protected RepositoryItem saveTransientItem(MutableRepositoryItem pItem)
                                    throws javax.servlet.ServletException,
                                           java.io.IOException
Save a transient repository item, return the persistent result or null

Parameters:
pItem - the transient item
Returns:
the saved item or null if one or more errors occurred
Throws:
javax.servlet.ServletException
java.io.IOException

setRepositoryId

public void setRepositoryId(java.lang.String pId)
Sets the repository id of the item to be manipulated. This also clears the value dictionary, since the property values in it correspond to the item with the old repository id.

Overrides:
setRepositoryId in class RepositoryFormHandler

handleChangeView

public boolean handleChangeView(DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Called when user changes view or current item. This should result in changes being written back to the property map, but not written out persistently.

Throws:
javax.servlet.ServletException
java.io.IOException

updateItemProperties

protected boolean updateItemProperties()
                                throws javax.servlet.ServletException,
                                       java.io.IOException
Update

Throws:
javax.servlet.ServletException
java.io.IOException

setActionURL

public void setActionURL(java.lang.String pURL)
Set the action URL for all possible actions to prevent redirection

Specified by:
setActionURL in interface atg.epub.servlet.AssetFormHandler
Parameters:
pURL - the URL

getActionURL

public java.lang.String getActionURL()
Specified by:
getActionURL in interface atg.epub.servlet.AssetFormHandler

handleContextChange

public boolean handleContextChange(DynamoHttpServletRequest pRequest,
                                   DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

handleCreateTransient

public boolean handleCreateTransient(DynamoHttpServletRequest pRequest,
                                     DynamoHttpServletResponse pResponse)
                              throws javax.servlet.ServletException,
                                     java.io.IOException
Specified by:
handleCreateTransient in interface atg.epub.servlet.AssetFormHandler
Throws:
javax.servlet.ServletException
java.io.IOException

handleUpdate

public boolean handleUpdate(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Description copied from class: RepositoryFormHandler
Takes the current set of property values set as members of the value property and, if there were no errors in submitting the form, modifies the item described by the repositoryId property with these values.

If any errors occur in the process, form errors will be added. If there were no errors encountered while submitting the form, we optionally redirect to the value of the property updateSuccessURL. Otherwise, we optionally redirect to updateErrorURL.

Specified by:
handleUpdate in interface atg.epub.servlet.AssetFormHandler
Overrides:
handleUpdate in class RepositoryFormHandler
Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleDelete

public boolean handleDelete(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Description copied from class: RepositoryFormHandler
Deletes the item specified by the repositoryId property from the repository.

If any errors occur in the process, form errors will be added. If there were no errors encountered while submitting the form, we optionally redirect to the value of the property deleteSuccessURL. Otherwise, we optionally redirect to deleteErrorURL.

Overrides:
handleDelete in class RepositoryFormHandler
Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

processException

public void processException(java.lang.Exception pException,
                             java.lang.String pMsgId,
                             DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Add a user error message to the form exceptions, and then display the exception in the logs

Throws:
javax.servlet.ServletException
java.io.IOException

processException

public void processException(java.lang.Exception pException,
                             java.lang.String pMsgId,
                             DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse,
                             java.lang.Object pParam)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Add a user error message to the form exceptions, and then display the exception in the logs

Throws:
javax.servlet.ServletException
java.io.IOException

getTransactionManager

protected javax.transaction.TransactionManager getTransactionManager()
Returns the transaction manager for the repository that we are using

Overrides:
getTransactionManager in class RepositoryFormHandler

getWrappedItemDescriptor

protected RepositoryItemDescriptor getWrappedItemDescriptor()

getDataFromUploadedFile

public UploadedFile getDataFromUploadedFile(boolean pFileRequired,
                                            UploadedFile pUploadedFile,
                                            int pMaxMegabytes,
                                            java.lang.String pFileSizePropertyName,
                                            java.lang.String pMimeTypePropertyName,
                                            java.lang.String pFileDataPropertyName,
                                            java.lang.String pFilenamePropertyName,
                                            java.lang.String pParentFolderPropertyName,
                                            atg.repository.content.ContentPropertyItemDescriptor pContentDescriptor,
                                            java.lang.String pPathPropertyName,
                                            java.lang.String pLastModifiedPropertyName,
                                            atg.epub.util.FileValidator pValidator)
                                     throws javax.servlet.ServletException,
                                            java.io.IOException,
                                            RepositoryException
Parameters:
pFilenamePropertyName - String name of file name property in content item
pParentFolderPropertyName - String name of parent folder property in content item
pPathPropertyName - String name of path property in content item
pLastModifiedPropertyName - String name of last modified property in content item
pValidator - optional file content validator
Throws:
javax.servlet.ServletException
java.io.IOException
RepositoryException