public class CmsJspTagEdit extends CmsJspScopedVarBodyTagSuport
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NEW_LINK_IDENTIFIER
Identifier to indicate that the new link should be handled by this tag - not by a
I_CmsResourceCollector. |
| Constructor and Description |
|---|
CmsJspTagEdit() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
createResource(CmsObject cmsObject,
java.lang.String newLink,
java.util.Locale locale,
java.lang.String sitePath,
java.lang.String modelFileName,
java.lang.String mode,
java.lang.String postCreateHandler)
Creates a new resource.
|
int |
doEndTag() |
int |
doStartTag() |
static java.lang.String |
getNewLink(CmsObject cms,
I_CmsResourceType resType,
java.lang.String creationSitemap)
Creates the String specifying where which type of resource has to be created.
|
static java.lang.String |
getRootPathFromNewLink(java.lang.String newLink)
Returns the resource type name contained in the newLink parameter.
|
static java.lang.String |
getTypeFromNewLink(java.lang.String newLink)
Returns the resource type name contained in the newLink parameter.
|
static void |
insertDirectEditEnd(javax.servlet.jsp.PageContext pageContext)
Inserts the closing direct edit tag.
|
static boolean |
insertDirectEditStart(CmsObject cms,
javax.servlet.jsp.PageContext pageContext,
CmsResource resource,
boolean canCreate,
boolean canDelete,
java.lang.String createType,
java.lang.String creationSitemap,
java.lang.String postCreateHandler)
Inserts the opening direct edit tag.
|
void |
release() |
void |
setCreate(java.lang.Boolean canCreate)
Setter for the "create" attribute of the tag.
|
void |
setCreateType(java.lang.String typeName)
Setter for the "createType" attribute of the tag.
|
void |
setCreationSiteMap(java.lang.String sitePath)
Setter for the "creationSiteMap" attribute of the tag.
|
void |
setDelete(java.lang.Boolean canDelete)
Setter for the "delete" attribute of the tag.
|
void |
setPostCreateHandler(java.lang.String postCreateHandler)
Setter for the "postCreateHandler" attribute of the tag.
|
void |
setUuid(java.lang.String uuid)
Setter for the uuid attribute of the tag, providing the uuid of content that should be edited.
|
getScope, getScopeAsInt, getScopeAsString, getScopeInt, getVar, isScopeVarSet, setScope, setVar, storeAttribute, storeAttributedoAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContentfindAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValuepublic static final java.lang.String NEW_LINK_IDENTIFIER
I_CmsResourceCollector.public CmsJspTagEdit()
public static java.lang.String createResource(CmsObject cmsObject, java.lang.String newLink, java.util.Locale locale, java.lang.String sitePath, java.lang.String modelFileName, java.lang.String mode, java.lang.String postCreateHandler)
cmsObject - The CmsObject of the current request context.newLink - A string, specifying where which new content should be created.locale - The locale for which thesitePath - site path of the currently edited content.modelFileName - not used.mode - optional creation modepostCreateHandler - optional class name of an I_CmsCollectorPostCreateHandler which is invoked after the content has been created.
The fully qualified class name can be followed by a "|" symbol and a handler specific configuration string.public static java.lang.String getNewLink(CmsObject cms, I_CmsResourceType resType, java.lang.String creationSitemap)
cms - the CMS contextresType - the resource type to createcreationSitemap - the creation sitemap parametercreateResource(CmsObject, String, Locale, String, String, String, String)public static java.lang.String getRootPathFromNewLink(java.lang.String newLink)
newLink - the newLink parameterpublic static java.lang.String getTypeFromNewLink(java.lang.String newLink)
newLink - the newLink parameterpublic static void insertDirectEditEnd(javax.servlet.jsp.PageContext pageContext)
pageContext - the page contextpublic static boolean insertDirectEditStart(CmsObject cms, javax.servlet.jsp.PageContext pageContext, CmsResource resource, boolean canCreate, boolean canDelete, java.lang.String createType, java.lang.String creationSitemap, java.lang.String postCreateHandler)
cms - the CMS contextpageContext - the page contextresource - the resource to editcanCreate - if resource creation is allowedcanDelete - if resource deletion is allowedcreateType - the resource type to create, default to the type of the edited resourcecreationSitemap - the sitemap context to create the resource in, default to the current requested URIpostCreateHandler - the post create handler if requiredtrue if an opening direct edit tag was insertedpublic int doEndTag() throws javax.servlet.jsp.JspException
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspExceptionBodyTagSupport.doEndTag()public int doStartTag() throws CmsIllegalArgumentException
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class javax.servlet.jsp.tagext.BodyTagSupportCmsIllegalArgumentExceptionTag.doStartTag()public void release()
release in interface javax.servlet.jsp.tagext.Tagrelease in class CmsJspScopedVarBodyTagSuportCmsJspScopedVarBodyTagSuport.release()public void setCreate(java.lang.Boolean canCreate)
canCreate - value of the tag's attribute "create".public void setCreateType(java.lang.String typeName)
typeName - value of the "createType" attribute of the tag.public void setCreationSiteMap(java.lang.String sitePath)
sitePath - value of the "creationSiteMap" attribute of the tag.public void setDelete(java.lang.Boolean canDelete)
canDelete - value of the "delete" attribute of the tag.public void setPostCreateHandler(java.lang.String postCreateHandler)
postCreateHandler - fully qualified class name of the I_CmsCollectorPostCreateHandler to use.public void setUuid(java.lang.String uuid)
uuid - the uuid of the content that should be edited.