com.xpn.xwiki.objects.classes
Class ComputedFieldClass

java.lang.Object
  extended by com.xpn.xwiki.objects.BaseElement<R>
      extended by com.xpn.xwiki.objects.BaseCollection<ClassPropertyReference>
          extended by com.xpn.xwiki.objects.classes.PropertyClass
              extended by com.xpn.xwiki.objects.classes.ComputedFieldClass
All Implemented Interfaces:
PropertyClassInterface, ElementInterface, ObjectInterface, PropertyInterface, Serializable, Cloneable, Comparable<PropertyClass>

public class ComputedFieldClass
extends PropertyClass

Computed Field Class allows to create a field without storage that will display computed values based on other data in the object or wiki.

Since:
4.2M2
Version:
$Id: 948127705334729eabbd73a046da2d1287aad37d $
See Also:
Serialized Form

Field Summary
protected static String FIELD_SCRIPT
          Constant defining the name of the script field.
protected static String XCLASSNAME
          Constant defining the field name.
 
Fields inherited from class com.xpn.xwiki.objects.classes.PropertyClass
cachedCustomDisplayer
 
Fields inherited from class com.xpn.xwiki.objects.BaseCollection
currentReferenceDocumentReferenceResolver, fields, fieldsToRemove, number, relativeEntityReferenceResolver
 
Fields inherited from class com.xpn.xwiki.objects.BaseElement
localEntityReferenceSerializer, referenceCache
 
Constructor Summary
ComputedFieldClass()
          Constructor for ComputedFieldClass.
ComputedFieldClass(PropertyMetaClass wclass)
          Constructor for ComputedFieldClass.
 
Method Summary
 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 getScript()
          Getter for the script value.
 BaseProperty newProperty()
           
 void setScript(String sValue)
          Setter for the script value.
 
Methods inherited from class com.xpn.xwiki.objects.classes.PropertyClass
clone, compareTo, createReference, displayCustom, displayEdit, displayEdit, displayHidden, displayHidden, displayView, displayView, flushCache, fromStringArray, fromValue, fromXML, getCachedDefaultCustomDisplayer, getClassName, getClassType, getCustomDisplay, getDefaultCustomDisplayer, getFieldFullName, getFullQueryPropertyName, getId, getName, getNumber, getObject, getPrettyName, getPrettyName, getTooltip, getTooltip, getTranslatedPrettyName, getValidationMessage, getValidationRegExp, getXClass, getxWikiClass, initLazyCollections, isCustomDisplayed, isDisabled, isUnmodifiable, isValidColumnTypes, newPropertyfromXML, setClassType, setCustomDisplay, setDisabled, setId, setName, setNumber, setObject, setPrettyName, setTooltip, setUnmodifiable, setValidationMessage, setValidationRegExp, setxWikiClass, toFormString, toString, toXML, toXML, validateProperty
 
Methods inherited from class com.xpn.xwiki.objects.BaseCollection
addField, addPropertyForRemoval, apply, equals, get, getCustomMappingMap, getDateValue, getDiff, getDoubleValue, getField, getFieldList, getFieldsToRemove, getFloatValue, getIntValue, getIntValue, getLargeStringValue, getListValue, getLongValue, getProperties, getPropertyList, getPropertyNames, getRelativeXClassReference, getSetValue, getSortedIterator, getStringValue, getXClassReference, merge, merge, put, removeField, safeget, safeput, setClassName, setDateValue, setDBStringListValue, setDocumentReference, setDoubleValue, setFields, setFieldsToRemove, setFloatValue, setIntValue, setLargeStringValue, setLongValue, setSetValue, setStringListValue, setStringValue, setXClassReference, toString, toXMLString
 
Methods inherited from class com.xpn.xwiki.objects.BaseElement
getDocumentReference, getLocalKey, getLocalUidStringEntityReferenceSerializer, getReference, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.xpn.xwiki.objects.ObjectInterface
get, put, safeget, safeput
 
Methods inherited from interface com.xpn.xwiki.objects.ElementInterface
apply, getDocumentReference, getReference, merge, setDocumentReference, toString
 

Field Detail

XCLASSNAME

protected static final String XCLASSNAME
Constant defining the field name.

See Also:
Constant Field Values

FIELD_SCRIPT

protected static final String FIELD_SCRIPT
Constant defining the name of the script field.

See Also:
Constant Field Values
Constructor Detail

ComputedFieldClass

public ComputedFieldClass(PropertyMetaClass wclass)
Constructor for ComputedFieldClass.

Parameters:
wclass - Meta Class

ComputedFieldClass

public ComputedFieldClass()
Constructor for ComputedFieldClass.

Method Detail

setScript

public void setScript(String sValue)
Setter for the script value.

Parameters:
sValue - script to be used for the computed field

getScript

public String getScript()
Getter for the script value.

Returns:
script to be used for the computed field

fromString

public BaseProperty fromString(String value)
Specified by:
fromString in interface PropertyClassInterface
Overrides:
fromString in class PropertyClass

newProperty

public BaseProperty newProperty()
Specified by:
newProperty in interface PropertyClassInterface
Overrides:
newProperty in class PropertyClass

displayView

public void displayView(StringBuffer buffer,
                        String name,
                        String prefix,
                        BaseCollection object,
                        XWikiContext context)
Specified by:
displayView in interface PropertyClassInterface
Overrides:
displayView in class PropertyClass

displayEdit

public void displayEdit(StringBuffer buffer,
                        String name,
                        String prefix,
                        BaseCollection object,
                        XWikiContext context)
Specified by:
displayEdit in interface PropertyClassInterface
Overrides:
displayEdit in class PropertyClass

displayHidden

public void displayHidden(StringBuffer buffer,
                          String name,
                          String prefix,
                          BaseCollection object,
                          XWikiContext context)
Specified by:
displayHidden in interface PropertyClassInterface
Overrides:
displayHidden in class PropertyClass


Copyright © 2004-2013 XWiki. All Rights Reserved.