org.outerj.daisy.repository.schema
Interface FieldType


public interface FieldType


Method Summary
 void clearDescriptions()
           
 void clearLabels()
           
 void clearSelectionList()
          Clears(removes) the SelectionList for this FieldType.
 LinkQuerySelectionList createLinkQuerySelectionList(java.lang.String whereClause, boolean filterVariants)
          Creates and returns a LinkQuerySelectionList.
 QuerySelectionList createQuerySelectionList(java.lang.String query, boolean filterVariants, SortOrder sortOrder)
          Creates and returns a QuerySelectionList.
 StaticSelectionList createStaticSelectionList()
          Creates and returns a StaticSelectionList.
 boolean getAllowFreeEntry()
           
 java.lang.String getDescription(java.util.Locale locale)
           
 java.lang.String getDescriptionExact(java.util.Locale locale)
           
 java.util.Locale[] getDescriptionLocales()
          Returns the locales for which a description is set.
 long getId()
           
 java.lang.String getLabel(java.util.Locale locale)
          Gets the label in the given locale, using the usual locale fallback mechanisms if not found in the exactly specified locale, and finally returning the fieldtype's name if no label is available.
 java.lang.String getLabelExact(java.util.Locale locale)
           
 java.util.Locale[] getLabelLocales()
           
 java.util.Date getLastModified()
          When was this PartType last changed (persistently).
 long getLastModifier()
          Who (which user) last changed this PartType (persistently).
 java.lang.String getName()
           
 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).
 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 isMultiValue()
           
 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 setDescription(java.util.Locale locale, java.lang.String description)
           
 void setLabel(java.util.Locale locale, java.lang.String label)
           
 void setName(java.lang.String name)
           
 void setSize(int size)
          Sets the size of this FieldType.
 

Method Detail

getId

long getId()

getValueType

ValueType getValueType()

getName

java.lang.String getName()

setName

void setName(java.lang.String name)

getDescription

java.lang.String getDescription(java.util.Locale locale)

getDescriptionExact

java.lang.String getDescriptionExact(java.util.Locale locale)

setDescription

void setDescription(java.util.Locale locale,
                    java.lang.String description)
Parameters:
description - if null, the description for this locale will be removed.

clearDescriptions

void clearDescriptions()

getDescriptionLocales

java.util.Locale[] getDescriptionLocales()
Returns the locales for which a description is set.


getLabel

java.lang.String getLabel(java.util.Locale locale)
Gets the label in the given locale, using the usual locale fallback mechanisms if not found in the exactly specified locale, and finally returning the fieldtype's name if no label is available.


getLabelExact

java.lang.String getLabelExact(java.util.Locale locale)

setLabel

void setLabel(java.util.Locale locale,
              java.lang.String label)
Parameters:
label - if null, the label for this locale will be removed.

clearLabels

void clearLabels()

getLabelLocales

java.util.Locale[] getLabelLocales()

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()

getLastModified

java.util.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(java.lang.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(java.lang.String query,
                                            boolean filterVariants,
                                            SortOrder sortOrder)
Creates and returns a QuerySelectionList. The selection list automatically becomse the selection list of this field type.


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.


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()


Copyright © -2012 . All Rights Reserved.