Daisy Open Source CMS

org.outerj.daisy.repository.schema
Interface FieldType

All Superinterfaces:
DescriptionEnabled, LabelEnabled

public interface FieldType
extends DescriptionEnabled, LabelEnabled

Describes a type of field in the repository.

Instances are retrieved from RepositorySchema.

The equals method for FieldType is supported, two field types are equal if all their defining data is equal, with exception of the ID.


Method Summary
 void clearSelectionList()
          Clears(removes) the SelectionList for this FieldType.
 HierarchicalQuerySelectionList createHierarchicalQuerySelectionList(String whereClause, String[] fieldTypeNames, boolean filterVariants)
           
 LinkQuerySelectionList createLinkQuerySelectionList(String whereClause, boolean filterVariants)
          Creates and returns a LinkQuerySelectionList.
 ParentLinkedSelectionList createParentLinkedSelectionList(String whereClause, String linkFieldName, boolean filterVariants)
           
 QuerySelectionList createQuerySelectionList(String query, boolean filterVariants, SortOrder sortOrder)
          Creates and returns a QuerySelectionList.
 StaticSelectionList createStaticSelectionList()
          Creates and returns a StaticSelectionList.
 boolean getAllowFreeEntry()
           
 org.outerx.daisy.x10.ExpSelectionListDocument getExpandedSelectionListXml(long branchId, long languageId, Locale locale)
          Returns the content of the selection list as XML.
 long getId()
           
 Date getLastModified()
          When was this PartType last changed (persistently).
 long getLastModifier()
          Who (which user) last changed this PartType (persistently).
 boolean getLoadSelectionListAsync()
           
 String getName()
           
 SelectionList getSelectionList()
          Returns the SelectionList for this FieldType if one has been defined, null if no SelectionList had been defined (i.e.
 int getSize()
           
 long getUpdateCount()
           
 ValueType getValueType()
           
 org.outerx.daisy.x10.FieldTypeDocument getXml()
           
 boolean isAclAllowed()
          Indicates whether fields of this type can be used in object expressions of ACL rules.
 boolean isDeprecated()
           
 boolean isHierarchical()
           
 boolean isMultiValue()
           
 boolean isPrimitive()
          Returns true if the values of fields of this field type are simple objects, rather than more complex objects, which is the case for multivalue and/or hierarchical fields.
 void save()
           
 void setAclAllowed(boolean aclAllowed)
           
 void setAllFromXml(org.outerx.daisy.x10.FieldTypeDocument.FieldType fieldTypeXml)
           
 void setAllowFreeEntry(boolean allowFreeEntry)
          When a field type has a selection list, should the user also be able to enter other values then those available in the selection list?
 void setDeprecated(boolean deprecated)
           
 void setLoadSelectionListAsync(boolean loadAsync)
           
 void setName(String name)
           
 void setSize(int size)
          Sets the size of this FieldType.
 
Methods inherited from interface org.outerj.daisy.repository.schema.DescriptionEnabled
clearDescriptions, getDescription, getDescriptionExact, getDescriptionLocales, setDescription
 
Methods inherited from interface org.outerj.daisy.repository.schema.LabelEnabled
clearLabels, getLabel, getLabelExact, getLabelLocales, setLabel
 

Method Detail

getId

long getId()

getValueType

ValueType getValueType()

getName

String getName()

setName

void setName(String name)

isDeprecated

boolean isDeprecated()

setDeprecated

void setDeprecated(boolean deprecated)

getSize

int getSize()

setSize

void setSize(int size)
Sets the size of this FieldType. If this method isn't called, the size will be 0. The size can be used for presentational purposes, and doesn't cause any validation to happen.


isAclAllowed

boolean isAclAllowed()
Indicates whether fields of this type can be used in object expressions of ACL rules. When fields can be used in ACL object expressions, this means that changing the value of such as field can influence the result of the ACL.


setAclAllowed

void setAclAllowed(boolean aclAllowed)

isMultiValue

boolean isMultiValue()

isHierarchical

boolean isHierarchical()

isPrimitive

boolean isPrimitive()
Returns true if the values of fields of this field type are simple objects, rather than more complex objects, which is the case for multivalue and/or hierarchical fields.

So this is basically the same as: !isMultiValue() && !isHierarhical(), but is safe for the case other dimensions would be added in the future.


getLastModified

Date getLastModified()
When was this PartType last changed (persistently). Returns null on newly created FieldTypes.


getLastModifier

long getLastModifier()
Who (which user) last changed this PartType (persistently). Returns -1 on newly created FieldTypes.


clearSelectionList

void clearSelectionList()
Clears(removes) the SelectionList for this FieldType.


getSelectionList

SelectionList getSelectionList()
Returns the SelectionList for this FieldType if one has been defined, null if no SelectionList had been defined (i.e. not set for this FieldType using the setSelectionList(SelectionList selectionList) method).


createStaticSelectionList

StaticSelectionList createStaticSelectionList()
Creates and returns a StaticSelectionList. The selection list automatically becomse the selection list of this field type.


createLinkQuerySelectionList

LinkQuerySelectionList createLinkQuerySelectionList(String whereClause,
                                                    boolean filterVariants)
Creates and returns a LinkQuerySelectionList. The selection list automatically becomse the selection list of this field type.

This only works for link-type fields.


createQuerySelectionList

QuerySelectionList createQuerySelectionList(String query,
                                            boolean filterVariants,
                                            SortOrder sortOrder)
Creates and returns a QuerySelectionList. The selection list automatically becomse the selection list of this field type.


createHierarchicalQuerySelectionList

HierarchicalQuerySelectionList createHierarchicalQuerySelectionList(String whereClause,
                                                                    String[] fieldTypeNames,
                                                                    boolean filterVariants)

createParentLinkedSelectionList

ParentLinkedSelectionList createParentLinkedSelectionList(String whereClause,
                                                          String linkFieldName,
                                                          boolean filterVariants)

getAllowFreeEntry

boolean getAllowFreeEntry()

setAllowFreeEntry

void setAllowFreeEntry(boolean allowFreeEntry)
When a field type has a selection list, should the user also be able to enter other values then those available in the selection list?

Note that in either case, it is not checked whether the fields' value occurs in the selection list. This is only a hint towards the editing GUI.


getLoadSelectionListAsync

boolean getLoadSelectionListAsync()

setLoadSelectionListAsync

void setLoadSelectionListAsync(boolean loadAsync)

getExpandedSelectionListXml

org.outerx.daisy.x10.ExpSelectionListDocument getExpandedSelectionListXml(long branchId,
                                                                          long languageId,
                                                                          Locale locale)
Returns the content of the selection list as XML. Returns null if there is no selection list.


getXml

org.outerx.daisy.x10.FieldTypeDocument getXml()

setAllFromXml

void setAllFromXml(org.outerx.daisy.x10.FieldTypeDocument.FieldType fieldTypeXml)

save

void save()
          throws RepositoryException
Throws:
RepositoryException

getUpdateCount

long getUpdateCount()

Daisy Open Source CMS