| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.droplet.EmptyFormHandler
atg.droplet.GenericFormHandler
atg.repository.servlet.RepositoryFormHandler
atg.epub.servlet.RepositoryAssetFormHandler
public class RepositoryAssetFormHandler
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 repositoryIdproperty 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 valueproperty and, if there were no errors in
 submitting the form, modifies the item described by therepositoryIdproperty 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.nucleus.logging.VariableArgumentApplicationLoggingImpl | 
|---|
| vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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 | 
|---|
public static java.lang.String CLASS_VERSION
protected static final java.lang.String MSG_UNABLE_TO_ADD_ITEM_TO_PROPERTY
protected static final java.lang.String MSG_UNABLE_TO_GET_UPDATEABLE_ITEM
protected static final java.lang.String MSG_UPDATEABLE_ITEM_CONFIG_ERROR
protected static final java.lang.String MSG_UPDATEABLE_CONTENT_ITEM_ERROR
protected static final java.lang.String UPDATE_KEY
| Constructor Detail | 
|---|
public RepositoryAssetFormHandler()
| Method Detail | 
|---|
public boolean beforeSet(DynamoHttpServletRequest pRequest,
                         DynamoHttpServletResponse pResponse)
                  throws DropletFormException
GenericFormHandler
beforeSet in interface DropletFormHandlerbeforeSet in class GenericFormHandlerDropletFormException
public void beforeGet(DynamoHttpServletRequest pRequest,
                      DynamoHttpServletResponse pResponse)
EmptyFormHandler
beforeGet in interface DropletFormHandlerbeforeGet in class EmptyFormHandler
public void setAssetInfoPath(java.lang.String pPath)
                      throws javax.servlet.ServletException,
                             java.io.IOException
setAssetInfoPath in interface atg.epub.servlet.AssetFormHandlerpPath - the assetInfo's nucleus component path
javax.servlet.ServletException
java.io.IOExceptionpublic java.lang.String getAssetInfoPath()
getAssetInfoPath in interface atg.epub.servlet.AssetFormHandlerpublic boolean isUseAssetUri()
public java.lang.String[] getIllegalIdCharacters()
public void setIllegalIdCharacters(java.lang.String[] pIllegalIdCharacters)
public void setAssetInfo(atg.epub.servlet.AssetInfo pAssetInfo)
                  throws javax.servlet.ServletException,
                         java.io.IOException
setAssetInfo in interface atg.epub.servlet.AssetFormHandlerpAssetInfo - the asset info
javax.servlet.ServletException
java.io.IOExceptionpublic void setEditMode(boolean pEditMode)
setEditMode in interface atg.epub.servlet.AssetFormHandlerpublic boolean isEditMode()
isEditMode in interface atg.epub.servlet.AssetFormHandlerpublic atg.epub.servlet.AssetInfo getAssetInfo()
getAssetInfo in interface atg.epub.servlet.AssetFormHandlerpublic int getContextOp()
getContextOp in interface atg.epub.servlet.AssetFormHandler
public void setContextOp(int pContextOp)
                  throws javax.servlet.ServletException,
                         java.io.IOException
setContextOp in interface atg.epub.servlet.AssetFormHandlerjavax.servlet.ServletException
java.io.IOExceptionpublic void setEncodedPathAndItemType(java.lang.String pValue)
setEncodedPathAndItemType in interface atg.epub.servlet.AssetFormHandlerpValue - the encoded valuepublic java.lang.String getEncodedPathAndItemType()
getEncodedPathAndItemType in interface atg.epub.servlet.AssetFormHandlerpublic void setDisplayName(java.lang.String pDisplayName)
public java.lang.String getDisplayName()
public java.lang.String getId()
getId in interface atg.epub.servlet.AssetFormHandlerpublic java.lang.String getItemDisplayName()
getItemDisplayName in interface atg.epub.servlet.AssetFormHandlerpublic java.util.Map getAttributes()
getAttributes in interface atg.epub.servlet.AssetFormHandlerpublic void setAttributes(java.util.Map pAttributes)
setAttributes in interface atg.epub.servlet.AssetFormHandlerpublic void setView(java.lang.String pView)
setView in interface atg.epub.servlet.AssetFormHandlerpView - the viewpublic java.lang.String getView()
getView in interface atg.epub.servlet.AssetFormHandlerpublic void setActionType(java.lang.String pActionType)
setActionType in interface atg.epub.servlet.AssetFormHandlerpActionType - the action type namepublic java.lang.String getActionType()
getActionType in interface atg.epub.servlet.AssetFormHandlerpublic java.lang.Object getAssetEditor()
getAssetEditor in interface atg.epub.servlet.AssetFormHandlerpublic void setAssetURI(java.lang.String pAssetURI)
setAssetURI in interface atg.epub.servlet.AssetFormHandlerpAssetURI - the asset's URIpublic java.lang.String getAssetURI()
getAssetURI in interface atg.epub.servlet.AssetFormHandlerpublic void setComponentPath(java.lang.String pPath)
setComponentPath in interface atg.epub.servlet.AssetFormHandlerpublic java.lang.String getComponentPath()
getComponentPath in interface atg.epub.servlet.AssetFormHandlerpublic void setItemType(java.lang.String pType)
setItemType in interface atg.epub.servlet.AssetFormHandlerpublic java.lang.String getItemType()
getItemType in interface atg.epub.servlet.AssetFormHandlerpublic boolean isTransient()
isTransient in interface atg.epub.servlet.AssetFormHandlerpublic void setTransientItem(java.lang.Object pItem)
setTransientItem in interface atg.epub.servlet.AssetFormHandlerpublic void setItem(java.lang.Object pItem)
setItem in interface atg.epub.servlet.AssetFormHandlerpublic java.lang.Object getItem()
getItem in interface atg.epub.servlet.AssetFormHandlerpublic RepositoryItem getRepositoryItem()
RepositoryFormHandler
getRepositoryItem in interface RepositoryFormDatagetRepositoryItem in class RepositoryFormHandlerprotected atg.epub.servlet.AssetInfo getAssetInfoFromRequest(DynamoHttpServletRequest pRequest)
protected void updateAssetInfo(DynamoHttpServletRequest pRequest)
                        throws javax.servlet.ServletException,
                               java.io.IOException
javax.servlet.ServletException
java.io.IOException
public void afterGet(DynamoHttpServletRequest pRequest,
                     DynamoHttpServletResponse pResponse)
afterGet in interface DropletFormHandlerafterGet in class EmptyFormHandlerpRequest - the requestpResponse - the responseprotected void saveContext(atg.epub.servlet.AssetFormContext pContext)
pContext - the context to save toprotected void loadContext(atg.epub.servlet.AssetFormContext pContext)
pContext - the context to load
public void updateContextInformation(atg.epub.servlet.AssetFormContext pContext)
                              throws javax.servlet.ServletException,
                                     java.io.IOException
updateContextInformation in interface atg.epub.servlet.AssetFormHandlerjavax.servlet.ServletException
java.io.IOException
protected void updateAssetInfo()
                        throws javax.servlet.ServletException,
                               java.io.IOException
pRequest - the dynamo request
javax.servlet.ServletException
java.io.IOExceptionpublic java.util.HashMap parseSessionVariables(java.lang.String pAttributes)
public void setSessionVariables(javax.servlet.http.HttpSession pSession,
                                java.util.Map pSessionVarMap)
public MutableRepositoryItem getTransientRepositoryItem()
public boolean isUseRequestLocale()
public void setUseRequestLocale(boolean pUseRequestLocale)
pUseRequestLocale - protected void nonClearingSetRepositoryId(java.lang.String pId)
pId - the ID to set
public boolean handleSubmitAction(javax.portlet.PortletRequest pRequest,
                                  javax.portlet.PortletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
handleSubmitAction in interface atg.epub.servlet.AssetFormHandlerjavax.servlet.ServletException
java.io.IOException
public boolean handleSubmitAction(DynamoHttpServletRequest pRequest,
                                  DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
handleSubmitAction in interface atg.epub.servlet.AssetFormHandlerjavax.servlet.ServletException
java.io.IOException
protected MutableRepositoryItem createTransientItem()
                                             throws javax.servlet.ServletException,
                                                    java.io.IOException
javax.servlet.ServletException - if there was an error while executing
 the code
java.io.IOException - if there was an error with servlet io
protected RepositoryItem saveTransientItem(MutableRepositoryItem pItem)
                                    throws javax.servlet.ServletException,
                                           java.io.IOException
pItem - the transient item
javax.servlet.ServletException
java.io.IOExceptionpublic void setRepositoryId(java.lang.String pId)
value dictionary, since the property
 values in it correspond to the item with the old repository id.
setRepositoryId in class RepositoryFormHandler
public boolean handleChangeView(DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse)
                         throws javax.servlet.ServletException,
                                java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected boolean updateItemProperties()
                                throws javax.servlet.ServletException,
                                       java.io.IOException
javax.servlet.ServletException
java.io.IOExceptionpublic void setActionURL(java.lang.String pURL)
setActionURL in interface atg.epub.servlet.AssetFormHandlerpURL - the URLpublic java.lang.String getActionURL()
getActionURL in interface atg.epub.servlet.AssetFormHandler
public boolean handleContextChange(DynamoHttpServletRequest pRequest,
                                   DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
javax.servlet.ServletException
java.io.IOException
public boolean handleCreateTransient(DynamoHttpServletRequest pRequest,
                                     DynamoHttpServletResponse pResponse)
                              throws javax.servlet.ServletException,
                                     java.io.IOException
handleCreateTransient in interface atg.epub.servlet.AssetFormHandlerjavax.servlet.ServletException
java.io.IOException
public boolean handleUpdate(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
RepositoryFormHandlervalue 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.
handleUpdate in interface atg.epub.servlet.AssetFormHandlerhandleUpdate in class RepositoryFormHandlerpRequest - the servlet's requestpResponse - the servlet's response
javax.servlet.ServletException - if there was an error while executing
 the code
java.io.IOException - if there was an error with servlet io
public boolean handleDelete(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
RepositoryFormHandlerrepositoryId
 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.
handleDelete in class RepositoryFormHandlerpRequest - the servlet's requestpResponse - the servlet's response
javax.servlet.ServletException - if there was an error while executing
 the code
java.io.IOException - if there was an error with servlet io
public void processException(java.lang.Exception pException,
                             java.lang.String pMsgId,
                             DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
javax.servlet.ServletException
java.io.IOException
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
javax.servlet.ServletException
java.io.IOExceptionprotected javax.transaction.TransactionManager getTransactionManager()
getTransactionManager in class RepositoryFormHandlerprotected RepositoryItemDescriptor getWrappedItemDescriptor()
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
pFilenamePropertyName - String name of file name property in content itempParentFolderPropertyName - String name of parent folder property in content itempPathPropertyName - String name of path property in content itempLastModifiedPropertyName - String name of last modified property in content itempValidator - optional file content validator
javax.servlet.ServletException
java.io.IOException
RepositoryException| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||