public class EditForm extends XWikiForm
Constructor and Description |
---|
EditForm() |
Modifier and Type | Method and Description |
---|---|
String |
getComment() |
String |
getContent() |
String |
getCreator() |
String |
getDefaultLanguage() |
String |
getDefaultTemplate() |
String |
getHidden() |
String |
getLanguage() |
String |
getName() |
Map<String,String[]> |
getObject(String prefix) |
int |
getObjectNumbers(String prefix) |
ObjectPolicyType |
getObjectPolicy()
Return the object policy given in the HTTP request.
|
Map<String,List<Integer>> |
getObjectsToAdd() |
Map<String,List<Integer>> |
getObjectsToRemove() |
String |
getParent() |
String |
getSyntaxId() |
String |
getTags() |
String |
getTemplate() |
String |
getTitle() |
Map<String,SortedMap<Integer,Map<String,String[]>>> |
getUpdateOrCreateMap()
If current objectPolicyType is
ObjectPolicyType.UPDATE_OR_CREATE , retrieve a map from the request
parameters of the form <spacename>.<classname>_<number>_<propertyname>'
Keys of this map will be the reference <spacename>.<classname> to the Class
(for example, 'XWiki.XWikiRights'), the content is a list where each element describe property for the
object <number> . |
String |
getWeb() |
boolean |
isConvertSyntax() |
boolean |
isLockForce() |
boolean |
isMinorEdit() |
void |
readRequest() |
void |
setComment(String comment) |
void |
setContent(String content) |
void |
setConvertSyntax(boolean convertSyntax)
Sets whether to convert the document content and meta data to the new syntax specified on the edit form.
|
void |
setCreator(String creator) |
void |
setDefaultLanguage(String defaultLanguage) |
void |
setDefaultTemplate(String defaultTemplate) |
void |
setHidden(String hidden) |
void |
setLanguage(String language) |
void |
setLockForce(boolean lockForce) |
void |
setMinorEdit(boolean isMinorEdit) |
void |
setName(String name) |
void |
setParent(String parent) |
void |
setSyntaxId(String syntaxId) |
void |
setTags(String[] parameter) |
void |
setTemplate(String template) |
void |
setTitle(String title) |
void |
setWeb(String web) |
getRequest, reset, reset, setRequest
public void readRequest()
readRequest
in class XWikiForm
public void setTags(String[] parameter)
public String getTags()
public String getContent()
public void setContent(String content)
public String getWeb()
public void setWeb(String web)
public String getName()
public void setName(String name)
public String getLanguage()
public void setLanguage(String language)
public int getObjectNumbers(String prefix)
public String getParent()
public void setParent(String parent)
public String getCreator()
public void setCreator(String creator)
public String getTemplate()
public void setTemplate(String template)
public String getDefaultTemplate()
public void setDefaultTemplate(String defaultTemplate)
public String getDefaultLanguage()
public void setDefaultLanguage(String defaultLanguage)
public String getTitle()
public void setTitle(String title)
public String getComment()
public void setComment(String comment)
public boolean isMinorEdit()
public void setMinorEdit(boolean isMinorEdit)
public boolean isLockForce()
public void setLockForce(boolean lockForce)
public String getSyntaxId()
public void setSyntaxId(String syntaxId)
public boolean isConvertSyntax()
true
if the document content and meta data should be converted to the new syntax specified on the
edit form, false
otherwisesyntaxId
public void setConvertSyntax(boolean convertSyntax)
convertSyntax
- true
to convert the document content and meta data to the new syntax, false
to only change the syntax identifierpublic String getHidden()
public void setHidden(String hidden)
public ObjectPolicyType getObjectPolicy()
ObjectPolicyType
for more information about what is an object policy.public Map<String,SortedMap<Integer,Map<String,String[]>>> getUpdateOrCreateMap()
ObjectPolicyType.UPDATE_OR_CREATE
, retrieve a map from the request
parameters of the form <spacename>.<classname>_<number>_<propertyname>'
Keys of this map will be the reference <spacename>.<classname>
to the Class
(for example, 'XWiki.XWikiRights'), the content is a list where each element describe property for the
object <number>
. Element of the list is a map where key is <propertyname>
and
content is the array of corresponding values.
Example with a list of HTTP parameters:
{
"XWiki.XWikiRights": {
"0": {
"users": ["XWiki.Admin", "XWiki.Me"],
"groups": ["XWiki.XWikiAllGroup"]
},
"1": {
"users": ["XWiki.Admin"]
}
],
"XWiki.XWikiUsers":
"1": {
"name": ["Spirou"]
}
]
}
Note that the resulting map does not guarantee the consistency of the properties in regards with the actual
definition of the XClass. For example, the request could contain XWiki.XWikiRights_0_foobar=value
: the
resulting map will always return a parameter "foobar" for XWiki.XWikiRights
even if the xclass does not define it or even if the xclass does not exist.
If the current objectPolicyType is not ObjectPolicyType.UPDATE_OR_CREATE
it will return an empty map.Copyright © 2004–2021 XWiki. All rights reserved.