/** * @param userReference the user reference to build the key. * @param reference the entity reference to build the key. * @return a unique key for the combination of this user and entity. */ private String getEntryKey(UserSecurityReference userReference, SecurityReference reference) { return keySerializer.serialize(userReference) + KEY_CACHE_SEPARATOR + keySerializer.serialize(reference); }
private String getKeyFromDocument(DocumentReference docRef) { return DOCUMENT_SUFFIX + entityReferenceSerializer.serialize(docRef); } }
/** * @since 7.2RC1 */ public String serializeReference(EntityReference reference) { return referenceSerializer.serialize(reference); }
@Override public String getId(EntityReference reference) throws SolrIndexerException, IllegalArgumentException { String result = this.serializer.serialize(reference); // TODO: Include locale all the other entities once object/attachment translation is implemented. return result; }
/** * @param reference the reference to build the key. * @return a unique key for this reference. */ private String getEntryKey(SecurityReference reference) { return keySerializer.serialize(reference); }
@Override public String serialize() { return String.format("SkinDocument[%s]", entityReferenceSerializer.serialize(skinDocument)); }
@Override public String serialize() { return String.format("LessXObjectProperty[%s]", entityReferenceSerializer.serialize(objectPropertyReference)); } }
private String getFileName(DocumentReference userReference) { String fileName; if (userReference == null) { fileName = XWikiRightService.GUEST_USER_FULLNAME; } else { fileName = serializer.serialize(userReference); } fileName = String.format("%s.png", fileName); return fileName; }
/** * Store all the mappings defined in the specified document in the cache. * * @param doc the reference of the document containing the mapping * @param mappings defined mappings, a map of maps */ private void setMappings(DocumentReference doc, Map<String, Object> mappings) { this.cache.put(this.serializer.serialize(doc), mappings); }
/** * Get the fullName of the document. If a document is named "MyDoc" in space "MySpace", the fullname is * "MySpace.MyDoc". In a wiki, all the documents have a different fullName. * * @return fullName of the document. */ public String getFullName() { return this.localEntityReferenceSerializer.serialize(this.doc.getDocumentReference()); }
protected void setReference(DocumentReference reference) { this.documentReference = reference; setId(this.idPrefix + this.serializer.serialize(reference)); }
/** * @return The user who generated the event. */ public String getAuthor() { if (authorReference == null) { return XWikiRightService.GUEST_USER_FULLNAME; } return getSerializer().serialize(authorReference); }
/** * @deprecated since 2.2M2 use {@link #getChildrenReferences(XWikiContext)} */ @Deprecated public List<String> getChildren(int nb, int start, XWikiContext context) throws XWikiException { List<String> childrenNames = new ArrayList<String>(); for (DocumentReference reference : getChildrenReferences(nb, start, context)) { childrenNames.add(this.localEntityReferenceSerializer.serialize(reference)); } return childrenNames; }
/** * Utility method for checking access rights of the current user on a target document. * * @param documentReference the reference of the document * @param right Access right requested. * @return True if the current user has the given access right, false otherwise. */ private boolean hasRight(DocumentReference documentReference, String right) { return hasRight(this.entityReferenceSerializer.serialize(documentReference), right); }
/** * @deprecated since 2.3M1 use {@link #getDocumentReferenceFromPath(String, XWikiContext)} instead */ @Deprecated public String getDocumentName(XWikiRequest request, XWikiContext context) { return this.localStringEntityReferenceSerializer.serialize(getDocumentReference(request, context)); }
/** * @return the prefix used to generate a cache key combined to the actual configuration property name */ protected String getCacheKeyPrefix() { return this.referenceSerializer.serialize(getDocumentReference()); }
@Override public void setCurrentUserReference(DocumentReference reference) { this.documentAccessBridge.setCurrentUser(this.serializer.serialize(reference)); }
/** * @return the document's space + page name (eg "space.page") * @deprecated since 2.2M1 use {@link #getDocumentReference()} instead */ @Deprecated public String getFullName() { return this.localEntityReferenceSerializer.serialize(getDocumentReference()); }
/** * @return the docoument's wiki + space + page name (eg "wiki:space.page") * @deprecated since 2.2M1 use {@link #getDocumentReference()} instead */ @Deprecated public String getPrefixedFullName() { return this.defaultEntityReferenceSerializer.serialize(getDocumentReference()); }
/** * @deprecated since 2.3M1 use {@link #getDocumentReferenceFromPath(String, XWikiContext)} instead */ @Deprecated public String getDocumentNameFromPath(String path, XWikiContext context) { return this.localStringEntityReferenceSerializer.serialize(getDocumentReferenceFromPath(path, context)); }