|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.model.internal.scripting.ModelScriptService
@Component @Named(value="model") @Singleton public class ModelScriptService
Provides Model-specific Scripting APIs.
| Constructor Summary | |
|---|---|
ModelScriptService()
|
|
| Method Summary | |
|---|---|
AttachmentReference |
createAttachmentReference(DocumentReference documentReference,
java.lang.String fileName)
Creates an AttachmentReference from a file name and a reference to the document holding that file. |
DocumentReference |
createDocumentReference(java.lang.String wiki,
java.lang.String space,
java.lang.String page)
Create a Document Reference from a passed wiki, space and page names, which can be empty strings or null in which case they are resolved using a "currentmixed/reference" resolver. |
DocumentReference |
createDocumentReference(java.lang.String wiki,
java.lang.String space,
java.lang.String page,
java.lang.String hint)
Create a Document Reference from a passed wiki, space and page names, which can be empty strings or null in which case they are resolved against the Resolver having the hint passed as parameter. |
AttachmentReference |
resolveAttachment(java.lang.String stringRepresentation)
|
AttachmentReference |
resolveAttachment(java.lang.String stringRepresentation,
java.lang.String hint,
java.lang.Object... parameters)
|
DocumentReference |
resolveDocument(java.lang.String stringRepresentation)
|
DocumentReference |
resolveDocument(java.lang.String stringRepresentation,
java.lang.String hint,
java.lang.Object... parameters)
|
java.lang.String |
serialize(EntityReference reference)
|
java.lang.String |
serialize(EntityReference reference,
java.lang.String hint)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ModelScriptService()
| Method Detail |
|---|
public DocumentReference createDocumentReference(java.lang.String wiki,
java.lang.String space,
java.lang.String page)
wiki - the wiki reference name to use (can be empty or null)space - the space reference name to use (can be empty or null)page - the page reference name to use (can be empty or null)
public DocumentReference createDocumentReference(java.lang.String wiki,
java.lang.String space,
java.lang.String page,
java.lang.String hint)
wiki - the wiki reference name to use (can be empty or null)space - the space reference name to use (can be empty or null)page - the page reference name to use (can be empty or null)hint - the hint of the Resolver to use in case any parameter is empty or null
public AttachmentReference createAttachmentReference(DocumentReference documentReference,
java.lang.String fileName)
AttachmentReference from a file name and a reference to the document holding that file.
documentReference - a reference to the document the file is attached tofileName - the name of a file attached to a document
public DocumentReference resolveDocument(java.lang.String stringRepresentation)
stringRepresentation - the document reference specified as a String (using the "wiki:space.page" format and
with special characters escaped where required)
public DocumentReference resolveDocument(java.lang.String stringRepresentation,
java.lang.String hint,
java.lang.Object... parameters)
stringRepresentation - the document reference specified as a String (using the "wiki:space.page" format and
with special characters escaped where required)hint - the hint of the Resolver to use in case any part of the reference is missing (no wiki specified, no
space or no page)parameters - extra parameters to pass to the resolver; you can use these parameters to resolve a document
reference relative to another entity reference
public AttachmentReference resolveAttachment(java.lang.String stringRepresentation)
stringRepresentation - an attachment reference specified as String (using the "wiki:space.page@file"
format and with special characters escaped where required)
AttachmentReference object (resolved using the
resolver)
public AttachmentReference resolveAttachment(java.lang.String stringRepresentation,
java.lang.String hint,
java.lang.Object... parameters)
stringRepresentation - an attachment reference specified as String (using the "wiki:space.page@file"
format and with special characters escaped where required)hint - the hint of the resolver to use in case any part of the reference is missing (no wiki specified, no
space or no page)parameters - extra parameters to pass to the resolver; you can use these parameters to resolve an attachment
reference relative to another entity reference
AttachmentReference objectpublic java.lang.String serialize(EntityReference reference)
reference - the entity reference to transform into a String representation
public java.lang.String serialize(EntityReference reference,
java.lang.String hint)
reference - the entity reference to transform into a String representationhint - the hint of the Serializer to use (valid hints are for example "default", "compact", "local")
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||