/** * Get the name of this element. * If the Element is an XWiki {@link com.xon.xwiki.api.Object} then it will be the name of the Document * containing the Object, if it's an XWiki {@link com.xon.xwiki.api.Class} it will be the full name of the * {@link com.xon.xwiki.api.Document} where the class is defined, if it's an XWiki * {@link com.xon.xwiki.api.Property} then it will be the name of the property. * * @return the name of this Element. */ public String getName() { return this.element.getName(); } }
/** * @return the actual value of the property, as a String, Number or List. */ public java.lang.Object getValue() { // This is evil, any property which happens to be called 'password' will be masked. TODO fix. if (element.getName().equals("password") && !getXWikiContext().getWiki().getRightService().hasProgrammingRights( getXWikiContext())) { return null; } return ((BaseProperty) element).getValue(); } }
/** * {@inheritDoc} * * @see java.lang.Object#clone() */ @Override public Object clone() { BaseElement element; try { element = getClass().newInstance(); // Make sure we clone either the reference or the name depending on which one is used. if (this.reference != null) { element.setDocumentReference(getDocumentReference()); } else if (this.name != null) { element.setName(getName()); } element.setPrettyName(getPrettyName()); } catch (Exception e) { // This should not happen element = null; } return element; } }
for (Iterator it = object.getFieldList().iterator(); it.hasNext();) { BaseElement property = (BaseElement) it.next(); if (!handledProps.contains(property.getName())) { if (evict) { session.evict(property);