Class ContentUsageAdapterImpl
- java.lang.Object
-
- nl.gx.webmanager.wcb.foundation.ComponentBase
-
- nl.gx.webmanager.wcb.servicetype.impl.SimpleServiceComponent
-
- nl.gx.webmanager.api.implementation.ContentUsageAdapterImpl
-
- All Implemented Interfaces:
ContentUsageAdapter
,FieldAdapter<Object>
,ExtensionConsumer
,DelegatedControllerAware
,Component
,ServiceComponent
public class ContentUsageAdapterImpl extends SimpleServiceComponent implements ContentUsageAdapter
Adapter that takes a content item version and returns information about the usage as string.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface nl.gx.webmanager.services.contentindex.adapter.FieldAdapter
FieldAdapter.Identity
-
-
Field Summary
-
Fields inherited from class nl.gx.webmanager.wcb.foundation.ComponentBase
myBundleContext, myComponentBundle, myComponentDefinition
-
Fields inherited from interface nl.gx.webmanager.services.contentindex.adapter.FieldAdapter
IDENTITY
-
-
Constructor Summary
Constructors Constructor Description ContentUsageAdapterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
adapt(Object item, Locale forLocale)
Adapts a T to return the value in the specified language.boolean
isLanguageSpecific()
Returns whether the adapted value can depend on the language.-
Methods inherited from class nl.gx.webmanager.wcb.servicetype.impl.SimpleServiceComponent
getInstance
-
Methods inherited from class nl.gx.webmanager.wcb.foundation.ComponentBase
dependencyAdded, dependencyRemoved, exportContent, extensionAdded, extensionRemoved, getBundleContext, getClassesFromBundle, getClassForName, getComponentBundle, getComponentDefinition, getComponentManager, getDelegatedController, getExtensions, getId, getInstanceForName, getPrivateNode, getPrivateNode, getTypeId, getWrapperDefinitions, importContent, internalDoStart, internalDoStop, onDestroy, onInit, onInstall, onPurge, onStart, onStop, onUninstall, onUpdate, purgeContent, setBundleContext, setComponentBundle, setComponentBundle, setComponentDefinition, setComponentManager, setDelegatedController
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface nl.gx.webmanager.wcb.Component
exportContent, getClassesFromBundle, getClassForName, getComponentBundle, getComponentDefinition, getExtensions, getId, getInstanceForName, getPrivateNode, getTypeId, getWrapperDefinitions, importContent, onDestroy, onInit, onInstall, onPurge, onStart, onStop, onUninstall, onUpdate, purgeContent, setBundleContext, setComponentBundle, setComponentDefinition, setComponentManager
-
-
-
-
Method Detail
-
isLanguageSpecific
public boolean isLanguageSpecific()
Description copied from interface:FieldAdapter
Returns whether the adapted value can depend on the language.- Specified by:
isLanguageSpecific
in interfaceFieldAdapter<Object>
- Returns:
- true or false
-
adapt
public Object adapt(Object item, Locale forLocale)
Description copied from interface:FieldAdapter
Adapts a T to return the value in the specified language. The specified language may be null, in which case no specific language may be used. An implementation may return null, which is equivalent to "do not index this field for this language". The returned value is the one that is stored and is thus what is returned and displayed in Advanced Search. If this adapter is language specific, its adapt methods will be called for each language and for a null language to index the value in a language agnostic way (if possible). If it is not language specific, only the latter is the case. This method is only invoked if this adapter's field is stored. The returned value should match one of the registeredSOLR types
.- Specified by:
adapt
in interfaceFieldAdapter<Object>
- Parameters:
item
- the value to adaptforLocale
- the target locale to represent the value in- Returns:
- the adapted value, or null if no value should be stored
- See Also:
Field.stored()
-
-