Skip to content
Snippets Groups Projects
Commit f8597a13 authored by Vincent Massol's avatar Vincent Massol
Browse files

XWIKI-20579: Improve documentation (javadoc) for the UserScriptService

parent 1b13770c
No related branches found
No related tags found
No related merge requests found
......@@ -85,6 +85,11 @@ public <S extends ScriptService> S get(String serviceName)
}
/**
* Get the properties defined explicitly for a user (e.g. in the user profile wiki page), such as Editor to use,
* Advanced or Simple user, First name, etc), without fallbacks (i.e. without checking for properties defined in
* the current space - in {@code <space>.WebPreferences}, in the current wiki - in {@code XWiki.XWikiPreferences},
* and ultimately in the {@code xwiki.properties} configuration file).
*
* @param userReference the reference to the user properties to resolve
* @param parameters optional parameters that have a meaning only for the specific resolver implementation used
* @return the User Properties object
......@@ -96,6 +101,11 @@ public UserProperties getProperties(UserReference userReference, Object... param
}
/**
* Get the properties defined explicitly for a user (e.g. in the user profile wiki page), such as Editor to use,
* Advanced or Simple user, First name, etc), without fallbacks (i.e. without checking for properties defined in
* the current space - in {@code <space>.WebPreferences}, in the current wiki - in {@code XWiki.XWikiPreferences},
* and ultimately in the {@code xwiki.properties} configuration file).
* <p>
* Note that we have a {@code UserReferenceConverter} component to automatically convert from
* String to {@link UserReference} but since in the signature we accept a vararg of Object, the
* {@link #getProperties(Object...)} is called instead when a single string is passed. This is the reason for this
......@@ -112,6 +122,11 @@ public UserProperties getProperties(String userReference, Object... parameters)
}
/**
* Get the properties defined explicitly for the current user (e.g. in the user profile wiki page), such as Editor
* to use, Advanced or Simple user, First name, etc), without fallbacks (i.e. without checking for properties
* defined in the current space - in {@code <space>.WebPreferences}, in the current wiki - in
* {@code XWiki.XWikiPreferences}, and ultimately in the {@code xwiki.properties} configuration file).
*
* @param parameters optional parameters that have a meaning only for the specific resolver implementation used
* @return the User Properties object for the current user
* @since 12.2
......@@ -122,6 +137,11 @@ public UserProperties getProperties(Object... parameters)
}
/**
* Get the properties defined explicitly for the current user (e.g. in the user profile wiki page), such as Editor
* to use, Advanced or Simple user, First name, etc), without fallbacks (i.e. without checking for properties
* defined in the current space - in {@code <space>.WebPreferences}, in the current wiki - in
* {@code XWiki.XWikiPreferences}, and ultimately in the {@code xwiki.properties} configuration file).
*
* @return the User Properties object for the current user
* @since 12.2
*/
......@@ -131,6 +151,11 @@ public UserProperties getProperties()
}
/**
* Get the properties defined explicitly for the current user (e.g. in the user profile wiki page), such as Editor
* to use, Advanced or Simple user, First name, etc), with fallbacks (i.e. by also checking for properties
* defined in the current space - in {@code <space>.WebPreferences}, in the current wiki - in
* {@code XWiki.XWikiPreferences}, and ultimately in the {@code xwiki.properties} configuration file).
*
* @param userReference the reference to the user properties to resolve
* @param parameters optional parameters that have a meaning only for the specific resolver implementation used
* @return the User Properties object
......@@ -142,6 +167,11 @@ public UserProperties getAllProperties(UserReference userReference, Object... pa
}
/**
* Get the properties defined explicitly for the current user (e.g. in the user profile wiki page), such as Editor
* to use, Advanced or Simple user, First name, etc), with fallbacks (i.e. by also checking for properties
* defined in the current space - in {@code <space>.WebPreferences}, in the current wiki - in
* {@code XWiki.XWikiPreferences}, and ultimately in the {@code xwiki.properties} configuration file).
*
* @param parameters optional parameters that have a meaning only for the specific resolver implementation used
* @return the User Properties object for the current user
* @since 12.2
......@@ -152,6 +182,11 @@ public UserProperties getAllProperties(Object... parameters)
}
/**
* Get the properties defined explicitly for the current user (e.g. in the user profile wiki page), such as Editor
* to use, Advanced or Simple user, First name, etc), with fallbacks (i.e. by also checking for properties
* defined in the current space - in {@code <space>.WebPreferences}, in the current wiki - in
* {@code XWiki.XWikiPreferences}, and ultimately in the {@code xwiki.properties} configuration file).
*
* @return the User Properties object for the current user
* @since 12.2
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment