|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.droplet.EmptyFormHandler atg.droplet.GenericFormHandler atg.repository.servlet.RepositoryFormHandler atg.repository.servlet.XMLRepositoryFormHandler
public class XMLRepositoryFormHandler
This class is an extension of RepositoryFormHandler that has a few additional features.
(1) You can refer to repository items by "name" rather than the
(less user friendly) repository id. For example, instead of
setting the repositoryId
property to
"/targetedcontent/foo.html," one can set itemName
to
"foo," and also set the itemFolder
and
itemExtension
properties to "/targetedcontent/" and
".html," respectively. Setting these properties has the effect of
also updating the repositoryId
property to the
corresponding repository id.
(2) There is a special content
property, which
represents the content associated with the repository item. The
contentPropertyName
property specifies the actual
property name of the item which is to be treated as the "content."
Before the content property is set in the item, we insert paragraph
tags where the text's paragraphs start and end, thus making the
content appropriate for an item in an XML or HTML repository. For
example, if the contentParagraphTagName
property is
set to "p," the content's paragraphs are enclosed in the <p>
and </p> tags. When the content property is read back into
the form, the paragraph tags are stripped off again, so that the
user only sees regular text.
RepositoryFormHandler
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
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 | |
---|---|
XMLRepositoryFormHandler()
|
Method Summary | |
---|---|
java.lang.String |
getClaimPropertyName()
Returns property ClaimPropertyName |
java.lang.String |
getContent()
Returns the item's content. |
java.lang.String |
getContentParagraphTagName()
Returns the name of the XML/HTML tag in which the content's paragraphs should be enclosed. |
java.lang.String |
getContentPropertyName()
Returns the property name of the item's "content" property. |
java.lang.String |
getItemExtension()
Returns the item's file extension, if any. |
java.lang.String |
getItemFolder()
Returns the item's folder in the repository. |
java.lang.String |
getItemName()
Returns the item's name. |
java.lang.String |
getItemPathWordSeparator()
Returns the string to replace spaces with in the item's path. |
java.util.Properties |
getLinksDictionary()
Returns the set of properties/dictionary of HTTP links which correspond to some content. |
java.lang.String |
getXmlEncoding()
Returns the name of the encoding type to be used for the actual XML file. |
boolean |
handleClaimUpdate(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Checks to see if the current editor can claim the requested article. |
void |
setClaimPropertyName(java.lang.String pClaimPropertyName)
Sets property ClaimPropertyName |
void |
setContent(java.lang.String pContent)
Sets the item's content. |
void |
setContentParagraphTagName(java.lang.String pContentParagraphTagName)
Sets the name of the XML/HTML tag in which the content's paragraphs should be enclosed. |
void |
setContentPropertyName(java.lang.String pContentPropertyName)
Sets the property name of the item's "content" property. |
void |
setItemExtension(java.lang.String pItemExtension)
Sets the item's file extension and, consequently, updates the repositoryId property to the repository id
corresponding to the item's name, folder, and extension. |
void |
setItemFolder(java.lang.String pItemFolder)
Sets the item's folder in the repository and, consequently, updates the repositoryId property to the repository
id corresponding to the item's name, folder, and extension. |
void |
setItemName(java.lang.String pItemName)
Sets the item's name and, consequently, updates the repositoryId property to the corresponding
repository id. |
void |
setItemPathWordSeparator(java.lang.String pItemPathWordSeparator)
Sets the string to replace spaces with in the item's path. |
void |
setLinksDictionary(java.util.Properties pLinksDictionary)
Sets the set of properties/dictionary of HTTP links which correspond to some content. |
void |
setXmlEncoding(java.lang.String pXMLEncoding)
Sets the name of the encoding type to be used for the actual XML file. |
protected void |
updateItem(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Updates the repository item given by the current repository id. |
Methods inherited from class atg.droplet.EmptyFormHandler |
---|
afterGet, beforeGet |
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
Constructor Detail |
---|
public XMLRepositoryFormHandler()
Method Detail |
---|
public java.lang.String getItemName()
public void setItemName(java.lang.String pItemName)
repositoryId
property to the corresponding
repository id.
public java.lang.String getItemFolder()
public void setItemFolder(java.lang.String pItemFolder)
repositoryId
property to the repository
id corresponding to the item's name, folder, and extension. The
folder is expected to end with a "/" (e.g., "/targetedcontent/").
public java.lang.String getItemExtension()
public void setItemExtension(java.lang.String pItemExtension)
repositoryId
property to the repository id
corresponding to the item's name, folder, and extension. The
extension is expected to start with a "." (e.g., ".html").
public java.lang.String getItemPathWordSeparator()
public void setItemPathWordSeparator(java.lang.String pItemPathWordSeparator)
itemPathWordSeparator
is set to "_" then
the id "/targeted content/my item.html" will be converted into
"/targeted_content/my_item.html."
public java.lang.String getContentPropertyName()
public void setContentPropertyName(java.lang.String pContentPropertyName)
public java.lang.String getContentParagraphTagName()
public void setContentParagraphTagName(java.lang.String pContentParagraphTagName)
public java.lang.String getXmlEncoding()
public void setXmlEncoding(java.lang.String pXMLEncoding)
public java.util.Properties getLinksDictionary()
public void setLinksDictionary(java.util.Properties pLinksDictionary)
public java.lang.String getContent()
public void setContent(java.lang.String pContent)
value
.content, where content
is specified by contentPropertyName
.
Before the item's content is set, links to any known content
are added.
The property value is set to the item's content after HTML
paragraph tags are added to it.
public java.lang.String getClaimPropertyName()
public void setClaimPropertyName(java.lang.String pClaimPropertyName)
public boolean handleClaimUpdate(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
It then updates the rest of the article's meta-data. See atg.repository.servlet.RepositoryFormHandler.handleUpdate().
pRequest
- 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 ioatg.repository.servlet.RepositoryFormHandler.handleUpdate
protected void updateItem(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
value
property are saved into
the repository item. Also, the XML encoding (which is not
technically a property of the repository item) is updated through
the XMLDeclaration. If any errors occur in the process, form
errors will be added.
updateItem
in class RepositoryFormHandler
pRequest
- 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |