@Role
public interface AuthorExecutor
| Modifier and Type | Method and Description |
|---|---|
void |
after(AutoCloseable context)
Restore the context to it's previous state as defined by the provided
AutoCloseable. |
AutoCloseable |
before(DocumentReference authorReference)
Deprecated.
since 10.11RC1, use
before(DocumentReference, DocumentReference) instead |
default AutoCloseable |
before(DocumentReference authorReference,
DocumentReference sourceReference)
Setup the context so that following code is executed with provided user rights.
|
<V> V |
call(Callable<V> callable,
DocumentReference authorReference)
Deprecated.
since 10.11RC1, use
call(Callable, DocumentReference, DocumentReference) instead |
default <V> V |
call(Callable<V> callable,
DocumentReference authorReference,
DocumentReference sourceReference)
Execute the passed
Callable with the rights of the passed user. |
@Deprecated <V> V call(Callable<V> callable, DocumentReference authorReference) throws Exception
call(Callable, DocumentReference, DocumentReference) insteadCallable with the rights of the passed user.V - the result type of method callcallable - the task to executeauthorReference - the user to check rights onException - if unable to compute a result@Unstable default <V> V call(Callable<V> callable, DocumentReference authorReference, DocumentReference sourceReference) throws Exception
Callable with the rights of the passed user.V - the result type of method callcallable - the task to executeauthorReference - the user to check rights onsourceReference - the reference of the document associated with the Callable (which will be used to
test the author right)Exception - if unable to compute a result@Deprecated AutoCloseable before(DocumentReference authorReference)
before(DocumentReference, DocumentReference) instead
try (AutoCloseable context = this.executor.before(author)) {
...
}
authorReference - the user to check rights onafter(AutoCloseable)@Unstable default AutoCloseable before(DocumentReference authorReference, DocumentReference sourceReference)
try (AutoCloseable context = this.executor.before(author, sourceDocument)) {
...
}
authorReference - the user to check rights onsourceReference - the reference of the document associated with the Callable (which will be used to
test the author right)after(AutoCloseable)void after(AutoCloseable context)
AutoCloseable.context - the context to restorebefore(DocumentReference)Copyright © 2004–2019 XWiki. All rights reserved.