Class OverwriteQuestion


  • public class OverwriteQuestion
    extends Object
    Question asked when an entity with the same name is found during a copy or move operation and we don't know whether to overwrite or keep the existing entity.
    Since:
    7.2M1
    Version:
    $Id: 6df92c59509e40590efbdbdf86f81f7efcde59cc $
    • Constructor Detail

      • OverwriteQuestion

        public OverwriteQuestion​(org.xwiki.model.reference.EntityReference source,
                                 org.xwiki.model.reference.EntityReference destination)
        Ask whether to overwrite or not the destination entity with the source entity.
        Parameters:
        source - the entity being copied or moved
        destination - an entity with the same name that exists at the destination
    • Method Detail

      • getSource

        public org.xwiki.model.reference.EntityReference getSource()
        Returns:
        the entity that is being copied or moved
      • getDestination

        public org.xwiki.model.reference.EntityReference getDestination()
        Returns:
        an entity with the same name that exists at the destination
      • isOverwrite

        public boolean isOverwrite()
        Returns:
        true to overwrite the destination entity with the one being copied or moved, false to keep the destination entity
      • setOverwrite

        public void setOverwrite​(boolean overwrite)
        Sets whether to overwrite or not the destination entity with the one being copied or moved.
        Parameters:
        overwrite - true to overwrite, false to keep
      • isAskAgain

        public boolean isAskAgain()
        Returns:
        whether this question will be asked again or not if another pair of entities with the same name is found
      • setAskAgain

        public void setAskAgain​(boolean askAgain)
        Sets whether this question will be asked again or not if another pair of entities with the same name is found.
        Parameters:
        askAgain - true to ask again, false to perform the same action for the following entities, during the current operation