Class EditForm

  • Direct Known Subclasses:
    PreviewForm

    public class EditForm
    extends XWikiForm
    An object containing the information sent in an action request to perform changes on a document.
    Version:
    $Id: 935231bb13044e78e782afa8915c9f8b02e38d07 $
    • Constructor Detail

      • EditForm

        public EditForm()
    • Method Detail

      • setTags

        public void setTags​(String[] parameter)
      • getTags

        public String getTags()
      • getContent

        public String getContent()
      • setContent

        public void setContent​(String content)
      • getWeb

        public String getWeb()
      • setWeb

        public void setWeb​(String web)
      • getName

        public String getName()
      • setName

        public void setName​(String name)
      • getLanguage

        public String getLanguage()
      • setLanguage

        public void setLanguage​(String language)
      • getObjectNumbers

        public int getObjectNumbers​(String prefix)
      • getParent

        public String getParent()
      • setParent

        public void setParent​(String parent)
      • getCreator

        public String getCreator()
      • setCreator

        public void setCreator​(String creator)
      • getTemplate

        public String getTemplate()
      • setTemplate

        public void setTemplate​(String template)
      • getDefaultTemplate

        public String getDefaultTemplate()
      • setDefaultTemplate

        public void setDefaultTemplate​(String defaultTemplate)
      • getDefaultLanguage

        public String getDefaultLanguage()
      • setDefaultLanguage

        public void setDefaultLanguage​(String defaultLanguage)
      • getTitle

        public String getTitle()
      • setTitle

        public void setTitle​(String title)
      • getComment

        public String getComment()
      • setComment

        public void setComment​(String comment)
      • isMinorEdit

        public boolean isMinorEdit()
      • setMinorEdit

        public void setMinorEdit​(boolean isMinorEdit)
      • isLockForce

        public boolean isLockForce()
      • setLockForce

        public void setLockForce​(boolean lockForce)
      • getSyntaxId

        public String getSyntaxId()
      • setSyntaxId

        public void setSyntaxId​(String syntaxId)
      • isConvertSyntax

        public boolean isConvertSyntax()
        Returns:
        true if the document content and meta data should be converted to the new syntax specified on the edit form, false otherwise
        Since:
        12.6.3, 12.9RC1
        See Also:
        syntaxId
      • setConvertSyntax

        public void setConvertSyntax​(boolean convertSyntax)
        Sets whether to convert the document content and meta data to the new syntax specified on the edit form.
        Parameters:
        convertSyntax - true to convert the document content and meta data to the new syntax, false to only change the syntax identifier
        Since:
        12.6.3, 12.9RC1
      • getHidden

        public String getHidden()
      • setHidden

        public void setHidden​(String hidden)
      • getObjectPolicy

        public ObjectPolicyType getObjectPolicy()
        Return the object policy given in the HTTP request. See ObjectPolicyType for more information about what is an object policy.
        Returns:
        the Object Policy type
        Since:
        7.0RC1
      • getTemporaryUploadedFiles

        @Unstable
        public List<String> getTemporaryUploadedFiles()
        Retrieve the list of temporary uploaded files to add as attachment.
        Returns:
        a list of filenames that should be attached.
        Since:
        14.3RC1
        See Also:
        TemporaryAttachmentSessionsManager
      • getUpdateOrCreateMap

        public 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 &lt;spacename&gt;.&lt;classname&gt;_&lt;number&gt;_<propertyname>' Keys of this map will be the reference &lt;spacename&gt;.<classname> to the Class (for example, 'XWiki.XWikiRights'), the content is a list where each element describe property for the object &lt;number&gt;. 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.XWikiRights_0_users=XWiki.Me
        • XWiki.XWikiRights_0_groups=XWiki.XWikiAllGroup
        • XWiki.XWikiRights_1_user=XWiki.Admin
        • XWiki.XWikiUsers_1_name=Spirou
        will result in the following map { "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.
        Returns:
        a map containing ordered data or an empty map.