/** * @param username name as a string. * @param wikiReference default wiki, if not explicitly specified in the username. * @return A document reference that uniquely identifies the user. */ private DocumentReference resolveUserName(String username, WikiReference wikiReference) { return userAndGroupReferenceResolver.resolve(username, wikiReference); }
/** * @param docname name of the document as string. * @param wikiReference the default wiki where the document will be * assumed do be located, unless explicitly specified in docname. * @return the document reference. */ private DocumentReference resolveDocumentName(String docname, WikiReference wikiReference) { return documentReferenceResolver.resolve(docname, wikiReference); }
@Override protected DocumentReference getEntityXClassReference() { return this.referenceResolver.resolve(Patient.CLASS_REFERENCE); } }
private DocumentReference getCurrentDocument() { return this.currentDocumentResolver.resolve(""); } }
@Override public String getScorerType() { Object configured = this.bridge.getProperty(this.entityResolver.resolve(CONFIGURATION_LOCATION), this.entityResolver.resolve(CONFIGURATION_CLASS), "scorer"); if (configured == null || StringUtils.isBlank(String.valueOf(configured))) { return "default"; } return String.valueOf(configured); } }
/** * @deprecated since 2.3M1 use {@link #setPhonyDocument(DocumentReference, XWikiContext, VelocityContext)} */ @Deprecated public void setPhonyDocument(String docName, XWikiContext context, VelocityContext vcontext) { setPhonyDocument(this.currentMixedDocumentReferenceResolver.resolve(docName), context, vcontext); }
/** * @deprecated since 2.2M2 use {@link #getXClass(DocumentReference, XWikiContext)} */ @Deprecated public BaseClass getClass(String fullName, XWikiContext context) throws XWikiException { DocumentReference reference = null; if (!StringUtils.isEmpty(fullName)) { reference = this.currentMixedDocumentReferenceResolver.resolve(fullName); } return getXClass(reference, context); }
/** * Rename the current document and all the backlinks leading to it. Will also change parent field in all documents * which list the document we are renaming as their parent. See * {@link #rename(String, java.util.List, java.util.List)} for more details. * * @param newDocumentName the new document name. If the space is not specified then defaults to the current space. * @throws XWikiException in case of an error */ public void rename(String newDocumentName) throws XWikiException { rename(this.currentMixedDocumentReferenceResolver.resolve(newDocumentName)); }
/** * @deprecated since 2.2M1 use {@link #copyDocument(DocumentReference, XWikiContext)} instead */ @Deprecated public XWikiDocument copyDocument(String newDocumentName, XWikiContext context) throws XWikiException { return copyDocument(this.currentMixedDocumentReferenceResolver.resolve(newDocumentName), context); }
@Override public DocumentReference getAnnotationClassReference() { String annotationClassName = configuration.get().getProperty("annotationClass", "XWiki.XWikiComments"); return resolver.resolve(annotationClassName); }
@Override public EntityReference next() { Object[] item = this.data.next(); return new AttachmentReference(String.valueOf(item[1]), HibernateAttachmentsReader.this.resolver.resolve(String.valueOf(item[0]))); }
private DocumentReference resolveUser(String id) { DocumentReference userReference = this.currentResolver.resolve(id, USERS_SPACE); return this.bridge.exists(userReference) ? userReference : null; }
/** * @deprecated since 2.2M1 use {@link #setTemplateDocumentReference(DocumentReference)} instead */ @Deprecated public void setTemplate(String template) { DocumentReference templateReference = null; if (!StringUtils.isEmpty(template)) { templateReference = this.currentMixedDocumentReferenceResolver.resolve(template); } setTemplateDocumentReference(templateReference); }
private DocumentReference resolveGroup(String id) { DocumentReference groupReference = this.currentResolver.resolve(id, GROUPS_SPACE); return this.bridge.exists(groupReference) ? groupReference : null; } }
@Override public void streamSolrDocument(SolrDocument doc) { solrIndexer.get().index(solrDocumentReferenceResolver.resolve(doc), true); }
@Override public Group getGroup(String name) { if (StringUtils.isBlank(name)) { return null; } DocumentReference groupReference = this.resolver.resolve(name, GROUP_SPACE); return new DefaultGroup(groupReference); }
@Override public EntityReference next() { Object[] item = this.data.next(); return new AttachmentReference(String.valueOf(item[1]), HibernateDeletedAttachmentsReader.this.resolver.resolve(String.valueOf(item[0]))); }
private boolean hasViewRights(String familyID, DocumentReference userProfileDocument) { DocumentReference doc = this.stringResolver.resolve(String.valueOf(familyID), Family.DATA_SPACE); if (!this.access.hasAccess(Right.VIEW, userProfileDocument, doc)) { return false; } return true; } }
private List<DocumentReference> getSubscriberReferences(Collection<String> subscribers) { List<DocumentReference> result = new ArrayList<>(); XWikiContext context = contextProvider.get(); WikiReference currentWikiReference = new WikiReference(context.getWikiId()); for (String subscriber : subscribers) { DocumentReference subscriberReference = explicitDocumentReferenceResolver.resolve(subscriber, currentWikiReference); result.add(subscriberReference); } return result; }
@Override public Pair<DocumentReference, String> next() { SolrDocument result = getResults().get(index++); DocumentReference documentReference = this.solrDocumentReferenceResolver.resolve(result); String version = (String) result.get(FieldUtils.VERSION); return new ImmutablePair<DocumentReference, String>(documentReference, version); }