public abstract class AbstractSystemProperty extends AbstractLogEnabled implements SystemProperty, Serviceable, Configurable, PluginAware
SystemProperty.SystemProperty.EnumeratorDefinition| Modifier and Type | Field and Description |
|---|---|
protected I18nizableText |
_description
The property description.
|
protected I18nUtils |
_i18nUtils
The i18n utils.
|
protected String |
_id
The property ID.
|
protected I18nizableText |
_label
The property label.
|
protected String |
_pluginName
The property plugin name.
|
| Constructor and Description |
|---|
AbstractSystemProperty() |
| Modifier and Type | Method and Description |
|---|---|
private void |
_indexSingleValue(SolrInputDocument document,
String fieldName,
Object value) |
protected I18nizableText |
_parseI18nizableText(Configuration config,
String pluginName,
String name)
Parse an i18n text.
|
void |
configure(Configuration configuration) |
Integer |
getColumnWidth()
Get the column width.
|
String |
getContentTypeId()
In case of a Content reference field, the content type ID.
|
String |
getConverter()
Get the property column converter.
|
I18nizableText |
getDescription()
Get the system property description.
|
SystemProperty.EnumeratorDefinition |
getEnumeratorDefinition(Collection<String> contentTypes,
Configuration configuration)
Get the definition of an enumerator.
|
Object |
getFullValue(Content content)
Get the value represented by this field in the given result content.
|
String |
getId()
Get the system property ID.
|
I18nizableText |
getLabel()
Get the system property label.
|
String |
getRenderer()
Get the renderer.
|
Collection<SchemaDefinition> |
getSchemaDefinitions()
Get the schema definitions brought by this property.
|
Object |
getSortValue(Content content)
Get the sort value represented by this field in the given result content.
|
String |
getWidget()
Get the default widget to use when rendering this property as a criterion.
|
Map<String,I18nizableText> |
getWidgetParameters()
Get the widget parameters.
|
void |
index(Content content,
SolrInputDocument document)
Index the system property in a solr document.
|
boolean |
isDisplayable()
Get if the property can be displayed (i.e.
|
boolean |
isSearchable()
Get if the property can be searched on (i.e.
|
protected boolean |
parseBoolean(Object value)
Get the value as a boolean.
|
protected Date |
parseDate(Object value)
Get the value as a date.
|
protected double |
parseDouble(Object value)
Get the value as a double.
|
protected long |
parseLong(Object value)
Get the value as a long.
|
protected String |
parseString(Object value)
Get the value as a long.
|
protected String[] |
parseStringArray(Object value)
Get the value as a array of String
|
protected UserIdentity[] |
parseUserArray(Object value)
Get the value as array of
UserIdentity |
void |
service(ServiceManager manager) |
void |
setPluginInfo(String pluginName,
String featureName,
String id)
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level. |
getLogger, setLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetQuery, getSearchField, getType, getValue, isMultiple, isSortableprotected I18nUtils _i18nUtils
protected I18nizableText _label
protected I18nizableText _description
protected String _pluginName
public AbstractSystemProperty()
public void setPluginInfo(String pluginName, String featureName, String id)
PluginAwaresetPluginInfo in interface PluginAwarepluginName - Unique identifier for the plugin hosting the extensionfeatureName - Unique feature identifier (unique for a given pluginName)id - Unique identifier of this componentpublic void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void configure(Configuration configuration) throws ConfigurationException
configure in interface ConfigurableConfigurationExceptionpublic String getId()
SystemPropertygetId in interface SystemPropertypublic I18nizableText getLabel()
SystemPropertygetLabel in interface SystemPropertypublic I18nizableText getDescription()
SystemPropertygetDescription in interface SystemPropertypublic SystemProperty.EnumeratorDefinition getEnumeratorDefinition(Collection<String> contentTypes, Configuration configuration)
SystemPropertygetEnumeratorDefinition in interface SystemPropertycontentTypes - The model's content types.configuration - The enumerator configuration.public String getContentTypeId()
SystemPropertygetContentTypeId in interface SystemPropertypublic boolean isSearchable()
SystemPropertyisSearchable in interface SystemPropertytrue if the property can be searched on, false otherwise.public boolean isDisplayable()
SystemPropertyisDisplayable in interface SystemPropertytrue if the property can be displayed, false otherwise.public String getWidget()
SystemPropertygetWidget in interface SystemPropertynull if no specific widget is necessary.public Map<String,I18nizableText> getWidgetParameters()
SystemPropertygetWidgetParameters in interface SystemPropertypublic String getRenderer()
SystemPropertygetRenderer in interface SystemPropertypublic String getConverter()
SystemPropertygetConverter in interface SystemPropertypublic Integer getColumnWidth()
SystemPropertygetColumnWidth in interface SystemPropertypublic void index(Content content, SolrInputDocument document)
SystemPropertyindex in interface SystemPropertycontent - The content to index.document - The solr document to index into.private void _indexSingleValue(SolrInputDocument document, String fieldName, Object value)
public Object getFullValue(Content content)
SystemPropertygetFullValue in interface SystemPropertycontent - the result content.public Object getSortValue(Content content)
SystemPropertygetSortValue in interface SystemPropertycontent - the result content.public Collection<SchemaDefinition> getSchemaDefinitions()
SystemPropertygetSchemaDefinitions in interface SystemPropertyprotected I18nizableText _parseI18nizableText(Configuration config, String pluginName, String name) throws ConfigurationException
config - the configuration to use.pluginName - the current plugin name.name - the child name.ConfigurationException - if the configuration is not valid.protected String parseString(Object value)
value - The value as an object.protected long parseLong(Object value)
value - The value as an object.protected double parseDouble(Object value)
value - The value as an object.protected boolean parseBoolean(Object value)
value - The value as an object, can be a Boolean or a String.protected Date parseDate(Object value)
value - The value as an object, can be a Date or a String.protected UserIdentity[] parseUserArray(Object value)
UserIdentityvalue - The value to parseUserIdentityprotected String[] parseStringArray(Object value)
value - The value as an object to parse