/** * Get fullName of the profile document of the document creator. * * @return The fullName of the profile document of the document creator. */ public String getCreator() { return this.doc.getCreator(); }
private boolean setWikiMacroClassesDocumentFields(XWikiDocument doc, String title) { boolean needsUpdate = false; if (StringUtils.isBlank(doc.getCreator())) { needsUpdate = true; doc.setCreator(XWikiRightService.SUPERADMIN_USER); } if (StringUtils.isBlank(doc.getAuthor())) { needsUpdate = true; doc.setAuthorReference(doc.getCreatorReference()); } if (StringUtils.isBlank(doc.getParent())) { needsUpdate = true; doc.setParent("XWiki.XWikiClasses"); } if (StringUtils.isBlank(doc.getTitle())) { needsUpdate = true; doc.setTitle(title); } if (StringUtils.isBlank(doc.getContent()) || !Syntax.XWIKI_2_0.equals(doc.getSyntax())) { needsUpdate = true; doc.setContent("{{include document=\"XWiki.ClassSheet\" /}}"); doc.setSyntax(Syntax.XWIKI_2_0); } return needsUpdate; }
needsUpdate |= bclass.addNumberField("nb", "nb", 5, "integer"); if (StringUtils.isBlank(doc.getCreator())) { needsUpdate = true; doc.setCreator(XWikiRightService.SUPERADMIN_USER);
public boolean isCreator(String username) { if (username.equals(XWikiRightService.GUEST_USER_FULLNAME)) { return false; } return username.equals(getCreator()); }
needsUpdate |= bclass.addStaticListField("tags", "Tags", 1, true, true, "", null, null); if (StringUtils.isBlank(doc.getCreator())) { needsUpdate = true; doc.setCreator(XWikiRightService.SUPERADMIN_USER);
/** * {@inheritDoc} * * @see com.xpn.xwiki.doc.XWikiDocument#getCreator() */ @Override public String getCreator() { return getDocument().getCreator(); }
/** * Set cleaner common documents fields. * * @param doc document to modify * @return true if the fields have been modified, false otherwise */ private boolean setCleanerCommonDocumentsFields(XWikiDocument doc) { boolean needsUpdate = false; if (StringUtils.isBlank(doc.getAuthor())) { needsUpdate = true; doc.setAuthor(XWIKI_DEFAULT_ADMIN); } if (StringUtils.isBlank(doc.getCreator())) { needsUpdate = true; doc.setCreator(XWIKI_DEFAULT_ADMIN); } if (StringUtils.isBlank(doc.getParent())) { needsUpdate = true; doc.setParent("Scheduler.WebHome"); } return needsUpdate; }
if (StringUtils.isBlank(doc.getCreator())) { needsUpdate = true; doc.setCreator(XWikiRightService.SUPERADMIN_USER); doc.setAuthor(doc.getCreator());
public DocumentData(final XWikiDocument doc, final XWikiContext context, final boolean deleted) { super(LucenePlugin.DOCTYPE_WIKIPAGE, doc, context, deleted); setAuthor(doc.getAuthor()); setCreator(doc.getCreator()); setModificationDate(doc.getDate()); setCreationDate(doc.getCreationDate()); }
if (!getCreator().equals(doc.getCreator())) { return false;
needsUpdate |= bclass.addTextAreaField("html", "HTML", 80, 15); if (StringUtils.isBlank(doc.getCreator())) { needsUpdate = true; doc.setCreator("superadmin"); doc.setAuthor(doc.getCreator());
if ((creator != null) && (!creator.equals(getCreator()))) { if ((getCreator().equals(context.getUser())) || (context.getWiki().getRightService().hasAdminRights(context))) { setCreator(creator);
needsUpdate |= bclass.addTextField("contextDatabase", "Job execution context database", 30); if (StringUtils.isBlank(doc.getCreator())) { needsUpdate = true; doc.setCreator("superadmin"); doc.setAuthor(doc.getCreator());
localeParameters.put(WikiDocumentFilter.PARAMETER_CREATION_AUTHOR, document.getCreator()); localeParameters.put(WikiDocumentFilter.PARAMETER_CREATION_DATE, document.getCreationDate()); localeParameters.put(WikiDocumentFilter.PARAMETER_LASTREVISION, document.getVersion());
template.setAuthor(template.getCreator()); List<String> args = new ArrayList<String>(1); args.add("Group");
String creator = doc.getCreator(); if ((user != null) && (user.getUser() != null) && (creator != null)) { if (user.getUser().equals(creator)) {
doc.setMeta(xdoc.getMeta()); doc.setFormat(xdoc.getFormat()); doc.setCreator(xdoc.getCreator()); doc.setAuthor(xdoc.getAuthor()); doc.setContentAuthor(xdoc.getContentAuthor());
doc = new XWikiDocument(new DocumentReference(context.getWikiId(), getClassSpace(), getClassName())); doc.setCreator(XWikiRightService.SUPERADMIN_USER); doc.setAuthor(doc.getCreator()); needsUpdate = true;
el.addText(getCreator()); wr.write(el);
setTemplateDocumentReference(document.getTemplateDocumentReference()); setParent(document.getParent()); setCreator(document.getCreator()); setDefaultLanguage(document.getDefaultLanguage()); setDefaultTemplate(document.getDefaultTemplate());