@Component @Named(value="sheet") @Singleton public class SheetScriptService extends Object implements org.xwiki.script.service.ScriptService
SheetManager
and SheetBinder
to Velocity scripts.Constructor and Description |
---|
SheetScriptService() |
Modifier and Type | Method and Description |
---|---|
boolean |
bindClassSheet(Document classDocument,
DocumentReference sheetReference)
Binds a sheet to a XWiki class.
|
boolean |
bindDocumentSheet(Document document,
DocumentReference sheetReference)
Binds a sheet to a XWiki document.
|
List<DocumentReference> |
getClassSheets(Document classDocument)
Retrieves the list of sheets explicitly bound to a XWiki class.
|
List<DocumentReference> |
getDocuments(DocumentReference sheetReference)
Retrieves the list of documents that have explicitly bound the specified sheet.
|
List<DocumentReference> |
getDocumentSheets(Document document)
Retrieves the list of sheets explicitly bound to a XWiki document.
|
List<DocumentReference> |
getSheets(Document document,
String action)
Returns the list of sheets associated with a XWiki document.
|
boolean |
unbindClassSheet(Document classDocument,
DocumentReference sheetReference)
Removes the binding between a XWiki class and a sheet.
|
boolean |
unbindDocumentSheet(Document document,
DocumentReference sheetReference)
Removes the binding between a XWiki document and a sheet.
|
public List<DocumentReference> getSheets(Document document, String action)
document
- the document for which to retrieve the sheetsaction
- the action for which to retrieve the sheets ('view', 'edit' etc.)public List<DocumentReference> getClassSheets(Document classDocument)
classDocument
- a document holding a class definitionpublic boolean bindClassSheet(Document classDocument, DocumentReference sheetReference)
classDocument
- a document holding a class definitionsheetReference
- a reference to a sheettrue
if the sheet was successfully bound, false
otherwisepublic boolean unbindClassSheet(Document classDocument, DocumentReference sheetReference)
classDocument
- a document holding a class definitionsheetReference
- a reference to a sheettrue
if the sheet was successfully unbound, false
otherwisepublic List<DocumentReference> getDocumentSheets(Document document)
document
- a XWiki documentpublic boolean bindDocumentSheet(Document document, DocumentReference sheetReference)
document
- a XWiki documentsheetReference
- a reference to a sheettrue
if the sheet was successfully bound, false
otherwisepublic boolean unbindDocumentSheet(Document document, DocumentReference sheetReference)
document
- a XWiki documentsheetReference
- a reference to a sheettrue
if the sheet was successfully unbound, false
otherwisepublic List<DocumentReference> getDocuments(DocumentReference sheetReference)
sheetReference
- a reference to a sheetCopyright © 2004–2019 XWiki. All rights reserved.