Package org.xwiki.refactoring.script
Interface RequestFactory
-
@Role public interface RequestFactory
Factory dedicated to the creation of the requests.- Since:
- 10.11RC1
- Version:
- $Id: d50795714d375da659ffb91951a5d2922b91332c $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CopyRequest
createCopyAsRequest(org.xwiki.model.reference.EntityReference reference, String copyName)
Creates a request to copy the specified entity with a different name.CopyRequest
createCopyAsRequest(org.xwiki.model.reference.EntityReference sourceReference, org.xwiki.model.reference.EntityReference copyReference)
Creates a request to copy the specified entity with a different reference.CopyRequest
createCopyRequest(Collection<org.xwiki.model.reference.EntityReference> sources, org.xwiki.model.reference.EntityReference destination)
Creates a request to copy the specified source entities to the specified destination entity.CopyRequest
createCopyRequest(org.xwiki.model.reference.EntityReference source, org.xwiki.model.reference.EntityReference destination)
Creates a request to copy the specified source entity to the specified destination entity.CreateRequest
createCreateRequest(Collection<org.xwiki.model.reference.EntityReference> entityReferences)
Creates a request to create the specified entities.EntityRequest
createDeleteRequest(Collection<org.xwiki.model.reference.EntityReference> entityReferences)
Creates a request to delete the specified entities.MoveRequest
createMoveRequest(Collection<org.xwiki.model.reference.EntityReference> sources, org.xwiki.model.reference.EntityReference destination)
Creates a request to move the specified source entities to the specified destination entity (which becomes their new parent).MoveRequest
createMoveRequest(org.xwiki.model.reference.EntityReference source, org.xwiki.model.reference.EntityReference destination)
Creates a request to move the specified source entity to the specified destination entity (which becomes its new parent).PermanentlyDeleteRequest
createPermanentlyDeleteRequest(String batchId)
Creates a request to permanently delete a specified batch of deleted documents from the recycle bin.PermanentlyDeleteRequest
createPermanentlyDeleteRequest(List<Long> deletedDocumentIds)
Creates a request to permanently delete a specified list of deleted documents from the recycle bin.MoveRequest
createRenameRequest(org.xwiki.model.reference.EntityReference reference, String newName)
Creates a request to rename the specified entity.MoveRequest
createRenameRequest(org.xwiki.model.reference.EntityReference oldReference, org.xwiki.model.reference.EntityReference newReference)
Creates a request to rename the entity specified by the given old reference.ReplaceUserRequest
createReplaceUserRequest(org.xwiki.model.reference.DocumentReference oldUserReference, org.xwiki.model.reference.DocumentReference newUserReference)
Creates a request to replace the occurrences of the old user reference with the new user reference.RestoreRequest
createRestoreRequest(String batchId)
Creates a request to restore a specified batch of deleted documents from the recycle bin.RestoreRequest
createRestoreRequest(List<Long> deletedDocumentIds)
Creates a request to restore a specified list of deleted documents from the recycle bin.
-
-
-
Method Detail
-
createMoveRequest
MoveRequest createMoveRequest(Collection<org.xwiki.model.reference.EntityReference> sources, org.xwiki.model.reference.EntityReference destination)
Creates a request to move the specified source entities to the specified destination entity (which becomes their new parent).- Parameters:
sources
- specifies the entities to be moveddestination
- specifies the place where to move the entities (their new parent entity)- Returns:
- the move request
-
createMoveRequest
MoveRequest createMoveRequest(org.xwiki.model.reference.EntityReference source, org.xwiki.model.reference.EntityReference destination)
Creates a request to move the specified source entity to the specified destination entity (which becomes its new parent).- Parameters:
source
- specifies the entity to be moveddestination
- specifies the place where to move the source entity (its new parent entity)- Returns:
- the move request
-
createRenameRequest
MoveRequest createRenameRequest(org.xwiki.model.reference.EntityReference oldReference, org.xwiki.model.reference.EntityReference newReference)
Creates a request to rename the entity specified by the given old reference.- Parameters:
oldReference
- the entity to renamenewReference
- the new entity reference after the rename- Returns:
- the rename request
-
createRenameRequest
MoveRequest createRenameRequest(org.xwiki.model.reference.EntityReference reference, String newName)
Creates a request to rename the specified entity.- Parameters:
reference
- the entity to renamenewName
- the new entity name- Returns:
- the rename request
-
createCopyRequest
CopyRequest createCopyRequest(Collection<org.xwiki.model.reference.EntityReference> sources, org.xwiki.model.reference.EntityReference destination)
Creates a request to copy the specified source entities to the specified destination entity.- Parameters:
sources
- specifies the entities to be copieddestination
- specifies the place where to copy the entities (becomes the parent of the copies)- Returns:
- the copy request
-
createCopyRequest
CopyRequest createCopyRequest(org.xwiki.model.reference.EntityReference source, org.xwiki.model.reference.EntityReference destination)
Creates a request to copy the specified source entity to the specified destination entity.- Parameters:
source
- specifies the entity to be copieddestination
- specifies the place where to copy the source entity (becomes the parent of the copy)- Returns:
- the copy request
-
createCopyAsRequest
CopyRequest createCopyAsRequest(org.xwiki.model.reference.EntityReference sourceReference, org.xwiki.model.reference.EntityReference copyReference)
Creates a request to copy the specified entity with a different reference.- Parameters:
sourceReference
- the entity to copycopyReference
- the reference to use for the copy- Returns:
- the copy-as request
-
createCopyAsRequest
CopyRequest createCopyAsRequest(org.xwiki.model.reference.EntityReference reference, String copyName)
Creates a request to copy the specified entity with a different name.- Parameters:
reference
- the entity to copycopyName
- the name of the entity copy- Returns:
- the copy-as request
-
createDeleteRequest
EntityRequest createDeleteRequest(Collection<org.xwiki.model.reference.EntityReference> entityReferences)
Creates a request to delete the specified entities.- Parameters:
entityReferences
- the entities to delete- Returns:
- the delete request
-
createCreateRequest
CreateRequest createCreateRequest(Collection<org.xwiki.model.reference.EntityReference> entityReferences)
Creates a request to create the specified entities.- Parameters:
entityReferences
- the entities to create- Returns:
- the create request
- Since:
- 7.4M2
-
createPermanentlyDeleteRequest
PermanentlyDeleteRequest createPermanentlyDeleteRequest(String batchId)
Creates a request to permanently delete a specified batch of deleted documents from the recycle bin.- Parameters:
batchId
- the ID of the batch of deleted documents to permanently delete- Returns:
- the permanently delete request
- Since:
- 10.10RC1
-
createPermanentlyDeleteRequest
PermanentlyDeleteRequest createPermanentlyDeleteRequest(List<Long> deletedDocumentIds)
Creates a request to permanently delete a specified list of deleted documents from the recycle bin.- Parameters:
deletedDocumentIds
- the list of IDs of the deleted documents to permanently delete- Returns:
- the permanently delete request
- Since:
- 10.10RC1
-
createRestoreRequest
RestoreRequest createRestoreRequest(String batchId)
Creates a request to restore a specified batch of deleted documents from the recycle bin.- Parameters:
batchId
- the ID of the batch of deleted documents to restore- Returns:
- the restore request
- Since:
- 9.4RC1
-
createRestoreRequest
RestoreRequest createRestoreRequest(List<Long> deletedDocumentIds)
Creates a request to restore a specified list of deleted documents from the recycle bin.- Parameters:
deletedDocumentIds
- the list of IDs of the deleted documents to restore- Returns:
- the restore request
- Since:
- 9.4RC1
-
createReplaceUserRequest
ReplaceUserRequest createReplaceUserRequest(org.xwiki.model.reference.DocumentReference oldUserReference, org.xwiki.model.reference.DocumentReference newUserReference)
Creates a request to replace the occurrences of the old user reference with the new user reference.- Parameters:
oldUserReference
- the old user referencenewUserReference
- the new user reference- Returns:
- the request to replace the user reference
- Since:
- 11.8RC1
-
-