Class SitePropertyFieldTypeResolver
- java.lang.Object
-
- fr.paris.lutece.portal.service.site.properties.SitePropertyFieldTypeResolver
-
public final class SitePropertyFieldTypeResolver extends java.lang.ObjectResolves theFieldTypeof a site property from its datastore key, using the suffix convention of the site properties form.Suffix convention (evaluated from the most specific to the most generic):
.htmlblockor.textblock→FieldType.HTML- contains
color→FieldType.COLOR _urlor.url→FieldType.URLemail→FieldType.EMAIL- anything else (including
.checkbox) →FieldType.TEXT
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FieldTypefromKey(java.lang.String strKey)Resolves the field type of a site property from its datastore key.
-
-
-
Method Detail
-
fromKey
public static FieldType fromKey(java.lang.String strKey)
Resolves the field type of a site property from its datastore key.- Parameters:
strKey- the full datastore key of the site property- Returns:
- the resolved field type,
FieldType.TEXTby default when no specific suffix matches or when the key is null
-
-