@Test public void testgetUser() { this.xcontext.setMainXWiki("wiki"); this.xcontext.setWikiId("wiki"); this.xcontext.setUserReference(new DocumentReference("wiki", "space", "user")); assertEquals("space.user", this.xcontext.getUser()); assertEquals("space.user", this.xcontext.getLocalUser()); assertEquals("space.user", this.xcontext.getXWikiUser().getUser()); assertTrue(this.xcontext.getXWikiUser().isMain(), "space.user"); this.xcontext.setWikiId("wiki1"); assertEquals("wiki:space.user", this.xcontext.getUser()); assertEquals("space.user", this.xcontext.getLocalUser()); assertEquals("wiki:space.user", this.xcontext.getXWikiUser().getUser()); assertTrue(this.xcontext.getXWikiUser().isMain(), "space.user"); }
@Deprecated public String getUser() { if (this.userReference != null) { if (getWikiId() == null) { return getLocalEntityReferenceSerializer().serialize(this.userReference); } else { return getCompactWikiEntityReferenceSerializer().serialize(this.userReference, new WikiReference(getWikiId())); } } else { return XWikiRightService.GUEST_USER_FULLNAME; } }
XWikiContext extends Hashtable<Object, Object> { @Deprecated public String getUser() { if (this.userReference != null) { if (getWikiId() == null) { return getLocalEntityReferenceSerializer().serialize(this.userReference); } else { return getCompactWikiEntityReferenceSerializer().serialize(this.userReference, new WikiReference(getWikiId())); } } else { return XWikiRightService.GUEST_USER_FULLNAME; } } }
XWikiContext extends Hashtable<Object, Object> { @Deprecated public String getUser() { if (this.userReference != null) { if (getWikiId() == null) { return getLocalEntityReferenceSerializer().serialize(this.userReference); } else { return getCompactWikiEntityReferenceSerializer().serialize(this.userReference, new WikiReference(getWikiId())); } } else { return XWikiRightService.GUEST_USER_FULLNAME; } } XWikiContext(); }
XWikiContext extends Hashtable<Object, Object> { @Deprecated public String getUser() { if (this.userReference != null) { if (getWikiId() == null) { return getLocalEntityReferenceSerializer().serialize(this.userReference); } else { return getCompactWikiEntityReferenceSerializer().serialize(this.userReference, new WikiReference(getWikiId())); } } else { return XWikiRightService.GUEST_USER_FULLNAME; } } XWikiContext(); XWiki getWiki(); Util getUtil(); void setWiki(XWiki wiki); XWikiEngineContext getEngineContext(); void setEngineContext(XWikiEngineContext engine_context); XWikiRequest getRequest(); void setRequest(XWikiRequest request); String getAction(); void setAction(String action); XWikiResponse getResponse(); void setResponse(XWikiResponse response); @Deprecated String getDatabase(); String getWikiId(); WikiReference getWikiReference(); @Deprecated void setDatabase(String wikiId); void setWikiId(String wikiId); void setWikiReference(WikiReference wikiReference); @Override synchronized Object get(Object key); @Override synchronized Object put(Object key, Object value); @Override synchronized Object remove(Object key); @Deprecated String getOriginalDatabase(); String getOriginalWikiId(); @Deprecated void setOriginalDatabase(String wikiId); void setOriginalWikiId(String wikiId); boolean isMainWiki(); boolean isMainWiki(String wikiName); XWikiDocument getDoc(); void setDoc(XWikiDocument doc); DocumentReference getUserReference(); void setUserReference(DocumentReference userReference); @Deprecated void setUser(String user); @Deprecated String getUser(); @Deprecated String getLocalUser(); @Deprecated XWikiUser getXWikiUser(); @Deprecated String getLanguage(); @Deprecated void setLanguage(String language); Locale getLocale(); void setLocale(Locale locale); @Deprecated String getInterfaceLanguage(); Locale getInterfaceLocale(); void setInterfaceLocale(Locale interfaceLocale); int getMode(); void setMode(int mode); URL getURL(); void setURL(URL url); XWikiURLFactory getURLFactory(); void setURLFactory(XWikiURLFactory URLFactory); XWikiForm getForm(); void setForm(XWikiForm form); boolean isFinished(); void setFinished(boolean finished); XWikiDocument getWikiServer(); int getCacheDuration(); void setCacheDuration(int cacheDuration); String getMainXWiki(); void setMainXWiki(String str); void addBaseClass(BaseClass bclass); BaseClass getBaseClass(DocumentReference classReference); void removeBaseClass(DocumentReference classReference); void flushClassCache(); void setLinksAction(String action); void unsetLinksAction(); String getLinksAction(); void setLinksQueryString(String value); void unsetLinksQueryString(); String getLinksQueryString(); @Deprecated XWikiMessageTool getMessageTool(); XWikiValidationStatus getValidationStatus(); void setValidationStatus(XWikiValidationStatus status); void addDisplayedField(String fieldname); List<String> getDisplayedFields(); @Deprecated String getEditorWysiwyg(); void dropPermissions(); boolean hasDroppedPermissions(); @Override synchronized XWikiContext clone(); void declareInExecutionContext(ExecutionContext executionContext); DocumentReference getAuthorReference(); }
XWikiContext extends Hashtable<Object, Object> { @Deprecated public String getUser() { if (this.userReference != null) { if (getWikiId() == null) { return getLocalEntityReferenceSerializer().serialize(this.userReference); } else { return getCompactWikiEntityReferenceSerializer().serialize(this.userReference, new WikiReference(getWikiId())); } } else { return XWikiRightService.GUEST_USER_FULLNAME; } } XWikiContext(); XWiki getWiki(); Util getUtil(); void setWiki(XWiki wiki); XWikiEngineContext getEngineContext(); void setEngineContext(XWikiEngineContext engine_context); XWikiRequest getRequest(); void setRequest(XWikiRequest request); String getAction(); void setAction(String action); XWikiResponse getResponse(); void setResponse(XWikiResponse response); @Deprecated String getDatabase(); String getWikiId(); WikiReference getWikiReference(); @Deprecated void setDatabase(String wikiId); void setWikiId(String wikiId); void setWikiReference(WikiReference wikiReference); @Override synchronized Object get(Object key); @Override synchronized Object put(Object key, Object value); @Override synchronized Object remove(Object key); @Deprecated String getOriginalDatabase(); String getOriginalWikiId(); @Deprecated void setOriginalDatabase(String wikiId); void setOriginalWikiId(String wikiId); boolean isMainWiki(); boolean isMainWiki(String wikiName); XWikiDocument getDoc(); void setDoc(XWikiDocument doc); DocumentReference getUserReference(); void setUserReference(DocumentReference userReference); @Deprecated void setUser(String user); @Deprecated String getUser(); @Deprecated String getLocalUser(); @Deprecated XWikiUser getXWikiUser(); @Deprecated String getLanguage(); @Deprecated void setLanguage(String language); Locale getLocale(); void setLocale(Locale locale); @Deprecated String getInterfaceLanguage(); Locale getInterfaceLocale(); void setInterfaceLocale(Locale interfaceLocale); int getMode(); void setMode(int mode); URL getURL(); void setURL(URL url); XWikiURLFactory getURLFactory(); void setURLFactory(XWikiURLFactory URLFactory); XWikiForm getForm(); void setForm(XWikiForm form); boolean isFinished(); void setFinished(boolean finished); XWikiDocument getWikiServer(); int getCacheDuration(); void setCacheDuration(int cacheDuration); String getMainXWiki(); void setMainXWiki(String str); void addBaseClass(BaseClass bclass); BaseClass getBaseClass(DocumentReference classReference); void removeBaseClass(DocumentReference classReference); void flushClassCache(); void setLinksAction(String action); void unsetLinksAction(); String getLinksAction(); void setLinksQueryString(String value); void unsetLinksQueryString(); String getLinksQueryString(); @Deprecated XWikiMessageTool getMessageTool(); XWikiValidationStatus getValidationStatus(); void setValidationStatus(XWikiValidationStatus status); void addDisplayedField(String fieldname); List<String> getDisplayedFields(); @Deprecated String getEditorWysiwyg(); void dropPermissions(); boolean hasDroppedPermissions(); @Override synchronized XWikiContext clone(); void declareInExecutionContext(ExecutionContext executionContext); DocumentReference getAuthorReference(); static final ParameterizedType TYPE_PROVIDER; static final int MODE_SERVLET; static final int MODE_PORTLET; static final int MODE_XMLRPC; static final int MODE_ATOM; static final int MODE_PDF; static final int MODE_GWT; static final int MODE_GWT_DEBUG; static final String EXECUTIONCONTEXT_KEY; @Deprecated
    static final String KEY_LEGACY_VELOCITYCONTEXT; }