public class ComputedFieldClass extends PropertyClass
Modifier and Type | Field and Description |
---|---|
protected static String |
FIELD_SCRIPT
Constant defining the name of the script field.
|
protected static String |
XCLASSNAME
Constant defining the field name.
|
cachedCustomDisplayer
currentReferenceDocumentReferenceResolver, fields, fieldsToRemove, number, relativeEntityReferenceResolver
documentReference, ownerDocument, referenceCache
Constructor and Description |
---|
ComputedFieldClass()
Constructor for ComputedFieldClass.
|
ComputedFieldClass(PropertyMetaClass wclass)
Constructor for ComputedFieldClass.
|
Modifier and Type | Method and Description |
---|---|
void |
displayEdit(StringBuffer buffer,
String name,
String prefix,
BaseCollection object,
XWikiContext context) |
void |
displayHidden(StringBuffer buffer,
String name,
String prefix,
BaseCollection object,
XWikiContext context) |
void |
displayView(StringBuffer buffer,
String name,
String prefix,
BaseCollection object,
XWikiContext context) |
BaseProperty |
fromString(String value) |
String |
getComputedValue(String name,
String prefix,
BaseCollection object,
XWikiContext context)
Computes and returns the raw value of this property for a given object.
|
String |
getScript()
Getter for the script value.
|
BaseProperty |
newProperty() |
void |
setScript(String sValue)
Setter for the script value.
|
clone, compareTo, createReference, displayCustom, displayEdit, displayEdit, displayHidden, displayHidden, displayView, displayView, flushCache, fromStringArray, fromValue, fromXML, getCachedDefaultCustomDisplayer, getClassName, getClassType, getCustomDisplay, getDefaultCustomDisplayer, getFieldFullName, getFullQueryPropertyName, getHint, getId, getName, getNumber, getObject, getPrettyName, getPrettyName, getTooltip, getTooltip, getTranslatedPrettyName, getValidationMessage, getValidationRegExp, getXClass, getxWikiClass, initLazyCollections, isCustomDisplayed, isDisabled, isUnmodifiable, isValidColumnTypes, mergeProperty, newPropertyfromXML, renderContentInContext, renderContentInContext, setClassType, setCustomDisplay, setDisabled, setHint, setId, setName, setNumber, setObject, setPrettyName, setTooltip, setUnmodifiable, setValidationMessage, setValidationRegExp, setxWikiClass, toFormString, toString, toXML, toXML, validateProperty
addField, addPropertyForRemoval, apply, equals, get, getCurrentReferenceDocumentReferenceResolver, getCustomMappingMap, getDateValue, getDiff, getDoubleValue, getField, getFieldList, getFieldsToRemove, getFloatValue, getIntValue, getIntValue, getLargeStringValue, getListValue, getLongValue, getProperties, getPropertyList, getPropertyNames, getRelativeEntityReferenceResolver, getRelativeXClassReference, getSetValue, getSortedIterator, getStringValue, getXClassReference, merge, merge, mergeField, put, removeField, safeget, safeput, setClassName, setDateValue, setDBStringListValue, setDocumentReference, setDoubleValue, setFields, setFieldsToRemove, setFloatValue, setIntValue, setLargeStringValue, setLongValue, setOwnerDocument, setSetValue, setStringListValue, setStringValue, setXClassReference, toXMLString
fromXML, getDocumentReference, getLocalEntityReferenceSerializer, getLocalization, getLocalKey, getLocalUidStringEntityReferenceSerializer, getMergeManager, getOwnerDocument, getReference, getXWikiContext, hashCode, localizePlain, localizePlainOrKey, toString, toXMLString
finalize, getClass, notify, notifyAll, wait, wait, wait
get, put, safeget, safeput
apply, getDocumentReference, getReference, merge, setDocumentReference, toString
protected static final String XCLASSNAME
protected static final String FIELD_SCRIPT
public ComputedFieldClass(PropertyMetaClass wclass)
wclass
- Meta Classpublic ComputedFieldClass()
public void setScript(String sValue)
sValue
- script to be used for the computed fieldpublic String getScript()
@Unstable public String getComputedValue(String name, String prefix, BaseCollection object, XWikiContext context) throws Exception
name
- property nameprefix
- prefix to be addedobject
- object for which the property value has to get computedcontext
- current contextException
- in case an error occurspublic BaseProperty fromString(String value)
fromString
in interface PropertyClassInterface
fromString
in class PropertyClass
public BaseProperty newProperty()
newProperty
in interface PropertyClassInterface
newProperty
in class PropertyClass
public void displayView(StringBuffer buffer, String name, String prefix, BaseCollection object, XWikiContext context)
displayView
in interface PropertyClassInterface
displayView
in class PropertyClass
public void displayEdit(StringBuffer buffer, String name, String prefix, BaseCollection object, XWikiContext context)
displayEdit
in interface PropertyClassInterface
displayEdit
in class PropertyClass
public void displayHidden(StringBuffer buffer, String name, String prefix, BaseCollection object, XWikiContext context)
displayHidden
in interface PropertyClassInterface
displayHidden
in class PropertyClass
Copyright © 2004–2021 XWiki. All rights reserved.