/** * Get the full name of the actual class of the wrapped {@link com.xpn.xwiki.objects.classes.PropertyClass}. The * returned value is the canonical class name of the runtime object representing this property definition, for * example {@code com.xpn.xwiki.objects.classes.StringClass}. * * @return the canonical class name of the wrapped property definition * @see #getType() {@code getType()} for a more user-friendly type */ public String getClassType() { return getBasePropertyClass().getClassType(); }
public BaseClass getxWikiClass() { if (this.pMetaClass == null) { MetaClass metaClass = MetaClass.getMetaClass(); this.pMetaClass = (PropertyMetaClass) metaClass.get(getClassType()); } return this.pMetaClass; }
@Override public void onWikiClassPropertyField(String name, String value, FilterEventParameters parameters) throws WikiStreamException { PropertyClass propertyClass; try { propertyClass = (PropertyClass) this.currentClassPropertyMeta.get(name); } catch (XWikiException e) { throw new WikiStreamException(String.format( "Failed to get definition of field [%s] for property type [%s]", name, this.currentClassProperty.getClassType()), e); } BaseProperty< ? > field = propertyClass.fromString(value); this.currentClassProperty.safeput(name, field); }
String classType = xclassProperty.getClassType(); if (xclassProperty.getClass().getSimpleName().equals(classType + "Class")) {
@Override public Object clone() { PropertyClass pclass = (PropertyClass) super.clone(); pclass.setObject(getObject()); pclass.setClassType(getClassType()); return pclass; }
public Element toXML() { Element pel = new DOMElement(getName()); // Iterate over values sorted by field name so that the values are // exported to XML in a consistent order. Iterator it = getSortedIterator(); while (it.hasNext()) { BaseProperty bprop = (BaseProperty) it.next(); pel.add(bprop.toXML()); } Element el = new DOMElement("classType"); el.addText(getClassType()); pel.add(el); return pel; }
String propertyName = newProperty.getName(); PropertyClass oldProperty = (PropertyClass) oldClass.get(propertyName); String propertyType = StringUtils.substringAfterLast(newProperty.getClassType(), "."); String propertyName = oldProperty.getName(); PropertyClass newProperty = (PropertyClass) get(propertyName); String propertyType = StringUtils.substringAfterLast(oldProperty.getClassType(), ".");
setStaticListPropertyValue(solrDocument, property, (StaticListClass) propertyClass, locale); } else if (propertyClass instanceof TextAreaClass || (propertyClass != null && "String".equals(propertyClass.getClassType())) || (propertyValue instanceof CharSequence && String.valueOf(propertyValue).length() > SHORT_TEXT_LIMIT)) {
property.setType(propertyClass.getClassType()); if (xwikiObject.get(propertyClass.getName()) != null) { property.setValue(xwikiObject.get(propertyClass.getName()).toFormString());
BaseClass bclass = getXClass(context); PropertyClass pclass = (PropertyClass) ((bclass == null) ? null : bclass.getField(propertyName)); String propertyType = (pclass == null) ? "" : StringUtils.substringAfterLast(pclass.getClassType(), "."); BaseClass bclass = getXClass(context); PropertyClass pclass = (PropertyClass) ((bclass == null) ? null : bclass.getField(propertyName)); String propertyType = (pclass == null) ? "" : StringUtils.substringAfterLast(pclass.getClassType(), ".");
BaseClass bclass = getXClass(context); PropertyClass pclass = (PropertyClass) ((bclass == null) ? null : bclass.getField(propertyName)); String propertyType = (pclass == null) ? "" : StringUtils.substringAfterLast(pclass.getClassType(), "."); BaseClass bclass = getXClass(context); PropertyClass pclass = (PropertyClass) ((bclass == null) ? null : bclass.getField(propertyName)); String propertyType = (pclass == null) ? "" : StringUtils.substringAfterLast(pclass.getClassType(), ".");