Class GroupsClass

    • Constructor Detail

      • GroupsClass

        public GroupsClass​(PropertyMetaClass metaClass)
        Creates a new Groups List property that is described by the given meta class.
        Parameters:
        metaClass - the meta class that defines the list of meta properties associated with this property type
      • GroupsClass

        public GroupsClass()
        Default constructor.
    • Method Detail

      • isUsesList

        @Deprecated
        public boolean isUsesList()
        Deprecated.
        since 4.3M2 this meta property is not used anymore because we changed the default displayer
        Returns:
        true if the list box that is used to select the groups should be filled with all the available groups, false otherwise
      • setUsesList

        @Deprecated
        public void setUsesList​(boolean usesList)
        Deprecated.
        since 4.3M2 this meta property is not used anymore because we changed the default displayer
        Sets whether to list all the available groups in the list box used to select the groups. This property should not be set when the number of groups is very large.
        Parameters:
        usesList - true to fill the list box that is used to select the groups with all the available groups, false otherwise
      • fromList

        public void fromList​(BaseProperty<?> property,
                             List<String> list)
        Description copied from class: ListClass
        Set the passed List into the passed property.
        Overrides:
        fromList in class ListClass
        Parameters:
        property - the property to modify
        list - the list to set
      • getText

        public String getText​(String value,
                              XWikiContext context)
        Parameters:
        value - a group string reference
        context - the XWiki context
        Returns:
        the name of the specified group (the document name component from the given reference)
      • getListFromString

        public static List<String> getListFromString​(String value)
        Splits the given string into a list of group names.
        Parameters:
        value - a comma separate list of group names
        Returns:
        the list of group names
      • toList

        public List<String> toList​(BaseProperty<?> property)
        Description copied from class: ListClass
        ListClass does not produce only ListPropertys and this method allows to access the value as List whatever property is actually storing it.

        There is no guarantees the returned List will be modifiable.

        Overrides:
        toList in class ListClass
        Parameters:
        property - the property created by this class
        Returns:
        the List representation of this property
      • mergeProperty

        public <T extends EntityReference> void mergeProperty​(BaseProperty<T> currentProperty,
                                                              BaseProperty<T> previousProperty,
                                                              BaseProperty<T> newProperty,
                                                              MergeConfiguration configuration,
                                                              XWikiContext xcontext,
                                                              MergeResult mergeResult)
        Description copied from class: PropertyClass
        Apply a 3 ways merge on passed current, previous and new version of the same property. The passed current version is modified as result of the merge.
        Overrides:
        mergeProperty in class ListClass
        Parameters:
        currentProperty - the current version of the element and the one to modify
        previousProperty - the previous version of the element
        newProperty - the new version of the property
        configuration - the configuration of the merge Indicate how to deal with some conflicts use cases, etc.
        xcontext - the XWiki context
        mergeResult - the merge report