public class CreateActionRequestHandler extends Object
Constructor and Description |
---|
CreateActionRequestHandler(XWikiContext context) |
Modifier and Type | Method and Description |
---|---|
List<Document> |
getAvailableTemplateProviders() |
protected ScriptContext |
getCurrentScriptContext() |
String |
getName() |
DocumentReference |
getNewDocumentReference() |
List<Document> |
getRecommendedTemplateProviders() |
SpaceReference |
getSpaceReference() |
BaseObject |
getTemplateProvider() |
String |
getType() |
org.apache.velocity.VelocityContext |
getVelocityContext()
Deprecated.
since 8.3M1, use
getCurrentScriptContext() instead |
boolean |
hasTemplate() |
boolean |
isDocumentAlreadyExisting(XWikiDocument newDocument) |
boolean |
isSpace() |
boolean |
isTemplateProviderAllowedToCreateInCurrentSpace()
Verifies if the creation inside the specified spaceReference is allowed by the current template provider.
|
void |
processRequest()
Process the request and extract from the given parameters the data needed to create the new document.
|
public CreateActionRequestHandler(XWikiContext context)
context
- the XWikiContext for which to handle the request.public void processRequest() throws XWikiException
XWikiException
- if problems occurpublic DocumentReference getNewDocumentReference()
null
if a no document can be created
(because the conditions are not met)public boolean hasTemplate()
public boolean isTemplateProviderAllowedToCreateInCurrentSpace()
true
if the creation is allowed, false
otherwisepublic boolean isDocumentAlreadyExisting(XWikiDocument newDocument)
newDocument
- the new document to check if it already exists@Deprecated public org.apache.velocity.VelocityContext getVelocityContext()
getCurrentScriptContext()
insteadVelocityContext
for the context we are handlingprotected ScriptContext getCurrentScriptContext()
public SpaceReference getSpaceReference()
public boolean isSpace()
public List<Document> getAvailableTemplateProviders()
public List<Document> getRecommendedTemplateProviders()
public BaseObject getTemplateProvider()
null
if none was setpublic String getType()
null
if none was setCopyright © 2004–2017 XWiki. All rights reserved.